-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
32 lines (32 loc) · 972 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
version: "2"
services:
app:
container_name: app
restart: always
build: .
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
ports:
- "8080:3000"
depends_on:
- mongo
environment:
- CRYPTO_COMPARE_API_KEY=${CRYPTO_COMPARE_API_KEY}
- MONGODB_URL=mongodb://${MONGO_NON_ROOT_USERNAME}:${MONGO_NON_ROOT_PASSWORD}@mongo:27017/crypto_sentiment
- MONGODB_NAME=crypto_sentiment
mongo:
container_name: mongo
restart: always
image: mongo
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
MONGO_INITDB_DATABASE: crypto_sentiment
MONGO_NON_ROOT_USERNAME: ${MONGO_NON_ROOT_USERNAME}
MONGO_NON_ROOT_PASSWORD: ${MONGO_NON_ROOT_PASSWORD}
ports:
- "27017:27017"
volumes:
- ./data:/data/db
- ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro