-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
42 lines (40 loc) · 901 Bytes
/
docker-compose.yaml
File metadata and controls
42 lines (40 loc) · 901 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
34
35
36
37
38
39
40
41
42
networks:
mongo-net:
name: mongo-net
driver: bridge
services:
proxy:
container_name: proxy-container
restart: on-failure:3
build:
dockerfile: ./Dockerfile
environment:
- APP_MONGO_USERNAME=${MONGO_INITDB_ROOT_USERNAME}
- APP_MONGO_PASSWORD=${MONGO_INITDB_ROOT_PASSWORD}
depends_on:
mongo:
condition: service_healthy
ports:
- 8080:8080
- 8000:8000
volumes:
- ./certs/:/certs/
networks:
- mongo-net
mongo:
image: mongo:latest
container_name: mongo-container
env_file: .env
restart: on-failure:3
ports:
- 27017:27017
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
interval: 3s
timeout: 3s
retries: 3
volumes:
- ./db/:/data/db/
- ./logs/:/var/log/mongodb/
networks:
- mongo-net