Hi EmeraldHerald,
Sure, here is my docker compose file:
version: '3.8'
services:
postgres:
image: postgres:11
restart: always
container_name: n8n_db
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
- POSTGRES_NON_ROOT_USER
- POSTGRES_NON_ROOT_PASSWORD
volumes:
- /data/n8n/db:/var/lib/postgresql/data
- ./init-data.sh:/docker-entrypoint-initdb.d/init-data.sh
healthcheck:
test: ['CMD-SHELL', 'pg_isready -h localhost -U ${POSTGRES_USER} -d ${POSTGRES_DB}']
interval: 5s
timeout: 5s
retries: 10
n8napp:
image: n8nio/n8n
restart: always
container_name: n8n_app
environment:
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=postgres
- DB_POSTGRESDB_PORT=5432
- DB_POSTGRESDB_DATABASE=${POSTGRES_DB}
- DB_POSTGRESDB_USER=${POSTGRES_NON_ROOT_USER}
- DB_POSTGRESDB_PASSWORD=${POSTGRES_NON_ROOT_PASSWORD}
- N8N_EDITOR_BASE_URL=My Editor URL
- WEBHOOK_URL=My webhook URL
- EXECUTIONS_PROCESS=main
- EXECUTIONS_TIMEOUT=-1
- EXECUTIONS_TIMEOUT_MAX=3600
- GENERIC_TIMEZONE=Asia/Kolkata
- TZ=Asia/Kolkata
- N8N_EMAIL_MODE=smtp
- N8N_SMTP_HOST=smtp-relay.gmail.com
- N8N_SMTP_PORT=465
- N8N_SMTP_USER=my email
- N8N_SMTP_PASS=my app password
- N8N_SMTP_SENDER=my email
- N8N_SMTP_SSL=true
ports:
- 5678:5678
links:
- postgres
volumes:
- /data/n8n/app:/home/node/.n8n
- /data/n8n/files:/files
depends_on:
postgres:
condition: service_healthy
Please note that I am not using Docker Volumes for this, as we have a custom backup solution which backs up all the folders inside the ‘/data’ root folder.
I looked at the other thread you have provided. You have explained about the Docker Volumes. Since it was working fine for me till last week or so, I tried deleting the containers and re-pulling the latest one and restarted the server. Same results.