-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.n8n.yml
More file actions
73 lines (68 loc) · 1.97 KB
/
docker-compose.n8n.yml
File metadata and controls
73 lines (68 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
version: '3.8'
# Local n8n development setup
# Start with: docker compose -f docker-compose.n8n.yml up -d
# Access n8n at: http://localhost:5678
services:
n8n:
image: n8nio/n8n:latest
restart: unless-stopped
ports:
- "5678:5678"
environment:
# Disable User Management
- N8N_AUTH_DISABLE_USER_MANAGEMENT=true
# Basic auth for n8n web interface
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER=${N8N_BASIC_AUTH_USER:-admin}
- N8N_BASIC_AUTH_PASSWORD=${N8N_BASIC_AUTH_PASSWORD:-changeme}
# n8n settings
- N8N_HOST=localhost
- N8N_PORT=5678
- N8N_PROTOCOL=http
- WEBHOOK_URL=http://localhost:5678/
# Timezone
- GENERIC_TIMEZONE=America/New_York
- TZ=America/New_York
# Database (PostgreSQL instead of SQLite for better performance)
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=n8n-postgres
- DB_POSTGRESDB_PORT=5432
- DB_POSTGRESDB_DATABASE=n8n
- DB_POSTGRESDB_USER=n8n
- DB_POSTGRESDB_PASSWORD=${N8N_DB_PASSWORD:-n8npassword}
volumes:
- n8n_data:/home/node/.n8n
- ./n8n/n8n-nodes-cyberworld:/home/node/.n8n/custom/node_modules/n8n-nodes-cyberworld
depends_on:
n8n-postgres:
condition: service_healthy
networks:
- n8n-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:5678/healthz"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
n8n-postgres:
image: postgres:15-alpine
restart: unless-stopped
environment:
- POSTGRES_USER=n8n
- POSTGRES_PASSWORD=${N8N_DB_PASSWORD:-n8npassword}
- POSTGRES_DB=n8n
volumes:
- n8n_postgres_data:/var/lib/postgresql/data
networks:
- n8n-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U n8n"]
interval: 10s
timeout: 5s
retries: 5
volumes:
n8n_data:
n8n_postgres_data:
networks:
n8n-network:
driver: bridge