-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
38 lines (37 loc) · 921 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
version: "2"
services:
#define a service called app
app:
#adding a container name
container_name: graphqlapp
#restart the container automatically if it fails
restart: always
#building the app image using the Dockerfile in the current directory
build: .
#mapping the host port to the container port.
ports:
- "4000:4000"
links:
- mongo
#create another service called mongo
mongo:
container_name: graphqlmongo
#pull the official mongodb image from DockerHub registry
image: mongo
#mount the host directory for persistent storage
volumes:
- ./data:/data/db
ports:
- "27017:27017"
#creating a service called admin-mongo
admin-mongo:
#pull down the official image from DockerHub registry
image: 0x59/admin-mongo:latest
ports:
- "8082:8082"
environment:
- PORT=8082
- CONN_NAME=mongo
- DB_HOST=mongo
links:
- mongo