-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
89 lines (80 loc) · 2.02 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
89 lines (80 loc) · 2.02 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
version: '3.8'
services:
traefik:
image: traefik:v2.10
container_name: traefik
restart: always
command:
- "--api.insecure=false"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
ports:
- "${HOST_PORT}:80" # Expose Traefik on port 80
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- public
postgres:
env_file: .env
image: postgres:17
container_name: postgres_db
restart: always
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: llmpid
volumes:
- postgres_data:/var/lib/postgresql/data
- ./migrations/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d llmpid"]
interval: 5s
timeout: 5s
retries: 2
networks:
- restricted
internal_classifier_service:
container_name: internal_classifier_srvc
build:
context: ./backend/internal_classifier_service
networks:
- restricted
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8888/health || exit 1"]
interval: 10s
timeout: 5s
retries: 1
backend:
env_file: .env
build:
context: ./backend/llmpid_api
depends_on:
internal_classifier_service:
condition: service_healthy
postgres:
condition: service_healthy
labels:
- "traefik.enable=true"
- "traefik.http.routers.backend.rule=PathPrefix(`/api`)"
- "traefik.http.services.backend.loadbalancer.server.port=8081"
networks:
- public
- restricted
frontend:
build:
context: ./frontend
depends_on:
- backend
labels:
- "traefik.enable=true"
- "traefik.http.routers.frontend.rule=PathPrefix(`/`)"
- "traefik.http.services.frontend.loadbalancer.server.port=8080"
networks:
- public
networks:
public:
driver: bridge
restricted:
driver: bridge
volumes:
postgres_data: