File size: 714 Bytes
bf98406 8c1976c bf98406 8a73406 bf98406 8c1976c 8a73406 973ad5c 8c1976c 973ad5c | 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 | version: "3.8"
services:
app:
build:
context: .
dockerfile: Dockerfile.dev # as using compose on dev mode for live reload
target: builder
ports:
- "${PORT}:${PORT}"
volumes:
- .:/app
# environment:
# - PORT=7860
depends_on:
- mongodb
command: air
mongodb:
image: mongo:latest # Or a specific version like mongo:5.0
container_name: niyam-mongodb # Optional, for easier identification
ports:
- "27017:27017" # Map MongoDB's default port
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: password
volumes:
- mongodb_data:/data/db # Persist MongoDB data
volumes:
mongodb_data:
|