chore: add Docker deployment setup and health check wiring
- Add multi-stage Dockerfile for backend (SDK build → ASP.NET runtime,
non-root user, /health HEALTHCHECK)
- Add docker-compose.dev.yml orchestrating extrudex-api + control-center-web
- Add deploy.sh convenience script wrapping docker compose up --build
- Wire ASP.NET health checks: AddHealthChecks().AddNpgSql() + MapHealthChecks("/health")
- Add backend .dockerignore (comprehensive pattern list)
- Exclude frontend/dist, frontend/node_modules, frontend/.angular from git
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
40
docker-compose.dev.yml
Normal file
40
docker-compose.dev.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
extrudex-api:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
container_name: extrudex-api
|
||||
ports:
|
||||
- "5080:8080"
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=Development
|
||||
- ASPNETCORE_URLS=http://+:8080
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
networks:
|
||||
- extrudex-network
|
||||
|
||||
control-center-web:
|
||||
build:
|
||||
context: ../Control-Center/frontend
|
||||
dockerfile: Dockerfile
|
||||
container_name: control-center-web
|
||||
ports:
|
||||
- "5081:80"
|
||||
depends_on:
|
||||
extrudex-api:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- extrudex-network
|
||||
|
||||
networks:
|
||||
extrudex-network:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user