-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (40 loc) · 984 Bytes
/
docker-compose.yml
File metadata and controls
43 lines (40 loc) · 984 Bytes
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
version: '3.8'
services:
postgres:
image: postgres:14-alpine
environment:
POSTGRES_DB: n8n
POSTGRES_USER: n8n
POSTGRES_PASSWORD: n8n
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U n8n"]
interval: 10s
timeout: 5s
retries: 5
n8n:
build: .
ports:
- "5678:5678"
environment:
- DATABASE_URL=postgres://n8n:n8n@postgres:5432/n8n
- N8N_HOST=localhost:5678
- N8N_PROTOCOL=http
- N8N_ENCRYPTION_KEY=your-local-encryption-key-change-in-production
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER=admin
- N8N_BASIC_AUTH_PASSWORD=admin
- N8N_USER_MANAGEMENT_DISABLED=false
- NODE_ENV=development
volumes:
- n8n_data:/home/node/.n8n
depends_on:
postgres:
condition: service_healthy
command: n8n start
volumes:
postgres_data:
n8n_data: