update readme for create and install extension commands

This commit is contained in:
Ian Ward 2024-11-07 20:44:59 -05:00
parent ec2a680ba5
commit 4b9e58155b

View File

@ -102,6 +102,10 @@ To build the images:
docker compose -f docker-compose.dev.yml build docker compose -f docker-compose.dev.yml build
To install extensions from the `src` directory:
docker compose -f docker-compose.dev.yml run -u root ckan-dev ./install_src.sh
To start the containers: To start the containers:
docker compose -f docker-compose.dev.yml up docker compose -f docker-compose.dev.yml up
@ -114,7 +118,7 @@ See [CKAN images](#5-ckan-images) for more details of what happens when using de
You can use the ckan [extension](https://docs.ckan.org/en/latest/extensions/tutorial.html#creating-a-new-extension) instructions to create a CKAN extension, only executing the command inside the CKAN container and setting the mounted `src/` folder as output: You can use the ckan [extension](https://docs.ckan.org/en/latest/extensions/tutorial.html#creating-a-new-extension) instructions to create a CKAN extension, only executing the command inside the CKAN container and setting the mounted `src/` folder as output:
```bash ```bash
docker compose -f docker-compose.dev.yml exec ckan-dev ckan generate extension --output-dir /srv/app/src_extensions docker compose -f docker-compose.dev.yml exec -u `stat -c '%u' src` -e HOME=/srv/app/src_extensions ckan-dev ckan generate extension --output-dir /srv/app/src_extensions
``` ```
``` ```
@ -131,12 +135,6 @@ Written: /srv/app/src_extensions/ckanext-mytheme
The new extension files and directories are created in the `/srv/app/src_extensions/` folder in the running container. They will also exist in the local src/ directory as local `/src` directory is mounted as `/srv/app/src_extensions/` on the ckan container. The new extension files and directories are created in the `/srv/app/src_extensions/` folder in the running container. They will also exist in the local src/ directory as local `/src` directory is mounted as `/srv/app/src_extensions/` on the ckan container.
The files will be owned by root, to correct the ownership so you can edit the files with your normal account outside the container run:
```bash
docker compose -f docker-compose.dev.yml exec ckan-dev chown --reference /srv/app/src_extensions/ -R /srv/app/src_extensions/ckanext-mytheme/
```
#### Running HTTPS on development mode #### Running HTTPS on development mode
Sometimes is useful to run your local development instance under HTTPS, for instance if you are using authentication extensions like [ckanext-saml2auth](https://github.com/keitaroinc/ckanext-saml2auth). To enable it, set the following in your `.env` file: Sometimes is useful to run your local development instance under HTTPS, for instance if you are using authentication extensions like [ckanext-saml2auth](https://github.com/keitaroinc/ckanext-saml2auth). To enable it, set the following in your `.env` file: