mongo_stwp_image/docker-compose.yml
2024-05-09 13:33:32 +08:00

17 lines
559 B
YAML

version: '3.9'
services:
mongo_stwp:
image: mongo_stwp
restart: unless-stopped
container_name: "mongo_stwp"
ports:
- "27017:27017"
hostname: test-mongo # hostname is needed for replica set
volumes:
- ./data/db:/var/lib/mongodb
- ./etc/mongo:/etc/mongo/
network_mode: "bridge"
# do not let compose create a *_default network, use bridge instead so that we can
# easily enable ipv6 with minimal configuration
# https://docs.docker.com/config/daemon/ipv6/#use-ipv6-for-the-default-bridge-network