-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
66 lines (59 loc) · 1.23 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
version: '3.7'
x-common-variables: &common-variables
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
services:
database:
image: mariadb:10.10.2
restart: on-failure
cap_add:
- SYS_NICE
volumes:
- database:/var/lib/mysql
networks:
- network
ports:
- "${MYSQL_PORT}:3306"
environment:
<<: *common-variables
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_ROOT_HOST: ${MYSQL_HOST}
nginx:
image: nginx:1.23.3
depends_on:
- backend
restart: on-failure
volumes:
- "./nginx.conf:/etc/nginx/conf.d/default.conf"
- "./download:/usr/share/nginx/html"
networks:
- network
ports:
- "4050:80"
frontend:
restart: on-failure
stdin_open: true
environment:
- CHOKIDAR_USEPOLLING=true
build:
dockerfile: Dockerfile
context: ./frontend
networks:
- network
backend:
restart: on-failure
build:
dockerfile: Dockerfile
context: "./backend"
depends_on:
- database
networks:
- network
environment:
<<: *common-variables
MYSQL_HOST_IP: ${MYSQL_HOST_IP}
volumes:
database:
networks:
network: