fix: Correct MONGODB_DATABASE environment variable and change port to 6500
This commit is contained in:
parent
acc1364335
commit
3bcd732945
1 changed files with 51 additions and 0 deletions
51
docker-compose.dev.yml
Normal file
51
docker-compose.dev.yml
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: docker/Dockerfile.dev
|
||||||
|
args:
|
||||||
|
BUILDKIT_INLINE_CACHE: 0
|
||||||
|
pull_policy: build
|
||||||
|
container_name: normogen-backend-dev
|
||||||
|
ports:
|
||||||
|
- '6500:8000' # Changed from 6800 to 6500 as requested
|
||||||
|
volumes:
|
||||||
|
- ./src:/app/src
|
||||||
|
environment:
|
||||||
|
- RUST_LOG=debug
|
||||||
|
- SERVER_PORT=8000
|
||||||
|
- SERVER_HOST=0.0.0.0
|
||||||
|
- MONGODB_URI=mongodb://mongodb:27017
|
||||||
|
- MONGODB_DATABASE=normogen_dev # Fixed: was DATABASE_NAME, should be MONGODB_DATABASE
|
||||||
|
- JWT_SECRET=dev-jwt-secret-key-minimum-32-chars
|
||||||
|
depends_on:
|
||||||
|
mongodb:
|
||||||
|
condition: service_healthy
|
||||||
|
networks:
|
||||||
|
- normogen-network
|
||||||
|
restart: unless-stopped
|
||||||
|
mongodb:
|
||||||
|
image: mongo:6.0
|
||||||
|
container_name: normogen-mongodb-dev
|
||||||
|
ports:
|
||||||
|
- '27017:27017'
|
||||||
|
environment:
|
||||||
|
- MONGO_INITDB_DATABASE=normogen_dev
|
||||||
|
volumes:
|
||||||
|
- mongodb_dev_data:/data/db
|
||||||
|
networks:
|
||||||
|
- normogen-network
|
||||||
|
user: mongodb:mongodb
|
||||||
|
healthcheck:
|
||||||
|
test: |
|
||||||
|
echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
start_period: 60s
|
||||||
|
volumes:
|
||||||
|
mongodb_dev_data:
|
||||||
|
driver: local
|
||||||
|
networks:
|
||||||
|
normogen-network:
|
||||||
|
driver: bridge
|
||||||
Loading…
Add table
Add a link
Reference in a new issue