-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
87 lines (86 loc) · 2.32 KB
/
Copy pathdocker-compose.yml
File metadata and controls
87 lines (86 loc) · 2.32 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
services:
postgres:
image: postgres:15
ports:
- "5433:5432"
environment:
POSTGRES_USER: ${DATABASE_USER}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
healthcheck:
test:
[
"CMD",
"pg_isready",
"-U",
"${DATABASE_USER}",
"-d",
"${DATABASE_NAME}",
]
interval: 5s
timeout: 5s
retries: 5
volumes:
- postgres-db:/var/lib/postgresql/data
mlflow:
image: ghcr.io/mlflow/mlflow:latest-full
container_name: mlflow_server
ports:
- "5000:5000"
environment:
- BACKEND_STORE_URI=postgresql://${DATABASE_USER}:${DATABASE_PASSWORD}@postgres:${DATABASE_PORT}/${DATABASE_NAME}
- ARTIFACT_ROOT=/mlflow/artifacts
volumes:
- mlflow-artifacts:/mlflow/artifacts
command: >
/bin/sh -c "pip install psycopg2-binary --quiet &&
mlflow server
--backend-store-uri postgresql://${DATABASE_USER}:${DATABASE_PASSWORD}@postgres:${DATABASE_PORT}/${DATABASE_NAME}
--default-artifact-root /mlflow/artifacts
--host 0.0.0.0
--allowed-hosts '*'"
healthcheck:
test:
[
"CMD-SHELL",
"timeout 1s bash -c ':> /dev/tcp/127.0.0.1/5000' || exit 1",
]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
depends_on:
postgres:
condition: service_healthy
backend:
build:
context: .
dockerfile: Dockerfile
container_name: it-support-rag-backend
ports:
- "8000:8000"
environment:
- DATABASE_HOST=postgres
- DATABASE_USER=${DATABASE_USER}
- DATABASE_PASSWORD=${DATABASE_PASSWORD}
- DATABASE_NAME=${DATABASE_NAME}
- DATABASE_PORT=${DATABASE_PORT}
- SECRET_KEY=${SECRET_KEY}
- ALGORITHM=${ALGORITHM}
- ACCESS_TOKEN_EXPIRE_MINUTES=${ACCESS_TOKEN_EXPIRE_MINUTES}
- FRONTEND_URL=${FRONTEND_URL}
- GOOGLE_API_KEY=${GOOGLE_API_KEY}
- HF_TOKEN=${HF_TOKEN}
- MLFLOW_TRACKING_URI=${MLFLOW_TRACKING_URI}
volumes:
- mlflow-data:/code/mlflow_data
- mlflow-artifacts:/code/mlflow_artifacts
depends_on:
postgres:
condition: service_healthy
mlflow:
condition: service_healthy
volumes:
postgres-db:
mlflow-data:
mlflow-artifacts: