-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
58 lines (56 loc) · 1.32 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
version: '3'
volumes:
postgres:
services:
postgres:
image: postgres:12-alpine
restart: always
environment:
POSTGRES_DB: model_garden
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_PASSWORD: ""
POSTGRES_USER: postgres
volumes:
- postgres:/var/lib/postgresql/data
ports:
- 5444:5432
backend:
image: model_garden:latest
build:
context: backend
restart: always
command: bash -c "python3 manage.py migrate && python3 manage.py loaddata default_bucket && python3 createuser_ifabsent.py && python3 manage.py runserver 0.0.0.0:9000"
environment:
DJANGO_DB_HOST: postgres
DJANGO_DB_PORT: 5432
DJANGO_SETTINGS_MODULE: model_garden.settings
depends_on:
- postgres
- worker
ports:
- 9000:9000
volumes:
- ./backend:/src:rw,cached
worker:
image: model_garden:latest
build:
context: backend
restart: always
command: python3 worker.py
environment:
DJANGO_DB_HOST: postgres
DJANGO_DB_PORT: 5432
DJANGO_SETTINGS_MODULE: model_garden.settings
depends_on:
- postgres
volumes:
- ./backend:/src:rw,cached
frontend:
image: model_garden_frontend:latest
build:
context: frontend
restart: always
ports:
- 80:80
depends_on:
- backend