-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
62 lines (60 loc) · 1.73 KB
/
docker-compose.prod.yml
File metadata and controls
62 lines (60 loc) · 1.73 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
services:
api:
image: ghcr.io/aybruhm/folio-api:latest
container_name: folio-ghcr-api
restart: unless-stopped
env_file: ./api/.env.prod
environment:
DATABASE_URL: ${DATABASE_URL}
ports:
- "${API_PORT:-8000}:8000"
depends_on:
db:
condition: service_healthy
command: >
python -m alembic upgrade head &&
python -m uvicorn main:app
--host 0.0.0.0
--port ${API_PORT:-8000}
--workers 2
networks:
- folio-prod-network
healthcheck:
test:
[
"CMD",
"/opt/python/bin/python",
"-c",
"import urllib.request; r=urllib.request.urlopen('http://localhost:8000/health', timeout=5); exit(0 if r.status==200 else 1)",
]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
web:
image: ghcr.io/aybruhm/folio-web:latest
container_name: folio-ghcr-web
restart: unless-stopped
env_file: ./web/.env.local
ports:
- "${WEB_PORT:-3000}:3000"
depends_on:
api:
condition: service_healthy
command: node build/index.js
networks:
- folio-prod-network
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
folio-prod-network:
name: folio-prod-network
driver: bridge