ci: Use an init container to fix mounted-path permissions in docker compose (#6956)

Fixes
* #6733
* #6793

related PR https://github.com/n8n-io/n8n-docker-caddy/pull/12
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2023-08-25 11:51:55 +02:00 committed by GitHub
parent c2c3a8579d
commit 07d3633a05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,6 +19,13 @@ services:
volumes:
- ${DATA_FOLDER}/letsencrypt:/letsencrypt
- /var/run/docker.sock:/var/run/docker.sock:ro
initContainer:
image: busybox
command: ['sh', '-c', 'chown -R 1000:1000 /home/node/.n8n']
volumes:
- ${DATA_FOLDER}/.n8n:/home/node/.n8n
n8n:
image: docker.n8n.io/n8nio/n8n
ports:
@ -50,3 +57,6 @@ services:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${DATA_FOLDER}/.n8n:/home/node/.n8n
depends_on:
initContainer:
condition: service_completed_successfully