networks: appnet: services: database: image: postgres:17 restart: unless-stopped env_file: - .env environment: POSTGRES_USER: ${DB_USER:-postgres} POSTGRES_PASSWORD: ${DB_PASS:-password} POSTGRES_DB: ${DB_NAME:-peekaping} volumes: - ./.data/postgres:/var/lib/postgresql/data networks: - appnet healthcheck: test: [ "CMD-SHELL", "pg_isready -U ${DB_USER:-postgres} -d ${DB_NAME:-peekaping}", ] interval: 30s timeout: 2s retries: 5 start_period: 5s redis: image: redis:7 restart: unless-stopped networks: - appnet healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 30s timeout: 2s retries: 5 start_period: 5s migrate: image: 0xfurai/peekaping-migrate:latest restart: "no" env_file: - .env depends_on: database: condition: service_healthy networks: - appnet api: image: 0xfurai/peekaping-api:latest restart: unless-stopped env_file: - .env depends_on: database: condition: service_healthy redis: condition: service_healthy networks: - appnet healthcheck: test: [ "CMD-SHELL", "wget -qO - http://localhost:8034/api/v1/health || exit 1", ] interval: 30s timeout: 2s retries: 5 start_period: 5s producer: image: 0xfurai/peekaping-producer:latest restart: unless-stopped env_file: - .env depends_on: database: condition: service_healthy redis: condition: service_healthy networks: - appnet worker: image: 0xfurai/peekaping-worker:latest restart: unless-stopped env_file: - .env depends_on: redis: condition: service_healthy networks: - appnet ingester: image: 0xfurai/peekaping-ingester:latest restart: unless-stopped env_file: - .env depends_on: database: condition: service_healthy redis: condition: service_healthy networks: - appnet web: image: 0xfurai/peekaping-web:latest depends_on: api: condition: service_healthy networks: - appnet healthcheck: test: ["CMD-SHELL", "curl -f http://localhost:80 || exit 1"] interval: 30s timeout: 2s retries: 5 start_period: 5s gateway: image: nginx:latest ports: - "8383:80" volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro depends_on: api: condition: service_healthy web: condition: service_healthy networks: - appnet healthcheck: test: ["CMD-SHELL", "curl -f http://localhost:80 || exit 1"] interval: 30s timeout: 2s retries: 5 start_period: 5s