-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
40 lines (40 loc) · 1.41 KB
/
docker-compose.yml
File metadata and controls
40 lines (40 loc) · 1.41 KB
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
version: '2'
services:
# Start nginx
nginx:
image: nginx:latest
ports:
- "8080:80"
volumes:
- ./default.conf:/etc/nginx/conf.d/defaut.conf
links:
- app
# Start the standard MongoDB container
mongodb:
container_name: "mongodb"
image: mongo:latest
environment:
- MONGO_DATA_DIR=/data/db
- MONGO_LOG_DIR=/dev/log
# persist the data on the host rather than in the container
# this makes the container disposable without losing the data
volumes:
- ./data:/data/db
# forward the standard mongoDB port
ports:
- "27017:27017"
# start mongodb
command: mongod --smallfiles
app:
container_name: "amt-api"
build: .
restart: always
# link the API to the mongoDB container
links:
- mongodb:mongodb
# we need that container
depends_on:
- mongodb
# forward the web port to the server's port
ports:
- "3000:8080"