Changes: - Changed server port from 8000 to 6800 (in range 6500-6999 as requested) - Updated all Docker Compose files (dev and prod) - Updated all Dockerfiles (removed Cargo.lock dependency) - Created backend/.dockerignore with Cargo.lock - Added Cargo.lock to .gitignore (generated by cargo) - Removed obsolete 'version' attribute from docker-compose files - Updated all documentation to reflect new port: * README.md * thoughts/CONFIG.md * thoughts/QUICKSTART.md * thoughts/verification-report-phase-2.3.md This fixes Docker build errors where Cargo.lock was not found during COPY operations. Docker will now generate Cargo.lock during the build process as expected.
56 lines
1.2 KiB
YAML
56 lines
1.2 KiB
YAML
services:
|
|
backend:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/Dockerfile
|
|
container_name: normogen-backend
|
|
ports:
|
|
- '6800:8000'
|
|
environment:
|
|
- RUST_LOG=info
|
|
- SERVER_PORT=8000
|
|
- MONGODB_URI=mongodb://mongodb:27017
|
|
- DATABASE_NAME=normogen
|
|
env_file:
|
|
- .env
|
|
depends_on:
|
|
mongodb:
|
|
condition: service_healthy
|
|
networks:
|
|
- normogen-network
|
|
restart: unless-stopped
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '1.0'
|
|
memory: 1000M
|
|
healthcheck:
|
|
test: ['CMD', 'wget', '--no-verbose', '--tries=1', '--spider', 'http://localhost:8000/health']
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
mongodb:
|
|
image: mongo:6.0
|
|
container_name: normogen-mongodb
|
|
ports:
|
|
- '27017:27017'
|
|
environment:
|
|
- MONGO_INITDB_DATABASE=normogen
|
|
volumes:
|
|
- mongodb_data:/data/db
|
|
networks:
|
|
- normogen-network
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ['CMD', 'mongosh', '--eval', 'db.adminCommand.ping()']
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 10s
|
|
volumes:
|
|
mongodb_data:
|
|
driver: local
|
|
networks:
|
|
normogen-network:
|
|
driver: bridge
|