-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (50 loc) · 1.5 KB
/
docker-compose.yml
File metadata and controls
59 lines (50 loc) · 1.5 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
services:
# --- BACKEND SERVICE (Python API) ---
backend:
container_name: intune_backend
build:
context: ./Backend
dockerfile: Dockerfile
restart: unless-stopped
# SECURITY: Only expose port 8000 internally to the Docker network.
# The host machine cannot access this directly, only the frontend can.
expose:
- "8000"
volumes:
- app_data:/app/data
environment:
- PYTHONUNBUFFERED=1
networks:
- intune_net
# HEALTHCHECK: Pings the API every 10s to see if it's ready.
# The frontend will NOT start until this passes.
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
interval: 10s
timeout: 5s
retries: 5
start_period: 300s # Gives the heavy sync script time to run first
# --- FRONTEND SERVICE (React + Nginx) ---
frontend:
container_name: intune_frontend
build:
context: ./frontend
dockerfile: Dockerfile
restart: unless-stopped
# ACCESS: This is the ONLY port exposed to your network.
# Point your Reverse Proxy / Load Balancer here (e.g., http://10.10.10.10:8090)
ports:
- "8090:80"
# DEPENDENCY: Waits for backend to be "Healthy" (not just running)
depends_on:
backend:
condition: service_healthy
networks:
- intune_net
# --- NETWORKS ---
networks:
intune_net:
driver: bridge
# --- VOLUMES ---
volumes:
app_data: