-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
72 lines (68 loc) · 1.69 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
72 lines (68 loc) · 1.69 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
version: '3.8'
services:
backend:
build:
context: ./1proxy-backend
dockerfile: Dockerfile
restart: always
environment:
- DATABASE_URL=${DATABASE_URL:-sqlite+aiosqlite:///./data/1proxy.db}
- SECRET_KEY=${SECRET_KEY}
- GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID}
- GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET}
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
- FRONTEND_URL=${FRONTEND_URL:-http://localhost:3000}
- API_URL=${API_URL:-http://localhost:8000}
- REDIS_URL=redis://redis:6379
- PYTHONUNBUFFERED=1
volumes:
- ./backend_data:/app/data
deploy:
resources:
limits:
cpus: '1.0'
memory: 1G
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
depends_on:
- redis
frontend:
build:
context: ./1proxy-frontend
dockerfile: Dockerfile
args:
- NEXT_PUBLIC_API_URL=${API_URL:-http://localhost:8000}
# Don't set NEXT_PUBLIC_BASE_PATH here - let Dockerfile default to '' for standalone
restart: always
ports:
- "3000:3000"
deploy:
resources:
limits:
cpus: '0.5'
memory: 512M
depends_on:
- backend
redis:
image: redis:7-alpine
restart: always
volumes:
- redis_data:/data
command: redis-server --appendonly yes
deploy:
resources:
limits:
cpus: '0.5'
memory: 512M
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
volumes:
redis_data:
backend_data: