Merge pull request #202 from ckan/dev-bin-scripts

Add reload bin script, list scripts in README
This commit is contained in:
Brett Jones 2025-01-06 14:25:38 +01:00 committed by GitHub
commit 7f58627864
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 17 additions and 0 deletions

View File

@ -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

7
bin/reload Executable file
View File

@ -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[^/]*'"'"')'