-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
97 lines (90 loc) · 2.26 KB
/
Copy pathdocker-compose.yml
File metadata and controls
97 lines (90 loc) · 2.26 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
86
87
88
89
90
91
92
93
94
95
96
97
version: '3.8'
services:
postgres:
image: postgres:15-alpine
container_name: chittytimeline-db
environment:
POSTGRES_DB: chittytimeline
POSTGRES_USER: chitty
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U chitty -d chittytimeline"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
app:
build:
context: .
dockerfile: Dockerfile
container_name: chittytimeline-app
depends_on:
postgres:
condition: service_healthy
environment:
NODE_ENV: production
PORT: 5000
DATABASE_URL: postgresql://chitty:${POSTGRES_PASSWORD:-changeme}@postgres:5432/chittytimeline
SESSION_SECRET: ${SESSION_SECRET:-generate-a-secure-secret}
CHITTYPM_API_URL: ${CHITTYPM_API_URL:-http://chittypm:5001/api}
CHITTYPM_WS_URL: ${CHITTYPM_WS_URL:-ws://chittypm:5001/ws}
ports:
- "5000:5000"
volumes:
- uploads:/app/uploads
restart: unless-stopped
networks:
- chitty-network
# Optional: ChittyPM service for full ecosystem
chittypm:
image: chittyos/chittypm:latest
container_name: chittypm
environment:
NODE_ENV: production
PORT: 5001
DATABASE_URL: postgresql://chitty:${POSTGRES_PASSWORD:-changeme}@postgres:5432/chittypm
ports:
- "5001:5001"
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
networks:
- chitty-network
# Optional: Redis for session storage and caching
redis:
image: redis:7-alpine
container_name: chittytimeline-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
restart: unless-stopped
networks:
- chitty-network
# Optional: Nginx reverse proxy
nginx:
image: nginx:alpine
container_name: chittytimeline-nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./ssl:/etc/nginx/ssl:ro
depends_on:
- app
restart: unless-stopped
networks:
- chitty-network
volumes:
postgres_data:
uploads:
redis_data:
networks:
chitty-network:
driver: bridge