Skip to content

Commit

Permalink
Merge pull request #202 from ckan/dev-bin-scripts
Browse files Browse the repository at this point in the history
Add reload bin script, list scripts in README
  • Loading branch information
kowh-ai authored Jan 6, 2025
2 parents 00a1890 + 8a48701 commit 7f58627
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,16 @@ Use this mode if you are making code changes to CKAN and either creating new ext

To develop local extensions use the `docker-compose.dev.yml` file with help from the scripts under `bin`:

dev script | description
--- | ---
`bin/ckan …` | exec `ckan` cli within the ckan-dev container
`bin/compose …` | dev docker compose commands
`bin/generate_extension` | generate extension in `src` directory
`bin/install_src` | install all extensions from `src` directory (ckan-dev does not need to be running)
`bin/reload` | reload ckan within the ckan-dev container without restarting
`bin/restart` | shut down and restart the whole ckan-dev container (loads new values from .env)
`bin/shell` | exec bash prompt within the ckan-dev container

To build the images:

bin/compose build
Expand Down
7 changes: 7 additions & 0 deletions bin/reload
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -e
ROOT="$(dirname ${BASH_SOURCE[0]})/.."

docker compose -f "${ROOT}/docker-compose.dev.yml" exec ckan-dev \
bash -c 'kill $(ls -l /proc/*/exe | grep bin/python | grep -Po '"'"'/proc/\K[^/]*'"'"')'

0 comments on commit 7f58627

Please sign in to comment.