-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
33 lines (31 loc) · 823 Bytes
/
docker-compose.yml
File metadata and controls
33 lines (31 loc) · 823 Bytes
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
version: '3.8'
x-common-variables: &common-variables
DB_NAME: ${DB_NAME}
DB_USER: ${DB_USER_KEY}
DB_KEY: ${DB_USER_SECRET}
DB_PORT: ${DB_PORT}
services:
mongo:
image: "mongo"
container_name: ${PROJECT_NAME}_database
restart: always
volumes:
- ./db/database:/data/db
- ./db/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
ports:
- ${DB_PORT}:${DB_PORT}
environment:
<<: *common-variables
MONGO_INITDB_ROOT_USERNAME: ${DB_ROOT_KEY}
MONGO_INITDB_ROOT_PASSWORD: ${DB_ROOT_SECRET}
api:
container_name: ${PROJECT_NAME}_api
build:
dockerfile: Dockerfile
context: "./src"
restart: always
ports:
- ${API_PORT}:${API_PORT}
environment:
<<: *common-variables
COINKEY: ${COINKEY}