-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
76 lines (72 loc) · 1.71 KB
/
docker-compose.yml
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
services:
web:
build: ./ui
ports:
- "8011:8011"
volumes:
- ./ui:/app
- ./config:/config
- ./data:/data
- ./logs:/logs
depends_on:
backend:
condition: service_healthy
environment:
- FLASK_ENV=production
- BACKEND_URL=http://backend:5000
- BASIC_AUTH_USERNAME=admin
- BASIC_AUTH_PASSWORD=admin
- REQUEST_TIMEOUT=30
- MAX_RETRIES=5
- BACKOFF_FACTOR=1.0
- RETRY_WAIT_AFTER_STARTUP=10
networks:
- proxy-network
restart: unless-stopped
backend:
build: ./backend
ports:
- "5001:5000" # Map container port 5000 to host port 5001
volumes:
- ./backend:/app
- ./config:/config
- ./data:/data
- ./logs:/logs
- /var/run/docker.sock:/var/run/docker.sock # Mount Docker socket from host
environment:
- FLASK_ENV=production
- PROXY_HOST=proxy
- PROXY_PORT=3128
- BASIC_AUTH_USERNAME=admin
- BASIC_AUTH_PASSWORD=admin
- PROXY_CONTAINER_NAME=secure-proxy-proxy-1 # Add container name for restart commands
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
interval: 5s
timeout: 3s
retries: 5
start_period: 10s
networks:
- proxy-network
restart: unless-stopped
proxy:
build: ./proxy
ports:
- "3128:3128"
volumes:
# Removed the direct mount of squid.conf
- ./config:/config
- ./data:/data
- ./logs:/var/log/squid
- squid-cache:/var/spool/squid
networks:
- proxy-network
restart: unless-stopped
cap_add:
- NET_ADMIN
networks:
proxy-network:
driver: bridge
volumes:
squid-cache:
driver: local