-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
81 lines (77 loc) · 1.81 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
version: "3.7"
services:
web-back:
container_name: python-backend
env_file: ./backend/web-back/.env
build: ./backend/web-back/.
volumes:
- ./backend/web-back:/code/
- static_volume:/code/staticfile
stdin_open: true
tty: true
command: gunicorn --bind :8000 config.wsgi:application
networks:
- backend_network
environment:
- CHOKIDAR_USEPOLLING=true
- DJANGO_SETTINGS_MODULE=config.settings
depends_on:
- db
backend-server:
container_name: nginx_back
build:
context: ./backend/nginx/.
dockerfile: Dockerfile.dev
volumes:
- static_volume:/code/staticfiles
ports:
- "8080:80"
depends_on:
- web-back
networks:
- backend_network
db:
build: ./mysql
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
platform: ${DB_PLATFORM}
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
TZ: ${TZ}
volumes:
- ./mysql_volume:/var/lib/mysql
- ./sql:/docker-entrypoint-initdb.d
networks:
- backend_network
web-front:
image: node:14.13.1
volumes:
- ./frontend/web-front:/home/app/frontend
ports:
- 3000:3000
working_dir: /home/app/frontend
command: [bash, -c, $FRONT_COMMAND]
networks:
- frontend_network
frontend-server:
container_name: nginx_frontend
build:
context: ./frontend/nginx/.
dockerfile: Dockerfile.dev
ports:
- "80:80"
depends_on:
- web-front
networks:
- frontend_network
networks:
backend_network:
driver: bridge
frontend_network:
driver: bridge
volumes:
static_volume: