From c66397e506f0c81eabc708487968f0d2c1ceffc2 Mon Sep 17 00:00:00 2001 From: Fifo F Date: Mon, 9 Dec 2024 08:48:04 +0100 Subject: [PATCH] Dockerfile updates --- Dockerfile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 26d8403..1966fd1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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