-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
38 lines (37 loc) · 941 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
33
34
35
36
37
38
version: '3.8'
services:
app:
build:
context: .
ports:
- "${APP_PORT}:${APP_PORT}"
depends_on:
- redis
- mongo
environment:
NODE_ENV: development
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
REDIS_USERNAME: ${REDIS_USERNAME}
REDIS_PASSWORD: ${REDIS_PASSWORD}
REDIS_DB: ${REDIS_DB}
MONGO_HOST: ${MONGO_HOST}
MONGO_PORT: ${MONGO_PORT}
MONGO_USERNAME: ${MONGO_USERNAME}
MONGO_PASSWORD: ${MONGO_PASSWORD}
MONGO_DB: ${MONGO_DB}
volumes:
- .:/app
- /app/node_modules
redis:
image: redis:7
ports:
- "${REDIS_PORT}:${REDIS_PORT}"
command: [ "redis-server", "--requirepass", "${REDIS_PASSWORD}" ]
mongo:
image: mongo:6
ports:
- "${MONGO_PORT}:${MONGO_PORT}"
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD}