1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-02 09:21:34 +02:00
dockerfiles/n8n/docker-compose.yml
2021-07-07 14:46:12 +08:00

36 lines
778 B
YAML

version: "3.8"
services:
n8n:
image: n8nio/n8n
ports:
- "5678:5678"
volumes:
- ./data:/home/node/.n8n
environment:
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=postgres
- DB_POSTGRESDB_PORT=5432
- DB_POSTGRESDB_DATABASE=n8n
- DB_POSTGRESDB_USER=n8n
- DB_POSTGRESDB_PASSWORD=n8n
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER=username
- N8N_BASIC_AUTH_PASSWORD=password
depends_on:
- postgres
restart: unless-stopped
postgres:
image: postgres:13-alpine
ports:
- "5432:5432"
volumes:
- ./data/postgres:/var/lib/postgresql/data
environment:
- POSTGRES_USER=n8n
- POSTGRES_PASSWORD=n8n
- POSTGRES_DB=n8n
restart: unless-stopped