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

Add reload bin script, list scripts in README #202

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
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[^/]*'"'"')'
Loading