From 9afdbc855af3de6410544249db9b476de46286fc Mon Sep 17 00:00:00 2001 From: suika <2320837+Suika@users.noreply.github.com> Date: Tue, 28 Jan 2020 03:09:38 +0100 Subject: [PATCH] Some options can pull from ENV --- docker/alpine/Dockerfile.build | 11 ++++------- docker/debian-stretch/Dockerfile.build | 11 ++++------- docker/debian-stretch/selfcontained/Dockerfile | 11 ++++------- 3 files changed, 12 insertions(+), 21 deletions(-) diff --git a/docker/alpine/Dockerfile.build b/docker/alpine/Dockerfile.build index cf776f66..a60dd72a 100644 --- a/docker/alpine/Dockerfile.build +++ b/docker/alpine/Dockerfile.build @@ -18,17 +18,14 @@ FROM node:12-alpine3.11 as main WORKDIR /app ENV NODE_ENV=production \ CONFIG_FILE=/app/data/config/config.json \ - DB_PATH=/app/data/db \ - MEDIA_PATH=/app/data/images \ - TEMP_PATH=/app/data/tmp + Server-Database-dbFolder=/app/data/db \ + Server-Media-folder=/app/data/images \ + Server-Media-tempFolder=/app/data/tmp # command line arg orverride the config.json with these settings ENTRYPOINT ["node", "./src/backend/index", \ # after a extensive job (like video converting), pigallery calls gc, to clean up everthing as fast as possible "--expose-gc", \ - "--config-path=$CONFIG_FILE", \ - "--Server-Database-dbFolder=$DB_PATH", \ - "--Server-Media-folder=$MEDIA_PATH", \ - "--Server-Media-tempFolder=$TEMP_PATH"] + "--config-path=$CONFIG_FILE"] EXPOSE 80 RUN apk add --update-cache --repository https://alpine.global.ssl.fastly.net/alpine/v3.11/community/ \ vips ffmpeg diff --git a/docker/debian-stretch/Dockerfile.build b/docker/debian-stretch/Dockerfile.build index 1e3cdcc9..c3b422f1 100644 --- a/docker/debian-stretch/Dockerfile.build +++ b/docker/debian-stretch/Dockerfile.build @@ -16,17 +16,14 @@ FROM node:12-stretch-slim as main WORKDIR /app ENV NODE_ENV=production \ CONFIG_FILE=/app/data/config/config.json \ - DB_PATH=/app/data/db \ - MEDIA_PATH=/app/data/images \ - TEMP_PATH=/app/data/tmp + Server-Database-dbFolder=/app/data/db \ + Server-Media-folder=/app/data/images \ + Server-Media-tempFolder=/app/data/tmp # command line arg orverride the config.json with these settings ENTRYPOINT ["node", "./src/backend/index", \ # after a extensive job (like video converting), pigallery calls gc, to clean up everthing as fast as possible "--expose-gc", \ - "--config-path=$CONFIG_FILE", \ - "--Server-Database-dbFolder=$DB_PATH", \ - "--Server-Media-folder=$MEDIA_PATH", \ - "--Server-Media-tempFolder=$TEMP_PATH"] + "--config-path=$CONFIG_FILE"] EXPOSE 80 RUN apt-get update && apt-get install -y ffmpeg COPY --from=builder /app /app diff --git a/docker/debian-stretch/selfcontained/Dockerfile b/docker/debian-stretch/selfcontained/Dockerfile index 82f1b610..cb37e22c 100644 --- a/docker/debian-stretch/selfcontained/Dockerfile +++ b/docker/debian-stretch/selfcontained/Dockerfile @@ -16,16 +16,13 @@ FROM node:12-stretch-slim WORKDIR /app ENV NODE_ENV=production \ CONFIG_FILE=/app/data/config/config.json \ - DB_PATH=/app/data/db \ - MEDIA_PATH=/app/data/images \ - TEMP_PATH=/app/data/tmp + Server-Database-dbFolder=/app/data/db \ + Server-Media-folder=/app/data/images \ + Server-Media-tempFolder=/app/data/tmp ENTRYPOINT ["npm", "start", "--", \ # after a extensive job (like video converting), pigallery calls gc, to clean up everthing as fast as possible "--expose-gc", \ - "--config-path=$CONFIG_FILE", \ - "--Server-Database-dbFolder=$DB_PATH", \ - "--Server-Media-folder=$MEDIA_PATH", \ - "--Server-Media-tempFolder=$TEMP_PATH"] + "--config-path=$CONFIG_FILE"] EXPOSE 80 COPY --from=BUILDER /build/release /app VOLUME ["/app/data/config", "/app/data/db", "/app/data/images", "/app/data/tmp"]