This commit is contained in:
12600k-rog-d4
2025-12-09 20:33:57 +08:00
parent 144ed3cbdf
commit 8f4d399cfd
1498 changed files with 3778 additions and 3654 deletions

View File

@@ -0,0 +1,23 @@
version: '3.8'
services:
mongodb:
image: mongodb/mongodb-community-server:7.0-ubuntu2204
container_name: mongodb
environment:
MONGODB_INITDB_ROOT_USERNAME: root
MONGODB_INITDB_ROOT_PASSWORD: 123456
TZ: Asia/Shanghai
ports:
- "27017:27017"
volumes:
- ./data:/data/db
- ./config:/etc/mongo
- ./logs:/var/log/mongodb
command: mongod --bind_ip_all
restart: unless-stopped
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
interval: 10s
timeout: 10s
retries: 5
start_period: 30s