Skip to content

Commit

Permalink
Add healthchecks
Browse files Browse the repository at this point in the history
  • Loading branch information
frafra committed Apr 17, 2022
1 parent 0e81cd0 commit e1568fd
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions contrib/docker/docker-compose.yml
Expand Up @@ -14,12 +14,13 @@ services:
container_name: ckan
build:
context: ../../
links:
- db
- solr
- redis
depends_on:
- db
db:
condition: service_healthy
solr:
condition: service_healthy
redis:
condition: service_healthy
ports:
- "0.0.0.0:${CKAN_PORT}:5000"
environment:
Expand All @@ -36,6 +37,8 @@ services:
- DS_RO_PASS=${DATASTORE_READONLY_PASSWORD}
- POSTGRES_HOST=${POSTGRES_HOST}
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:5000"]
# Debug with pdb (example) - Interact with `docker attach $(docker container ls -qf name=ckan)`
#command: 'python -m pdb /usr/lib/ckan/venv/bin/ckan --config /etc/ckan/production.ini run --host 0.0.0.0 --passthrough-errors'
#tty: true
Expand Down Expand Up @@ -76,8 +79,12 @@ services:
volumes:
- solr_data:/opt/solr/server/solr/ckan/data
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:8983/solr/"]

redis:
container_name: redis
image: redis:6.2
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "-e", "QUIT"]

0 comments on commit e1568fd

Please sign in to comment.