Skip to content

Commit

Permalink
fix: Use the same entrypoint for custom docker images as for the othe…
Browse files Browse the repository at this point in the history
…r images (no-changelog) (#4849)

* ci: Use the same entrypoint for custom docker images as for the other images

* update docker-compose examples to use the correct volume paths to work with custom images
  • Loading branch information
netroy authored Dec 7, 2022
1 parent fbb8611 commit 6d5ea06
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docker/compose/withMariaDB/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ services:
links:
- db
volumes:
- n8n_storage:/home/node/
- n8n_storage:/home/node/.n8n
command: n8n start --tunnel
depends_on:
db:
Expand Down
2 changes: 1 addition & 1 deletion docker/compose/withPostgres/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ services:
links:
- postgres
volumes:
- n8n_storage:/home/node/
- n8n_storage:/home/node/.n8n
command: /bin/sh -c "n8n start --tunnel"
depends_on:
postgres:
Expand Down
2 changes: 1 addition & 1 deletion docker/compose/withPostgresAndWorker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ x-shared: &shared
- postgres
- redis
volumes:
- n8n_storage:/home/node/
- n8n_storage:/home/node/.n8n
depends_on:
redis:
condition: service_healthy
Expand Down
4 changes: 2 additions & 2 deletions docker/images/n8n-custom/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ RUN rm -rf patches .npmrc *.yaml node_modules/.cache packages/**/node_modules/.c
# 2. Start with a new clean image with just the code that is needed to run n8n
FROM n8nio/base:${NODE_VERSION}
COPY --from=builder /home/node ./
COPY docker/images/n8n-custom/docker-entrypoint.sh ./
COPY docker/images/n8n-custom/docker-entrypoint.sh /

RUN \
mkdir .n8n && \
chown node:node .n8n
USER node
ENV NODE_ENV=production
ENTRYPOINT ["tini", "--", "./docker-entrypoint.sh"]
ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"]

0 comments on commit 6d5ea06

Please sign in to comment.