51 lines
1.1 KiB
YAML
51 lines
1.1 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# Main application service
|
|
bps-rw-app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
target: final
|
|
container_name: bps-rw-app
|
|
ports:
|
|
- "8080:8080"
|
|
- "8081:8081"
|
|
environment:
|
|
- ASPNETCORE_ENVIRONMENT=Production
|
|
- ASPNETCORE_URLS=http://+:8080
|
|
volumes:
|
|
# Mount configuration files (optional)
|
|
- ./appsettings.Production.json:/app/appsettings.Production.json:ro
|
|
# Mount logs directory
|
|
- ./logs:/app/logs
|
|
networks:
|
|
- bps-rw-network
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
# Nginx reverse proxy (optional)
|
|
nginx:
|
|
image: nginx:alpine
|
|
container_name: bps-rw-nginx
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
- ./nginx/ssl:/etc/nginx/ssl:ro
|
|
- ./logs/nginx:/var/log/nginx
|
|
networks:
|
|
- bps-rw-network
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- bps-rw-app
|
|
|
|
networks:
|
|
bps-rw-network:
|
|
driver: bridge |