Hi,
I have deployed a Self Hosted n8n instance on DigitalOcean following this documentation: Digital Ocean - n8n Documentation
It seems like the storage is a bind mount instead of volume
My concern is that all data might be lost if I would remove the container in order to update n8n (reference: https://community.n8n.io/t/how-to-upgrade-n8n-with-docker-compose-setup/660/2?u=jeremylwf)
Thus would like to how to migrate a container from bind mounts to volume?
Here is my existing docker-compose.yml:
version: "3.7"
services:
caddy:
image: caddy:latest
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ${DATA_FOLDER}/caddy_data:/data
- ${DATA_FOLDER}/caddy_config:/config
- ${DATA_FOLDER}/caddy_config/Caddyfile:/etc/caddy/Caddyfile
n8n:
image: n8nio/n8n
restart: always
ports:
- 5678:5678
environment:
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER
- N8N_BASIC_AUTH_PASSWORD
- N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
- N8N_PORT=5678
- N8N_PROTOCOL=https
- NODE_ENV=production
- WEBHOOK_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
- GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
- N8N_EMAIL_MODE=smtp
- N8N_SMTP_HOST=****
- N8N_SMTP_PORT=*****
- N8N_SMTP_USER=******
- N8N_SMTP_PASS=*******
- N8N_SMTP_SENDER=******
- N8N_SMTP_SSL=true
- N8N_LOG_LEVEL=info
- N8N_LOG_OUTPUT=console
- N8N_LOG_FILE_COUNT_MAX=100
- N8N_LOG_FILE_SIZE_MAX=16
volumes:
- ${DATA_FOLDER}/.n8n:/home/node/.n8n
- ${DATA_FOLDER}/local_files:/files
volumes:
caddy_data:
external: true
caddy_config: