From 56b6f2927dae5e17da872ca89e05a05fcb7d8d0d Mon Sep 17 00:00:00 2001 From: Jannik Streek Date: Fri, 16 Feb 2024 11:21:26 +0100 Subject: [PATCH] make version work --- Dockerfile | 13 +++++++------ docker-compose.yml | 2 ++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0e37f3b64..a50d6bca5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -83,13 +83,17 @@ USER etherpad WORKDIR "${EP_DIR}" +# etherpads version feature requires this. Only copy what is really needed +COPY --chown=etherpad:etherpad ./.git/HEAD ./.git/HEAD +COPY --chown=etherpad:etherpad ./.git/refs ./.git/refs +COPY --chown=etherpad:etherpad ${SETTINGS} ./settings.json +COPY --chown=etherpad:etherpad ./var ./var +COPY --chown=etherpad:etherpad ./node_modules ./node_modules + FROM build as development COPY --chown=etherpad:etherpad ./src/package.json .npmrc ./src/pnpm-lock.yaml ./src/ COPY --chown=etherpad:etherpad ./src/bin ./src/bin -COPY --chown=etherpad:etherpad ./var ./var -COPY --chown=etherpad:etherpad ./node_modules ./node_modules -COPY --chown=etherpad:etherpad ${SETTINGS} ./settings.json RUN { [ -z "${ETHERPAD_PLUGINS}" ] || \ pnpm install --no-save --legacy-peer-deps ${ETHERPAD_PLUGINS}; } && \ @@ -104,9 +108,6 @@ ENV NODE_ENV=production ENV ETHERPAD_PRODUCTION=true COPY --chown=etherpad:etherpad ./src ./src -COPY --chown=etherpad:etherpad ./var ./var -COPY --chown=etherpad:etherpad ./node_modules ./node_modules -COPY --chown=etherpad:etherpad ${SETTINGS} ./settings.json # Plugins must be installed before installing Etherpad's dependencies, otherwise # npm will try to hoist common dependencies by removing them from diff --git a/docker-compose.yml b/docker-compose.yml index 4a7bd3196..ecf8e8e3a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,7 @@ services: args: ETHERPAD_PLUGINS: target: development + # change to production if needed tty: true stdin_open: true volumes: @@ -21,6 +22,7 @@ services: - postgres environment: NODE_ENV: development + # change to production if needed ADMIN_PASSWORD: ${DOCKER_COMPOSE_APP_DEV_ADMIN_PASSWORD} DB_CHARSET: ${DOCKER_COMPOSE_APP_DEV_ENV_DB_CHARSET:-utf8mb4} DB_HOST: postgres