-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdev-dc.yaml
More file actions
139 lines (128 loc) · 2.87 KB
/
Copy pathdev-dc.yaml
File metadata and controls
139 lines (128 loc) · 2.87 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
version: "3"
# Typical order of declarations for every service:
# - image
# - container_name
# - build
# - env_file
# - ports
# - command
# - restart
# - volumes
# - depends_on
services:
postgres:
image: postgres:13-alpine
env_file:
- .env
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
quizzes-db:
image: postgres:13-alpine
env_file:
- quizzes/.env
restart: unless-stopped
environment:
POSTGRES_DB: ${QUIZZES_DB_NAME}
POSTGRES_USER: ${QUIZZES_DB_USER}
POSTGRES_PASSWORD: ${QUIZZES_DB_PASSWORD}
volumes:
- quizzes-data:/var/lib/postgresql/data
ofelia:
image: mcuadros/ofelia:latest
command: daemon --config=/ofelia/config.ini
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./ofelia:/ofelia:ro
# depends_on:
# - back-end
watchdoc:
build:
context: .
dockerfile: watchdoc/Dockerfile
env_file:
- .env
- watchdoc/.env
ports:
- $WATCHDOC_PORT:$WATCHDOC_PORT
# - $WATCHDOC_AUTH_PORT:$WATCHDOC_AUTH_PORT
restart: unless-stopped
volumes:
- ./watchdoc:/watchdoc
back-end:
container_name: back-end
build:
context: .
dockerfile: back-end/docker/image/dev.dockerfile
env_file:
- .env
- back-end/.env
ports:
- $BACK_END_PORT:$BACK_END_PORT
command: >
sh -c "/tools/wait-for-it.sh $POSTGRES_HOST:$POSTGRES_PORT -t 0 &&
python manage.py migrate &&
python manage.py register_permissions &&
python manage.py populate &&
python manage.py runserver 0.0.0.0:$BACK_END_PORT"
restart: unless-stopped
volumes:
- ./back-end:/back-end
depends_on:
- postgres
front-end:
build:
context: .
dockerfile: front-end/Dockerfile
args:
- VUE_APP_BACK_END_HOST=$BACK_END_HOST
- VUE_APP_BACK_END_PORT=$BACK_END_PORT
env_file:
- .env
volumes:
- frontend-dist:/dist
command: >
sh -c "cp -r /front-end/dist/* /dist/ && tail -f /dev/null"
restart: "no"
nginx:
build:
context: .
dockerfile: nginx/Dockerfile
args:
- NGINX_CONF=nginx/dev.conf
ports:
- "7070:80"
volumes:
- frontend-dist:/usr/share/nginx/html:ro
depends_on:
- back-end
- front-end
tgbot:
container_name: tgbot
build:
context: .
dockerfile: tgbot/Dockerfile
env_file:
- .env
- tgbot/.env
restart: unless-stopped
volumes:
- ./tgbot:/tgbot
# depends_on:
# - back-end
quizzes:
build:
context: .
dockerfile: quizzes/Dockerfile
env_file:
- quizzes/.env
ports:
- 5050:5050
depends_on:
- quizzes-db
- back-end
volumes:
postgres-data:
quizzes-data:
frontend-dist: