Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
name: uptimesebi
|
|
|
|
services:
|
|
timescaledb:
|
|
image: timescale/timescaledb:2.30.1-pg16
|
|
environment:
|
|
POSTGRES_USER: uptime
|
|
POSTGRES_PASSWORD: uptime
|
|
POSTGRES_DB: uptime
|
|
ports: ["5432:5432"]
|
|
volumes: [pgdata:/var/lib/postgresql/data]
|
|
healthcheck:
|
|
test: ["CMD", "pg_isready", "-U", "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"}
|
|
|
|
volumes:
|
|
pgdata:
|