-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
80 lines (76 loc) · 1.68 KB
/
docker-compose.prod.yml
File metadata and controls
80 lines (76 loc) · 1.68 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
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
expose:
- "8000"
env_file:
- .env
environment:
- APP_ENV=production
- IBKR_HOST=host.docker.internal
restart: always
healthcheck:
test: ["CMD", "python", "-c", "import httpx; httpx.get('http://localhost:8000/health')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
deploy:
resources:
limits:
cpus: '1'
memory: 1G
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
- NEXT_PUBLIC_API_URL=${PUBLIC_API_URL:-https://api.yourdomain.com}
expose:
- "3000"
depends_on:
backend:
condition: service_healthy
restart: always
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
deploy:
resources:
limits:
cpus: '0.5'
memory: 512M
caddy:
image: caddy:2-alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy_data:/data
- caddy_config:/config
depends_on:
- backend
- frontend
restart: always
uptime-kuma:
image: louislam/uptime-kuma:1
volumes:
- uptime_kuma_data:/app/data
ports:
- "3001:3001"
restart: always
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3001/"]
interval: 60s
timeout: 10s
retries: 3
volumes:
caddy_data:
caddy_config:
uptime_kuma_data: