Phase 2.1: Backend project initialized with Docker configuration
- 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)
This commit is contained in:
parent
4dca44dbbe
commit
1e38fe3ace
11 changed files with 388 additions and 80 deletions
45
backend/docker-compose.dev.yml
Normal file
45
backend/docker-compose.dev.yml
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue