/
docker-compose.yml
83 lines (76 loc) · 1.68 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
77
78
79
80
81
82
83
version: "3.9"
x-common-variables: &common-variables
POSTGRES_USER: debug
POSTGRES_PASSWORD: debug
POSTGRES_DB: medical
services:
postgres:
image: postgres:latest
container_name: postgres
restart: always
environment:
<<: *common-variables
ports:
- 5432:5432
volumes:
- pgdata:/var/lib/postgresql/data postgres
networks:
- roctnet
roctnetfrontend:
build:
context: ./roctnet_frontend
dockerfile: Dockerfile
container_name: roctnetfrontend
restart: always
environment:
BACKEND_URL: http://roctnetbackend:8000
MODEL_SERVING: http://roctnetmodel:8001
ports:
- 3000:3000
expose:
- 3000
# volumes:
# - ./roctnet_backend:/app
networks:
- roctnet
roctnetbackend:
build:
context: ./roctnet_backend
dockerfile: Dockerfile
container_name: roctnetbackend
restart: always
depends_on:
- postgres
environment:
<<: *common-variables
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
DJANGO_ALLOWED_HOSTS: 'roctnetfrontend,roctnetbackend'
DJANGO_CORS_HOSTS: 'http://roctnetfrontend,http://roctnetbackend'
stdin_open: true
ports:
- 8000:8000
expose:
- 8000
# volumes:
# - ./roctnet_frontend/src:/app/src
# - ./roctnet_frontend/public:/app/public
networks:
- roctnet
# roctnetmodel:
# build:
# context: ./roctnet_model
# dockerfile: Dockerfile
# container_name: roctnetmodel
# restart: always
# ports:
# - 8001:8001
# expose:
# - 8001
# networks:
# - roctnet
volumes:
pgdata:
networks:
roctnet:
driver: bridge