-
Notifications
You must be signed in to change notification settings - Fork 2
/
common.yml
34 lines (33 loc) · 1.06 KB
/
common.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
version: '2.1'
services:
mongodb:
container_name: ya-mongo-db
image: mongo:latest
volumes:
- mongostorage:/data/db
ports:
- "${MONGODB_EXPOSED_PORT}:27017"
environment:
- MONGO_DATA_DIR=/data/db
- MONGO_LOG_DIR=/dev/null
- MONGODB_EXPOSED_PORT=${MONGODB_EXPOSED_PORT}
- MONGODB_APPLICATION_DATABASE=${MONGODB_APPLICATION_DATABASE}
# Auth for mongo can be enabled later with setting up user@password:
# - MONGO_INITDB_ROOT_USERNAME=user
# - MONGO_INITDB_ROOT_PASSWORD=password
api:
container_name: ya-server
build: .
restart: always
mem_limit: 300m
ports:
- "${REST_API_EXPOSED_PORT}:3000"
volumes:
- ./:/home/nodejs/app
- /home/nodejs/app/node_modules
environment:
MONGO_CONNECTION_STRING: "mongodb://mongodb:${MONGODB_EXPOSED_PORT}/${MONGODB_APPLICATION_DATABASE}"
TEST_MONGO_CONNECTION_STRING: "mongodb://mongodb:${MONGODB_EXPOSED_PORT}/test"
LOG_OBFUSCATE_PLACEHOLDER: "HIDDEN_FIELD"
LOG_ROTATION_PERIOD: "3d"
LOG_COPIES_COUNT: "3"