-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
47 lines (44 loc) · 1.1 KB
/
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
39
40
41
42
43
44
45
46
47
version: '3.8'
services:
web:
image: node:20.11.1
restart: always
ports:
- 3000:3000
volumes:
- .:/app
mongoboo:
env_file: ./.env
build:
context: ./.devcontainer/mongo
dockerfile: Dockerfile
restart: always
container_name: mongoboo
hostname: mongoboo
command:
[
'--replSet',
'rs0',
'--bind_ip_all',
'--port',
'27017',
'--keyFile',
'/etc/mongodb/pki/keyfile',
]
volumes:
- './.devcontainer/mongo/mongo1_data:/data/db'
- './.devcontainer/mongo/mongo1_config:/data/configdb'
- './.devcontainer/mongo/scripts/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro'
healthcheck:
test: echo "try { rs.status() } catch (err) { rs.initiate({_id:'rs0',members:[{_id:0,host:'mongoboo:27017'}]}) }" | mongosh --port 27017 --quiet -u root -p root
interval: 5s
timeout: 30s
start_period: 0s
start_interval: 1s
retries: 30
mongoboo-express:
image: mongo-express
restart: always
ports:
- 8081:8081
env_file: ./.env