-
Notifications
You must be signed in to change notification settings - Fork 65
/
docker-compose.debug.yml
61 lines (56 loc) · 1.92 KB
/
docker-compose.debug.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
version: "3.8" # specify docker-compose version
# Define the services/containers to be run
services:
angular: # name of the first service
build: # specify the directory of the Dockerfile
context: ./frontend
dockerfile: debug.dockerfile
command: sh -c "npm install --legacy-peer-deps && ng serve --host 0.0.0.0 --poll=2000 --disable-host-check"
container_name: ${ID_PROJECT:-mean}_angular
volumes:
- ./frontend:/app
ports:
- "4200:4200" # specify port forewarding
- "49153:49153"
environment:
- NODE_ENV=dev
links:
- express
express: #name of the second service
build: # specify the directory of the Dockerfile
context: ./api
dockerfile: debug.dockerfile
container_name: ${ID_PROJECT:-mean}_express
command: sh -c "npm install && npm run dev:server"
volumes:
- ./api:/api
ports:
- "3000:3000" #specify ports forewarding
- "9229:9229"
environment:
- SECRET=${SECRET}
- MONGO_DB_USERNAME=${MONGO_DB_USERNAME}
- MONGO_DB_PASSWORD=${MONGO_DB_PASSWORD}
- MONGO_DB_HOST=${MONGO_DB_HOST}
- MONGO_DB_PORT=${MONGO_DB_PORT}
- MONGO_DB_PARAMETERS=${MONGO_DB_PORT}
- MONGO_DB_DATABASE=${MONGO_DB_DATABASE}
- NODE_ENV=${NODE_ENV}
- MONGO_INITDB_DATABASE=${MONGO_DB_DATABASE}
links:
- database
database: # name of the third service
image: mongo # specify image to build container from
container_name: ${ID_PROJECT:-mean}_mongo
environment:
- MONGO_INITDB_ROOT_USERNAME=${MONGO_DB_USERNAME}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_DB_PASSWORD}
- MONGO_DB_USERNAME=${MONGO_DB_USERNAME}
- MONGO_DB_PASSWORD=${MONGO_DB_PASSWORD}
- MONGO_DB=${MONGO_DB_DATABASE}
volumes:
- ./mongo:/home/mongodb
- ./mongo/init-db.d/:/docker-entrypoint-initdb.d/
- ./mongo/db:/data/db
ports:
- "27017:27017" # specify port forewarding