version: '3.8' services: # 1. OneUptime Ingress: Das offizielle Nginx-Gateway (wichtig für die Assets) oneuptime-ingress: image: oneuptime/nginx:${ONEUPTIME_VERSION:-release} container_name: oneuptime-ingress restart: ${RESTART_POLICY:-always} ports: # Dein Load Balancer greift auf Port 7080 deines Docker-Hosts zu - "${HOST_PORT_HTTP:-7080}:8080" - "${HOST_PORT_HTTPS:-4433}:4430" environment: - TZ=${TIMEZONE:-Europe/Berlin} # Diese Variablen sind für das Nginx-Skript zwingend erforderlich - NGINX_LISTEN_ADDRESS=${NGINX_LISTEN_ADDRESS:-0.0.0.0:} - NGINX_LISTEN_OPTIONS=${NGINX_LISTEN_OPTIONS:-} - SERVER_APP_HOSTNAME=${SERVER_APP_HOSTNAME:-app} - APP_PORT=${APP_PORT:-3002} - SERVER_HOME_HOSTNAME=${SERVER_HOME_HOSTNAME:-home} - HOME_PORT=${HOME_PORT:-1444} - HOST=${ONEUPTIME_HOST:-localhost:7080} depends_on: - oneuptime # 2. OneUptime App-Core: Zentraler Backend- und API-Server oneuptime: image: oneuptime/app:${ONEUPTIME_VERSION:-release} container_name: oneuptime-master restart: ${RESTART_POLICY:-always} networks: default: aliases: - ${SERVER_APP_HOSTNAME:-app} environment: - CONTAINER_NAME=oneuptime - PORT=3002 - ENCRYPTION_SECRET=${ENCRYPTION_SECRET:-ein_sehr_sicheres_zufaelliges_passwort_123!} - APP_NAME=${APP_NAME:-OneUptime} - TZ=${TIMEZONE:-Europe/Berlin} # Routing-Parameter für das Ingress-Gateway - HOST=${ONEUPTIME_HOST:-localhost:7080} - HTTP_PROTOCOL=${ONEUPTIME_PROTOCOL:-http} - SERVER_APP_HOSTNAME=${SERVER_APP_HOSTNAME:-app} - APP_PORT=${APP_PORT:-3002} # 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:-release} container_name: oneuptime-probe restart: ${RESTART_POLICY:-always} environment: - TZ=${TIMEZONE:-Europe/Berlin} - ONEUPTIME_URL=http://${SERVER_APP_HOSTNAME:-app}:3002 - PROBE_ID=${PROBE_ID:-global-probe} - PROBE_KEY=${PROBE_KEY:-default-probe-key-12345!} depends_on: - oneuptime