forked from bcgov/startup-sample-project-aws-containers
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.dev.yml
77 lines (72 loc) · 2 KB
/
docker-compose.dev.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
70
71
72
73
74
75
76
77
version: '3.7'
services:
### Frontend Application #############################
client:
image: ${PROJECT}_client:${GIT_LOCAL_BRANCH}
container_name: ${PROJECT}-client
build:
context: ./client
dockerfile: Dockerfile.dev
expose:
- "4000"
ports:
- "4000:4000"
volumes:
# Binds the application folder from the host inside the container for fast changes
- ./client:/usr/src/app
# Ignores/Hides the node_modules from the bind on the host allowing the node_modules
# from inside the container to be used instead
- /usr/src/app/node_modules
depends_on:
- server
networks:
- frontend
### Backend Application #############################
server:
image: ${PROJECT}-server:${GIT_LOCAL_BRANCH}
container_name: ${PROJECT}-server
build:
context: ./server
dockerfile: Dockerfile.dev
environment:
- DB_SERVER=${DB_SERVER}
expose:
- "80"
ports:
- "80:80"
- "5858:5858"
volumes:
# Binds the application folder from the host inside the container for fast changes
- ./server:/usr/src/app
# Ignores/Hides the node_modules from the bind on the host allowing the node_modules
# from inside the container to be used instead
- /usr/src/app/node_modules
depends_on:
- mongodb
networks:
- frontend
### MongoDB #############################
mongodb:
container_name: ${PROJECT}-mongodb
image: mongo:3.6-xenial
restart: always
expose:
- "27017"
ports:
- "27017:27017"
environment:
- MONGO_INITDB_ROOT_USERNAME=${DB_USER}
- MONGO_INITDB_ROOT_PASSWORD=${DB_PASSWORD}
- MONGO_INITDB_DATABASE=${DB_NAME}
volumes:
- ./.docker/mongo/databaseInit:/docker-entrypoint-initdb.d
- ssp-mongo-data-configdb:/data/configdb
- ssp-mongo-data-db:/data/db
networks:
- frontend
networks:
frontend:
driver: "bridge"
volumes:
ssp-mongo-data-configdb:
ssp-mongo-data-db: