-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
58 lines (55 loc) · 1.23 KB
/
docker-compose.yml
File metadata and controls
58 lines (55 loc) · 1.23 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
services:
# Tier 1: Database (Postgres)
db:
image: postgis/postgis:18-3.6-alpine
platform: linux/amd64
container_name: MaStr_DB
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
ports:
- "5433:5432"
volumes:
- db:/var/lib/postgresql/
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER}"]
interval: 5s
timeout: 5s
retries: 5
# Tier 2: Backend (FastAPI)
backend:
build: ./backend
container_name: MaStr_Backend
environment:
DB_HOST: db
DB_PORT: 5432
DB_NAME: ${DB_NAME}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
DB_SCHEMA: public
LOG_LEVEL: ${LOG_LEVEL:-INFO}
volumes:
- ./backend:/app
- backend_data:/app/data
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
# Tier 3: Frontend (Streamlit)
frontend:
build: ./frontend
container_name: MaStr_Frontend
environment:
BACKEND_URL: http://backend:8000
MAP_BACKEND_URL: http://localhost:8000
ports:
- "8501:8501"
volumes:
- ./frontend:/app
depends_on:
- backend
volumes:
db:
backend_data: