-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
69 lines (65 loc) · 1.29 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
version: "3"
services:
db:
image: mysql
environment:
- MYSQL_ROOT_HOST=${DB_ROOT_HOST}
- MYSQL_DATABASE=${DB_NAME}
- MYSQL_USER=${DB_USER}
- MYSQL_PASSWORD=${DB_PASS}
- MYSQL_ROOT_PASSWORD=${DB_PASS}
- TZ=${TZ}
ports:
- "3306:3306"
volumes:
- ./db/conf:/etc/mysql/conf.d/:ro
- mysql_data:/var/lib/mysql
- ./db/logs:/var/log/mysql
networks:
backend:
ipv4_address: 172.28.1.5
api:
image: node
environment:
- MYSQL_SERVER=db
- MYSQL_USER=${DB_USER}
- MYSQL_PASSWORD=${DB_PASS}
- MYSQL_DATABASE=${DB_NAME}
- TZ=${TZ}
- CHOKIDAR_USEPOLLING=true
tty: true
ports:
- "3000:3000"
volumes:
- ./api:/app
working_dir: /app
command: npm run dev
networks:
backend:
ipv4_address: 172.28.1.10
depends_on:
- db
react:
image: node
environment:
- CHOKIDAR_USEPOLLING=true
tty: true
ports:
- "8080:8080"
volumes:
- ./react:/app
working_dir: /app
command: bash -c 'npm start && npm run build'
networks:
- backend
depends_on:
- api
networks:
backend:
driver: bridge
name: app_network
ipam:
config:
- subnet: 172.28.1.0/24
volumes:
mysql_data: