Skip to content

Commit

Permalink
Add Solr reindexing command to .ahoy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCalvert committed Mar 19, 2024
1 parent dfddbb3 commit 6c61c6c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .ahoy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,14 @@ commands:
cmd: |
if [ -e "$@" ] ; then
docker compose -f $DOCKER_COMPOSE exec -T $POSTGRESQL_CONTAINER_NAME sh -c 'pg_restore -U $CKAN_DB_USER -d $CKAN_DB --clean --if-exists -v --no-owner --no-privileges' < "$@"
ahoy reindex-solr
else echo "Provided sql file" "$@" "does not exist"
fi
reindex-solr:
usage: Re-runs the Solr index, e.g. after running `db-import` command
cmd: ahoy run "ckan search-index rebuild"

db-dump:
usage: Dump data out into a file. `ahoy db-dump local.dump`
cmd: docker compose -f $DOCKER_COMPOSE exec -T $POSTGRESQL_CONTAINER_NAME sh -c 'pg_dump -U $CKAN_DB_USER -d $CKAN_DB --format=custom -v' > "$@"
Expand Down

0 comments on commit 6c61c6c

Please sign in to comment.