Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add healthchecks for redis, memcached and postgres #975

Merged
merged 2 commits into from
Jun 2, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,22 @@ services:
memcached:
<<: *restart_policy
image: "memcached:1.5-alpine"
healthcheck:
# From: https://stackoverflow.com/a/31877626/5155484
test: echo stats | nc 127.0.0.1 11211
interval: 2s
timeout: 3s
retries: 30
start_period: 3s
redis:
<<: *restart_policy
image: "redis:5.0-alpine"
healthcheck:
test: redis-cli ping
interval: 2s
timeout: 3s
retries: 30
start_period: 3s
volumes:
- "sentry-redis:/data"
ulimits:
Expand All @@ -71,6 +84,13 @@ services:
postgres:
<<: *restart_policy
image: "postgres:9.6"
healthcheck:
# Using default user "postgres" from sentry/sentry.conf.example.py or value of PING_USER if provided
test: ["CMD-SHELL", "pg_isready -U ${PING_USER:-postgres}"]
BYK marked this conversation as resolved.
Show resolved Hide resolved
interval: 2s
timeout: 3s
retries: 30
start_period: 10s
command: ["postgres", "-c", "wal_level=logical", "-c", "max_replication_slots=1", "-c", "max_wal_senders=1"]
environment:
POSTGRES_HOST_AUTH_METHOD: "trust"
Expand Down