version: "3.8"
services:
mongo:
image: mongo:4.4.18
container_name: mongodb
ports:
- "27017:27017" # Map container port 27017 to host port 27017
volumes:
- /home/user/mongodb/data:/data/db
restart: unless-stopped
version: "3.8"
services:
mongo:
image: mongo:4.4.18
container_name: mongodb
ports:
- "27017:27017" # Map container port 27017 to host port 27017
volumes:
- /home/user/mongodb/data:/data/db
restart: unless-stopped