-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
85 lines (80 loc) · 2.12 KB
/
docker-compose.yml
File metadata and controls
85 lines (80 loc) · 2.12 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
74
75
76
77
78
79
80
81
82
83
84
85
services:
api:
build:
context: .
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
- UI_CREDENTIALS=admin:password
- SESSION_SECRET=your-secret-key-change-this
- REDIS_URL=redis://redis:6379
- DATABASE_URL=postgres://postgres:postgres@postgres:5432/whatsapp
- RATE_LIMIT_PER_MINUTE=120
- NODE_ENV=production
volumes:
- ./sessions:/app/sessions
- ./data:/app/data
depends_on:
- redis
- postgres
networks:
- whatsapp-network
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/clients"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
- redis-data:/data
networks:
- whatsapp-network
restart: unless-stopped
command: redis-server --appendonly yes
postgres:
image: postgres:15-alpine
environment:
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
- POSTGRES_DB=${POSTGRES_DB:-whatsapp}
ports:
- "5432:5432"
volumes:
- pg-data:/var/lib/postgresql/data
networks:
- whatsapp-network
restart: unless-stopped
pgadmin:
image: dpage/pgadmin4:latest
environment:
- PGADMIN_DEFAULT_EMAIL=${PGADMIN_EMAIL:-admin@example.com}
- PGADMIN_DEFAULT_PASSWORD=${PGADMIN_PASSWORD:-admin}
- PGADMIN_CONFIG_PROXY_X_FOR_COUNT=1
- PGADMIN_CONFIG_PROXY_X_PROTO_COUNT=1
- PGADMIN_CONFIG_ENHANCED_COOKIE_PROTECTION=False
- PGADMIN_CONFIG_COOKIE_DEFAULT_SECURE=False
- "PGADMIN_CONFIG_COOKIE_DEFAULT_SAMESITE='Lax'"
- PGADMIN_SERVER_JSON_FILE=/pgadmin4/servers.json
ports:
- "5050:80"
volumes:
- pgadmin-data:/var/lib/pgadmin
- ./pgadmin-servers.json:/pgadmin4/servers.json:ro
networks:
- whatsapp-network
restart: unless-stopped
depends_on:
- postgres
networks:
whatsapp-network:
driver: bridge
volumes:
redis-data:
pg-data:
pgadmin-data: