Repository navigation
π Production Deployment
Nikolaos Christos Antoniadis edited this page Oct 16, 2025
·
1 revision
version: '3.8'
services:
database:
image: postgres:16
environment:
POSTGRES_DB: servicesdashboard
POSTGRES_USER: ${DB_USER:-admin}
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
- ./database/init:/docker-entrypoint-initdb.d
networks:
- app_network
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-admin} -d servicesdashboard"]
interval: 30s
timeout: 10s
retries: 3
servicesdashboard:
build:
context: ./ServicesDashboard
dockerfile: Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_URLS=http://+:8080
- ConnectionStrings__DefaultConnection=Host=database;Database=servicesdashboard;Username=${DB_USER:-admin};Password=${DB_PASSWORD}
- AppSettings__DefaultOllamaBaseUrl=${OLLAMA_URL:-http://ollama:11434}
depends_on:
database:
condition: service_healthy
networks:
- app_network
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
frontend:
build:
context: ./services-dashboard-frontend
dockerfile: Dockerfile
environment:
- VITE_API_URL=/api
depends_on:
- servicesdashboard
networks:
- app_network
restart: unless-stopped
nginx:
image: nginx:alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/ssl:/etc/nginx/ssl:ro
- nginx_logs:/var/log/nginx
depends_on:
- frontend
- servicesdashboard
networks:
- app_network
restart: unless-stopped
networks:
app_network:
driver: bridge
volumes:
postgres_data:
nginx_logs:# Database Configuration
DB_USER=services_admin
DB_PASSWORD=your_secure_password_here
DB_HOST=database
DB_PORT=5432
# Application Settings
ASPNETCORE_ENVIRONMENT=Production
DOMAIN_NAME=yourdomain.com
# AI Integration (Optional)
OLLAMA_URL=http://ollama:11434
OLLAMA_MODEL=llama3.2
# SSL Configuration
SSL_CERT_PATH=/etc/nginx/ssl/cert.pem
SSL_KEY_PATH=/etc/nginx/ssl/key.pem
# Monitoring
ENABLE_METRICS=true
LOG_LEVEL=Information