-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdocker-compose-local.yml
55 lines (51 loc) · 1.17 KB
/
docker-compose-local.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
version: '3'
services:
rest_ml:
container_name: rest_ml
build:
context: ./docker
dockerfile: ./Dockerfile-local
image: rest_ml:latest
env_file: .env
volumes:
- ./src:/ml_app
networks:
- rest_ml
labels:
service: "rest_ml"
ports:
- 80:80
depends_on:
- postgres
- flyway
command: ["uvicorn", "server:app", "--host", "0.0.0.0", "--debug", "--port", "80", "--reload-dir", "/ml_app"]
postgres:
restart: always
container_name: rest_ml_postgres
image: postgres:11.2-alpine
environment:
- POSTGRES_DB=rest_ml
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
networks:
- rest_ml
ports:
- "5432:5432"
expose:
- "5432"
labels:
service: "rest_ml"
flyway:
image: flyway/flyway:7.5-alpine
container_name: rest_ml_flyway
command: -url=jdbc:postgresql://postgres:5432/rest_ml -user=${DB_USER} -password=${DB_PASSWORD} -connectRetries=60 migrate
volumes:
- ./src/sql/migrations:/flyway/sql
depends_on:
- postgres
networks:
- rest_ml
labels:
service: "rest_ml"
networks:
rest_ml: