name: uptimesebi services: timescaledb: image: timescale/timescaledb:2.30.1-pg16 environment: POSTGRES_PASSWORD: postgres ports: ["5432:5432"] volumes: - pgdata:/var/lib/postgresql/data - ./deploy/dev/postgres-init.sql:/docker-entrypoint-initdb.d/10-uptime.sql:ro healthcheck: test: ["CMD", "pg_isready", "-U", "uptime", "-d", "uptime"] interval: 2s retries: 30 redis: image: redis:8-alpine ports: ["6379:6379"] healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 2s retries: 30 # Sentinel topology for HA testing: docker compose --profile sentinel up -d # Host networking keeps announced addresses reachable from the host. redis-primary: image: redis:8-alpine profiles: [sentinel] network_mode: host command: redis-server --port 6380 redis-replica: image: redis:8-alpine profiles: [sentinel] network_mode: host command: redis-server --port 6381 --replicaof 127.0.0.1 6380 sentinel-1: &sentinel image: redis:8-alpine profiles: [sentinel] network_mode: host entrypoint: ["sh", "-c", "cp /cfg/sentinel.conf /tmp/s.conf && exec redis-sentinel /tmp/s.conf --port $$PORT"] environment: {PORT: "26379"} volumes: [./deploy/dev/sentinel.conf:/cfg/sentinel.conf:ro] sentinel-2: <<: *sentinel environment: {PORT: "26380"} sentinel-3: <<: *sentinel environment: {PORT: "26381"} # Databases the database checks are tested against: # docker compose --profile checks up -d --wait mariadb: image: mariadb:11 profiles: [checks] environment: {MARIADB_ROOT_PASSWORD: checkpw, MARIADB_DATABASE: shop} ports: ["13306:3306"] healthcheck: test: ["CMD", "healthcheck.sh", "--connect"] interval: 2s retries: 60 mongo: image: mongo:8 profiles: [checks] environment: {MONGO_INITDB_ROOT_USERNAME: root, MONGO_INITDB_ROOT_PASSWORD: checkpw} ports: ["27018:27017"] healthcheck: test: ["CMD", "mongosh", "--quiet", "--eval", "db.runCommand({ping: 1})"] interval: 2s retries: 60 mssql: image: mcr.microsoft.com/mssql/server:2022-latest profiles: [checks] environment: {ACCEPT_EULA: "Y", MSSQL_SA_PASSWORD: "Check-pw-2026"} ports: ["11433:1433"] healthcheck: test: ["CMD-SHELL", "/opt/mssql-tools18/bin/sqlcmd -C -S localhost -U sa -P \"$$MSSQL_SA_PASSWORD\" -Q 'SELECT 1' || exit 1"] interval: 3s retries: 60 volumes: pgdata: