Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Failing after 10m14s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Has been skipped
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped
Security Vulnerability Scan / Check for Dependency Changes (push) Failing after 11m25s
Security Vulnerability Scan / Composer Security Audit (push) Has been cancelled
- Remove middleware reference from Gitea Traefik labels (caused routing issues) - Optimize Gitea connection pool settings (MAX_IDLE_CONNS=30, authentication_timeout=180s) - Add explicit service reference in Traefik labels - Fix intermittent 504 timeouts by improving PostgreSQL connection handling Fixes Gitea unreachability via git.michaelschiemer.de
73 lines
2.1 KiB
YAML
73 lines
2.1 KiB
YAML
services:
|
|
# PostgreSQL Production Database
|
|
postgres-production:
|
|
image: postgres:16-alpine
|
|
container_name: postgres-production
|
|
restart: unless-stopped
|
|
networks:
|
|
- postgres-production-internal
|
|
environment:
|
|
- TZ=Europe/Berlin
|
|
- POSTGRES_DB=${POSTGRES_DB:-michaelschiemer}
|
|
- POSTGRES_USER=${POSTGRES_USER:-postgres}
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
|
- PGDATA=/var/lib/postgresql/data/pgdata
|
|
volumes:
|
|
- postgres-production-data:/var/lib/postgresql/data
|
|
- ./conf.d:/etc/postgresql/conf.d:ro
|
|
- ./backups:/backups
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
command:
|
|
- postgres
|
|
- -c
|
|
- config_file=/etc/postgresql/conf.d/postgresql.conf
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-michaelschiemer}"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
shm_size: 256mb
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 2G
|
|
reservations:
|
|
memory: 512M
|
|
|
|
# Automated Backup Service for Production
|
|
postgres-production-backup:
|
|
image: postgres:16-alpine
|
|
container_name: postgres-production-backup
|
|
restart: unless-stopped
|
|
networks:
|
|
- postgres-production-internal
|
|
environment:
|
|
- TZ=Europe/Berlin
|
|
- POSTGRES_HOST=postgres-production
|
|
- POSTGRES_DB=${POSTGRES_DB:-michaelschiemer}
|
|
- POSTGRES_USER=${POSTGRES_USER:-postgres}
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
|
- BACKUP_RETENTION_DAYS=${BACKUP_RETENTION_DAYS:-7}
|
|
- BACKUP_SCHEDULE=${BACKUP_SCHEDULE:-0 2 * * *}
|
|
volumes:
|
|
- ./backups:/backups
|
|
- ./scripts:/scripts:ro
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
entrypoint: ["/scripts/backup-entrypoint.sh"]
|
|
depends_on:
|
|
postgres-production:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
postgres-production-data:
|
|
name: postgres-production-data
|
|
|
|
networks:
|
|
postgres-production-internal:
|
|
name: postgres-production-internal
|
|
driver: bridge
|
|
|