inventaire container: move docker-entrypoint.sh outside of /opt/inventaire

to avoid undesired interactions with the shared inventaire-server volume
This commit is contained in:
maxlath
2025-02-27 19:19:42 +01:00
parent f30a03a304
commit 4cffed239d
2 changed files with 5 additions and 3 deletions

View File

@@ -30,10 +30,10 @@ RUN npm ci \
&& npm ci --omit=dev --ignore-scripts \
&& npm cache clean --force
WORKDIR /opt/inventaire
COPY docker-entrypoint.sh /opt/docker-entrypoint.sh
COPY docker-entrypoint.sh docker-entrypoint.sh
WORKDIR /opt/inventaire
# Avoid using npm script to start the server
# See https://adambrodziak.pl/dockerfile-good-practices-for-node-and-npm#heading-use-node-not-npm-to-start-the-server
ENTRYPOINT [ "./docker-entrypoint.sh" ]
ENTRYPOINT [ "/opt/docker-entrypoint.sh" ]

View File

@@ -2,6 +2,8 @@
set -eu
cd /opt/inventaire
# Overwrite the local-${NODE_ENV} config with environment variables every time the container is restarted
cat > "./config/local-${NODE_ENV}.cjs" << EOF
module.exports = {