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

Dockerfile updates

This commit is contained in:
Fifo F. 2024-12-09 08:48:04 +01:00
parent f43270f3a9
commit c66397e506
Signed by: fifo
GPG key ID: A19A205B0C863808

View file

@ -12,14 +12,18 @@ ENV PHANPY_CLIENT_NAME=${PHANPY_CLIENT_NAME} \
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
RUN apk add --no-cache --virtual .build-deps git && \
git clone --depth 1 -b production https://github.com/cheeaun/phanpy.git . && \
npm install && \
npm run build && \
apk del .build-deps
FROM nginx:alpine
RUN echo 'server_tokens off;' > /etc/nginx/conf.d/server_tokens_off.conf
RUN echo -e 'server_tokens off;\nclient_max_body_size 99m;' > /etc/nginx/conf.d/custom.conf
COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 80