-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
43 lines (40 loc) · 1007 Bytes
/
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
version: '3'
services:
# loopback api service
api:
user: "${UID}:${GID}"
# image: artisin/loopback-dev
build:
context: ./dev-images/loopback
dockerfile: Dockerfile
# map port 3000 to local 3002
ports:
- 3002:3000
# Debug port
# - 9229:9229
# mount current dir to images /usr/src/api
volumes:
- .:/usr/src/api
# watch changes and restart app
command: nodemon --ignore 'client/' .
# degug command
# command: nodemon --ignore 'client/' -L --inspect ./server
# mysql database -> https://hub.docker.com/_/mysql/
mysqlDb:
image: mysql:5.6
# environment variables for setup
environment:
MYSQL_ROOT_PASSWORD: "${DB_ROOT}"
MYSQL_DATABASE: "${DB_NAME}"
MYSQL_USER: "${DB_USER}"
MYSQL_PASSWORD: "${DB_PWD}"
# default MySQL port
ports:
- 3306:3306
# create and map separate volume
volumes:
- loopbackDev:/var/lib/mysql
# volumes
volumes:
# mysql
loopbackDev: