-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
45 lines (42 loc) · 988 Bytes
/
docker-compose.yaml
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
version: '2.1'
services:
simple-api-mongo:
image: mongo:4.0.10-xenial
container_name: simple-api-mongo
logging:
driver: none
ports:
- "27017:27017"
restart: unless-stopped
mem_limit: 600mb
mem_reservation: 600mb
oom_score_adj: -1000
command: '--wiredTigerCacheSizeGB 0.3'
volumes:
- ~/dockerData/mongodb/data:/data/db
- ~/dockerData/mongodb/config:/data/configdb
networks:
- simple-api-network
simple-api:
build:
context: ./
dockerfile: Dockerfile
args:
NODE_ENV: ${NODE_ENV}
image: simple-api-image
container_name: simple-api
env_file: ./.env
environment:
- "MONGODB_URI=mongodb://simple-api-mongo:27017/simple-api"
ports:
- "80:3000"
restart: unless-stopped
mem_limit: 400mb
mem_reservation: 400mb
depends_on:
- simple-api-mongo
networks:
- simple-api-network
networks:
simple-api-network:
driver: bridge