-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
79 lines (72 loc) · 1.44 KB
/
docker-compose.yml
File metadata and controls
79 lines (72 loc) · 1.44 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
version: "3.2"
services:
api:
image: fast_api
container_name: ml_api
build:
context: ./api
target: build
ports:
- "8000:5000"
depends_on:
- redis
- model
volumes:
- ./uploads:/src/uploads
environment:
POSTGRES_DB: $POSTGRES_DB
POSTGRES_USER: $POSTGRES_USER
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
DATABASE_HOST: $DATABASE_HOST
SECRET_KEY: $SECRET_KEY
networks:
- shared_network
redis:
image: redis:6.2.6
networks:
- shared_network
db:
image: postgres:latest
container_name: postgres_db
environment:
POSTGRES_DB: $POSTGRES_DB
POSTGRES_USER: $POSTGRES_USER
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
volumes:
- postgres_data:/var/lib/postgresql
ports:
- "5432:5432"
networks:
- shared_network
model:
image: ml_service
# container_name: ml_service commented out to allow scaling
build:
context: ./model
dockerfile: ./Dockerfile
depends_on:
- redis
volumes:
- ./uploads:/src/uploads
networks:
- shared_network
ui:
image: ml_ui
container_name: ml_ui
build:
context: ./ui
target: build
ports:
- "9090:9090"
depends_on:
- api
environment:
- API_HOST=api
- API_PORT=5000
networks:
- shared_network
networks:
shared_network:
external: true
volumes:
postgres_data: