- Created Cargo.toml with all required dependencies - Implemented health/ready endpoints - Added Docker configuration (production + development) - Configured docker-compose with resource limits - Set up MongoDB service with persistence - Verified build (cargo check passed) - Prepared monorepo structure for mobile/web/shared Next: Phase 2.2 (MongoDB connection and models)
45 lines
1,003 B
YAML
45 lines
1,003 B
YAML
version: '3.8'
|
|
services:
|
|
backend:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/Dockerfile.dev
|
|
container_name: normogen-backend-dev
|
|
ports:
|
|
- '6000:8000'
|
|
volumes:
|
|
- ./src:/app/src
|
|
environment:
|
|
- RUST_LOG=debug
|
|
- SERVER_PORT=8000
|
|
- MONGODB_URI=mongodb://mongodb:27017
|
|
- MONGODB_DATABASE=normogen_dev
|
|
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
|
|
healthcheck:
|
|
test: ['CMD', 'mongosh', '--eval', 'db.adminCommand.ping()']
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 10s
|
|
volumes:
|
|
mongodb_dev_data:
|
|
driver: local
|
|
networks:
|
|
normogen-network:
|
|
driver: bridge
|