-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
49 lines (48 loc) · 1.68 KB
/
Copy pathdocker-compose.yml
File metadata and controls
49 lines (48 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
services:
frontend:
build: .
command: ["python", "-m", "pspcz_analyzer.main_frontend"]
ports:
- "${PORT:-8000}:${PORT:-8000}"
volumes:
- ${PSPCZ_CACHE_HOST_DIR:-./cache-data}:/data/cache:z
env_file:
- .env
environment:
PSPCZ_CACHE_DIR: /data/cache
PSPCZ_DEV: "0"
PORT: "${PORT:-8000}"
restart: unless-stopped
depends_on:
- backend
healthcheck:
test: ["CMD-SHELL", "python -c \"import os,urllib.request;urllib.request.urlopen('http://127.0.0.1:'+os.environ.get('PORT','8000')+'/api/health', timeout=5)\""]
interval: 30s
timeout: 10s
retries: 5
start_period: 300s # cold cache: lifespan downloads psp.cz data first
backend:
build: .
command: ["python", "-m", "pspcz_analyzer.main_backend"]
# Loopback-only by default: the admin panel is not meant to be public.
# Behind a reverse proxy or for LAN access, set ADMIN_BIND_ADDR (e.g. 0.0.0.0)
# and lock admin access down with ADMIN_ALLOWED_IPS / ADMIN_TRUSTED_PROXIES.
ports:
- "${ADMIN_BIND_ADDR:-127.0.0.1}:${ADMIN_PORT:-8001}:${ADMIN_PORT:-8001}"
volumes:
- ${PSPCZ_CACHE_HOST_DIR:-./cache-data}:/data/cache:z
env_file:
- .env
environment:
PSPCZ_CACHE_DIR: /data/cache
PSPCZ_DEV: "0"
ADMIN_PORT: "${ADMIN_PORT:-8001}"
extra_hosts:
- "host.docker.internal:host-gateway"
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "python -c \"import os,urllib.request;urllib.request.urlopen('http://127.0.0.1:'+os.environ.get('ADMIN_PORT','8001')+'/admin/api/health', timeout=5)\""]
interval: 30s
timeout: 10s
retries: 5
start_period: 300s