version: '3.8' services: # 1. OneUptime Ingress: Nginx-basiertes Gateway (Behebt den Express 404 Fehler) oneuptime-ingress: image: oneuptime/ingress:${ONEUPTIME_VERSION:-latest} container_name: oneuptime-ingress restart: ${RESTART_POLICY:-always} ports: - "${HOST_PORT_HTTP:-7080}:80" - "${HOST_PORT_HTTPS:-4433}:443" environment: - TZ=${TIMEZONE:-Europe/Berlin} depends_on: - oneuptime # 2. OneUptime App-Core: Zentraler Application-Server und API oneuptime: image: oneuptime/app:${ONEUPTIME_VERSION:-latest} container_name: oneuptime-master restart: ${RESTART_POLICY:-always} # Ports werden hier nicht mehr nach außen geöffnet, da der Ingress das übernimmt environment: - CONTAINER_NAME=oneuptime - PORT=80 - ENCRYPTION_SECRET=${ENCRYPTION_SECRET:-ein_sehr_sicheres_zufaelliges_passwort_123!} - APP_NAME=${APP_NAME:-OneUptime} - TZ=${TIMEZONE:-Europe/Berlin} # Routing-Variablen angepasst an das Ingress-Gateway - HOST=${ONEUPTIME_HOST:-localhost:7080} - HTTP_PROTOCOL=${ONEUPTIME_PROTOCOL:-http} # PostgreSQL-Verbindungsmuster - DATABASE_HOST=oneuptime-postgres - DATABASE_PORT=5432 - DATABASE_NAME=${POSTGRES_DB:-oneuptimedb} - DATABASE_USERNAME=${POSTGRES_USER:-oneuptime} - DATABASE_PASSWORD=${POSTGRES_PASSWORD:-postgres_secure_pass_99!} # Redis/Valkey-Verbindungsmuster - REDIS_HOST=oneuptime-redis - REDIS_PORT=6379 # ClickHouse-Verbindungsmuster - CLICKHOUSE_HOST=oneuptime-clickhouse - CLICKHOUSE_PORT=8123 - CLICKHOUSE_USER=default - CLICKHOUSE_PASSWORD=clickhouse_lab_pass_99! - CLICKHOUSE_DATABASE=oneuptime volumes: - ${ONEUPTIME_DATA_DIR:-/opt/docker/oneuptime/app}:/usr/src/app/data depends_on: - oneuptime-postgres - oneuptime-redis - oneuptime-clickhouse # 3. PostgreSQL: Relationale Konfigurationsdatenbank oneuptime-postgres: image: postgres:${POSTGRES_VERSION:-15-alpine} container_name: oneuptime-postgres restart: ${RESTART_POLICY:-always} environment: - POSTGRES_USER=${POSTGRES_USER:-oneuptime} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres_secure_pass_99!} - POSTGRES_DB=${POSTGRES_DB:-oneuptimedb} - TZ=${TIMEZONE:-Europe/Berlin} volumes: - ${POSTGRES_DATA_DIR:-/opt/docker/oneuptime/postgres}:/var/lib/postgresql/data # 4. Redis: In-Memory-Datenbank für Caching & Queues oneuptime-redis: image: redis:${REDIS_VERSION:-7-alpine} container_name: oneuptime-redis restart: ${RESTART_POLICY:-always} command: redis-server --appendonly yes environment: - TZ=${TIMEZONE:-Europe/Berlin} volumes: - ${REDIS_DATA_DIR:-/opt/docker/oneuptime/redis}:/data # 5. ClickHouse: Analysedatenbank für Log-Daten und Metriken oneuptime-clickhouse: image: clickhouse/clickhouse-server:${CLICKHOUSE_VERSION:-latest} container_name: oneuptime-clickhouse restart: ${RESTART_POLICY:-always} environment: - TZ=${TIMEZONE:-Europe/Berlin} - CLICKHOUSE_DB=oneuptime - CLICKHOUSE_PASSWORD=clickhouse_lab_pass_99! ulimits: nofile: soft: 262144 hard: 262144 volumes: - ${CLICKHOUSE_DATA_DIR:-/opt/docker/oneuptime/clickhouse}:/var/lib/clickhouse # 6. OneUptime Probe: Der integrierte Satellit für die Überprüfungen vor Ort oneuptime-probe: image: oneuptime/probe:${ONEUPTIME_VERSION:-latest} container_name: oneuptime-probe restart: ${RESTART_POLICY:-always} environment: - TZ=${TIMEZONE:-Europe/Berlin} - ONEUPTIME_URL=http://oneuptime:80 - PROBE_ID=${PROBE_ID:-global-probe} - PROBE_KEY=${PROBE_KEY:-default-probe-key-12345!} depends_on: - oneuptime