-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
67 lines (54 loc) · 1.36 KB
/
Copy pathdocker-compose.yml
File metadata and controls
67 lines (54 loc) · 1.36 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
services:
mongo:
image: mongo:8.0
container_name: mongo-db
restart: unless-stopped
user: '999:999' # run as mongodb user inside the image
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
MONGO_RS_HOST: mongo
volumes:
- mongo-data:/data/db
- mongo-config:/data/configdb
- ./scripts/mongo-init.sh:/usr/local/bin/mongo-init.sh:ro
entrypoint: ['/usr/local/bin/mongo-init.sh']
networks:
mongo-private:
ipv4_address: 172.22.0.10
aliases:
- mongo
mongo-host-access:
aliases:
- mongo
healthcheck:
test: ['CMD', 'mongosh', '--eval', "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
cloudflared:
image: cloudflare/cloudflared:latest
container_name: cloudflared-tunnel
restart: unless-stopped
command: >
tunnel --no-autoupdate
run --token ${CLOUDFLARE_TOKEN}
depends_on:
- mongo
networks:
- mongo-private
volumes:
mongo-data:
name: mongo-data-store
mongo-config:
name: mongo-config-store
networks:
mongo-private:
name: mongo-private
driver: bridge
ipam:
config:
- subnet: 172.22.0.0/16
mongo-host-access:
name: mongo-host-access
driver: bridge