-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
36 lines (35 loc) · 981 Bytes
/
docker-compose.yml
File metadata and controls
36 lines (35 loc) · 981 Bytes
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
services:
# Python Template Server
python-template-server:
image: ${IMAGE:-ghcr.io/javidahmed64592/python-template-server:latest}
build:
context: .
dockerfile: Dockerfile
container_name: python-template-server
ports:
- "${PORT:-443}:${PORT:-443}"
environment:
- HOST=${HOST:-0.0.0.0}
- PORT=${PORT:-443}
# Load API token hash from .env file (optional - will be generated if missing)
- API_TOKEN_HASH=${API_TOKEN_HASH:-}
volumes:
- ./.env:/app/.env
- certs:/app/certs
- logs:/app/logs
restart: unless-stopped
healthcheck:
test:
[
"CMD",
"sh",
"-c",
'python -c "import urllib.request; urllib.request.urlopen(''https://localhost:$PORT/api/health'', context=__import__(''ssl'')._create_unverified_context()).read()"',
]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
volumes:
certs:
logs: