1
0
Fork 0
mirror of https://git.fifo-f.eu/fifo/phanpy-docker.git synced 2025-04-18 19:08:20 +02:00

Initial commit

This commit is contained in:
Fifo F. 2024-12-04 18:38:19 +01:00
commit f699995f44
Signed by: fifo
GPG key ID: A19A205B0C863808
2 changed files with 45 additions and 0 deletions

25
Dockerfile Normal file
View file

@ -0,0 +1,25 @@
FROM node:18-alpine AS builder
ARG PHANPY_CLIENT_NAME
ARG PHANPY_WEBSITE
ARG PHANPY_LINGVA_INSTANCES
ARG PHANPY_PRIVACY_POLICY_URL
ARG PHANPY_DEFAULT_INSTANCE
ENV PHANPY_CLIENT_NAME=${PHANPY_CLIENT_NAME} \
PHANPY_WEBSITE=${PHANPY_WEBSITE} \
PHANPY_LINGVA_INSTANCES=${PHANPY_LINGVA_INSTANCES} \
PHANPY_PRIVACY_POLICY_URL=${PHANPY_PRIVACY_POLICY_URL} \
PHANPY_DEFAULT_INSTANCE=${PHANPY_DEFAULT_INSTANCE}
RUN apk add --no-cache git
WORKDIR /app
RUN git clone --depth 1 -b production https://github.com/cheeaun/phanpy.git .
RUN npm install
RUN npm run build
FROM nginx:alpine
RUN echo 'server_tokens off;' > /etc/nginx/conf.d/server_tokens_off.conf
COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 80

20
docker-compose.yml Normal file
View file

@ -0,0 +1,20 @@
version: '3'
services:
phanpy:
build:
context: .
args:
PHANPY_CLIENT_NAME: "phanpy.fifo-f.eu"
PHANPY_WEBSITE: "https://phanpy.fifo-f.eu"
PHANPY_LINGVA_INSTANCES: "lingva.phanpy.social lingva.lunar.icu lingva.garudalinux.org translate.plausibility.cloud"
PHANPY_PRIVACY_POLICY_URL: "https://github.com/cheeaun/phanpy/blob/main/PRIVACY.MD"
PHANPY_DEFAULT_INSTANCE: "fedi.fifo-f.eu"
ports:
- "8282:80"
networks:
- phanpy-network
networks:
phanpy-network:
driver: bridge