-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.example.yml
More file actions
70 lines (67 loc) · 1.83 KB
/
Copy pathdocker-compose.prod.example.yml
File metadata and controls
70 lines (67 loc) · 1.83 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
# Copy to docker-compose.prod.yml (gitignored) and adjust domains/URLs for your environment.
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
environment:
- CONGRESS_API_KEY=${CONGRESS_API_KEY}
- SMTP_HOST=${SMTP_HOST:-}
- SMTP_PORT=${SMTP_PORT:-587}
- SMTP_USER=${SMTP_USER:-}
- SMTP_PASSWORD=${SMTP_PASSWORD:-}
- SMTP_FROM=${SMTP_FROM:-}
- INVOLVE_NOTIFY_TO=${INVOLVE_NOTIFY_TO:-}
- INVOLVE_SEND_AUTO_REPLY=${INVOLVE_SEND_AUTO_REPLY:-true}
- CONGRESS_NUMBER=${CONGRESS_NUMBER:-119}
- CACHE_TTL_SECONDS=${CACHE_TTL_SECONDS:-86400}
- CORS_ORIGINS=https://operationchildshield.org,https://www.operationchildshield.org
- ENV=production
- DISABLE_API_DOCS=1
volumes:
- backend-cache:/app/data
restart: unless-stopped
user: "1001:1001"
# Bound blast radius if a process misbehaves
mem_limit: 1g
cpus: "1.5"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
- NEXT_PUBLIC_API_URL=https://operationchildshield.org
environment:
- NEXT_PUBLIC_API_URL=https://operationchildshield.org
- API_URL=http://backend:8000
depends_on:
backend:
condition: service_healthy
restart: unless-stopped
mem_limit: 1g
cpus: "1.0"
caddy:
image: caddy:2-alpine
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
depends_on:
- frontend
- backend
mem_limit: 256m
cpus: "0.5"
volumes:
backend-cache:
caddy_data:
caddy_config: