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

Added healthchecks! #10

Merged
merged 1 commit into from
Aug 29, 2023
Merged
Changes from all commits
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
50 changes: 37 additions & 13 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,36 @@ services:
- SAGA_DB_COLLECTION=saga
- SENTRY_DSN=sample_dsn
- SENTRY_ENV=local
volumes:
- ./coverage:/project/coverage
networks:
- python_service_network
volumes:
- ./coverage:/project/coverage
depends_on:
- redis
- mongo
- neo4j
- rabbitmq
mongo:
condition: service_healthy
neo4j:
condition: service_healthy
rabbitmq:
condition: service_healthy
redis:
condition: service_healthy
redis:
image: "redis:7.0.12-alpine"
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
networks:
- python_service_network
mongo:
image: "mongo:6.0.8"
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=pass
networks:
- python_service_network
rabbitmq:
image: "rabbitmq:3-management-alpine"
environment:
- RABBITMQ_DEFAULT_USER=root
- RABBITMQ_DEFAULT_PASS=pass
healthcheck:
test: echo 'db.stats().ok' | mongosh localhost:27017/test --quiet
interval: 60s
timeout: 10s
retries: 2
start_period: 40s
networks:
- python_service_network
neo4j:
Expand All @@ -62,6 +67,25 @@ services:
- NEO4J_AUTH=neo4j/password
- NEO4J_PLUGINS=["apoc", "graph-data-science"]
- NEO4J_dbms_security_procedures_unrestricted=apoc.*,gds.*
healthcheck:
test: ["CMD" ,"wget", "http://localhost:7474"]
interval: 1m30s
timeout: 10s
retries: 2
start_period: 40s
networks:
- python_service_network
rabbitmq:
image: "rabbitmq:3-management-alpine"
environment:
- RABBITMQ_DEFAULT_USER=root
- RABBITMQ_DEFAULT_PASS=pass
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 30s
timeout: 30s
retries: 2
start_period: 40s
networks:
- python_service_network

Expand Down