Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (49 loc) · 1.6 KB
/
Copy pathdocker-compose.yml
File metadata and controls
50 lines (49 loc) · 1.6 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
# ==============================================================================
# PyTransDatRO - Production 2-Container Docker Compose Stack
# ==============================================================================
services:
# ----------------------------------------------------------------------------
# Backend: FastAPI REST Service & Pure Python Geodetic Engine
# ----------------------------------------------------------------------------
backend:
build:
context: .
dockerfile: Dockerfile
container_name: pytransdatro-backend
restart: unless-stopped
env_file:
- path: .env
required: false
environment:
- PYTHONUNBUFFERED=1
- PYTRANSDAT_LOG_DIR=/app/logs
volumes:
# Persistent host volume for SQLite usage telemetry & legacy statistics
- ./logs:/app/logs
expose:
- "8000"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# ----------------------------------------------------------------------------
# Web: Nginx Static Web Application & Reverse Proxy
# ----------------------------------------------------------------------------
web:
build:
context: .
dockerfile: Dockerfile.web
container_name: pytransdatro-web
restart: unless-stopped
ports:
# Host port configurable via .env (e.g., 8000 for local testing, 80/custom on remote hosts)
- "${WEBAPP_PORT:-8000}:80"
depends_on:
backend:
condition: service_healthy
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"