mirror of
https://github.com/Viren070/docker-compose-template.git
synced 2025-12-01 23:17:00 +01:00
22 lines
433 B
YAML
22 lines
433 B
YAML
services:
|
|
mongodb:
|
|
image: mongo:latest
|
|
container_name: mongodb
|
|
restart: unless-stopped
|
|
volumes:
|
|
- mongodb-data:/data/db
|
|
healthcheck:
|
|
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
|
|
interval: 10s
|
|
timeout: 10s
|
|
retries: 5
|
|
start_period: 40s
|
|
networks:
|
|
- addon_network
|
|
|
|
networks:
|
|
addon_network:
|
|
external: true
|
|
|
|
volumes:
|
|
mongodb-data: |