-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
36 lines (34 loc) · 1021 Bytes
/
docker-compose.prod.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
version: '3.8'
services:
web:
container_name: selfapi
restart: always
depends_on:
- db
build:
context: .
dockerfile: Dockerfile
target: production
ports:
- ${PORT}:${PORT}
environment:
MONGODB_URL: mongodb://${MONGODB_USERNAME}:${MONGODB_PASSWORD}@db:${MONGODB_PORT}/${MONGODB_DATABASE}
PORT: ${PORT}
NODE_ENV: production
AUTH_TOKEN: ${AUTH_TOKEN}
db:
container_name: mongodb
image: bitnami/mongodb:5.0.4-debian-10-r5
restart: always
ports:
- ${MONGODB_PORT}:${MONGODB_PORT}
environment:
MONGODB_ROOT_PASSWORD: ${MONGODB_PASSWORD}
MONGODB_USERNAME: ${MONGODB_USERNAME}
MONGODB_PASSWORD: ${MONGODB_PASSWORD}
MONGODB_DATABASE: ${MONGODB_DATABASE}
volumes:
- mongodb_data:/bitnami/mongodb
volumes:
mongodb_data:
driver: local