forked from Elimeleth/restobar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·55 lines (55 loc) · 1.39 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
version: "3"
services:
mysql:
image: mysql:5.7
container_name: mysql
network_mode: host
expose:
- 3306
#ports:
# - "3306:3306"
command: --init-file /data/application/init.sql
restart: always
volumes:
- ./database/init.sql:/data/application/init.sql
environment:
MYSQL_ROOT_USER: root
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: restobar
MYSQL_USER: mysql
MYSQL_PASSWORD: secret
backend:
depends_on:
- mysql
hostname: bakend
restart: always
build:
dockerfile: Dockerfile.dev
context: backend
volumes:
- /app/node_modules
- ./backend:/app
ports:
- "5000:5000"
environment:
- DB_USER=mysql
- DB_HOST=mysql
- DB_NAME=restobar
- DB_PASSWORD=secret
- DB_DIALECT=mysql
- DB_PORT=3306
- NODE_ENV=development
- PORT=5000
- JWT_SECRET=abc123
frontend:
restart: always
build:
dockerfile: Dockerfile.dev
context: ./frontend
links:
- backend
ports:
- "3000:3000"
volumes:
- /app/node_modules
- ./frontend:/app