niyam-api / docker-compose.yml
axyut
user with no auth
973ad5c
raw
history blame contribute delete
714 Bytes
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: