-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
57 lines (57 loc) · 1.18 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
version: "3.9"
services:
mysql:
build:
context: "mysql"
dockerfile: "Dockerfile"
args:
- MYSQL_VERSION=${MYSQL_VERSION}
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD}
- TZ=${WORKSPACE_TIMEZONE}
ports:
- '${MYSQL_PORT}:3306'
expose:
- '${MYSQL_PORT}'
volumes:
- db:/var/lib/mysql
networks:
- backend
node:
working_dir: /home/node/app
build:
context: .
dockerfile: "node/Dockerfile"
restart: no
environment:
DB_SCHEMA: mysql
DB_USER: ${MYSQL_USER}
DB_PASSWORD: ${MYSQL_USER}
DB_HOST: mysql
depends_on:
- mysql
ports:
- ${WORKSPACE_PORT}:3000
stdin_open: true
tty: true
volumes:
- ./src:/home/node/app
- /home/node/app/node_modules
command: npm run nodemon
networks:
- backend
networks:
frontend:
driver: bridge
backend:
driver: bridge
volumes:
src:
driver: local
db:
driver: local