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:
@@ -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" ]
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user