Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
63 lines (62 loc) · 1.58 KB
/
Copy pathdocker-compose.yml
File metadata and controls
63 lines (62 loc) · 1.58 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
services:
backend:
build:
context: .
dockerfile: docker/backend.Dockerfile
ports:
# Loopback-only by default; set BIND_ADDR=0.0.0.0 for LAN access
- "${BIND_ADDR:-127.0.0.1}:8000:8000"
volumes:
- ./data:/app/data
- ./backend:/app/backend:ro
environment:
# Group that keeps read access to data/.env on the host
- HOST_GID=${HOST_GID:-1000}
restart: unless-stopped
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request,ssl; urllib.request.urlopen('https://localhost:8000/health', context=ssl._create_unverified_context())"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
deploy:
resources:
limits:
cpus: '3.0'
memory: 4G
reservations:
cpus: '0.5'
memory: 512M
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
frontend:
build:
context: .
dockerfile: docker/frontend.Dockerfile
ports:
# Loopback-only by default; set BIND_ADDR=0.0.0.0 for LAN access
- "${BIND_ADDR:-127.0.0.1}:5173:5173"
volumes:
- ./data:/app/data
- ./frontend/src:/app/frontend/src
- ./examples:/app/examples:ro
depends_on:
backend:
condition: service_healthy
restart: unless-stopped
deploy:
resources:
limits:
cpus: '1.0'
memory: 2G
reservations:
cpus: '0.5'
memory: 512M
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"