-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
62 lines (56 loc) · 1.16 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
version: '3.7'
x-env_file:
&env_file
- ./.env
services:
postgres-db:
image: postgres:13.0-alpine
env_file:
*env_file
volumes:
- postgres-db:/var/lib/postgresql/data
backend:
build:
context: .
dockerfile: ./conf/backend/Dockerfile
depends_on:
- postgres-db
env_file:
*env_file
environment:
- PYTHONDONTWRITEBYTECODE=1
volumes:
- ./code:/code
- ./conf/backend/scripts:/scripts
- backend-home:/home/user
init: true
command: ['/scripts/run.sh']
frontend:
build:
context: .
dockerfile: ./conf/frontend/Dockerfile
env_file:
*env_file
volumes:
- ./code:/code
- ./conf/frontend/scripts:/scripts
- frontend-home:/home/user
init: true
command: ['/scripts/run.sh']
nginx:
image: nginx:1.19-alpine
env_file:
*env_file
depends_on:
- backend
- frontend
volumes:
- ./conf/nginx/nginx.conf.template:/etc/nginx/nginx.conf.template
- ./conf/nginx/run.sh:/run.sh
ports:
- '${APP_PORT}:${APP_PORT}'
command: ['/run.sh']
volumes:
postgres-db:
backend-home:
frontend-home: