Compare commits
No commits in common. "fc90a89227f432f58e7dcc80311dbeb1151ff90f" and "7f58627864a713abca115057dd6540b46039fde2" have entirely different histories.
fc90a89227
...
7f58627864
@ -57,7 +57,7 @@ CKAN_REDIS_URL=redis://redis:6379/1
|
||||
TEST_CKAN_REDIS_URL=redis://redis:6379/1
|
||||
|
||||
# Datapusher
|
||||
DATAPUSHER_VERSION=0.0.21
|
||||
DATAPUSHER_VERSION=0.0.20
|
||||
CKAN_DATAPUSHER_URL=http://datapusher:8800
|
||||
CKAN__DATAPUSHER__CALLBACK_URL_BASE=http://ckan:5000
|
||||
|
||||
|
||||
78
README.md
78
README.md
@ -1,30 +1,27 @@
|
||||
# Docker Compose setup for CKAN
|
||||
|
||||
|
||||
- [Docker Compose setup for CKAN](#docker-compose-setup-for-ckan)
|
||||
- [1. Overview](#1--overview)
|
||||
- [2. Installing Docker](#2--installing-docker)
|
||||
- [3. docker compose *vs* docker-compose](#3--docker-compose-vs-docker-compose)
|
||||
- [4. Install (build and run) CKAN plus dependencies](#4--install-build-and-run-ckan-plus-dependencies)
|
||||
- [Base mode](#base-mode)
|
||||
- [Development mode](#development-mode)
|
||||
- [Create an extension](#create-an-extension)
|
||||
- [Running HTTPS on development mode](#running-https-on-development-mode)
|
||||
- [Remote Debugging with VS Code](#remote-debugging-with-vs-code)
|
||||
- [Updating the environment file for development mode](#updating-the-environment-file-for-development-mode)
|
||||
- [5. CKAN images](#5-ckan-images)
|
||||
- [Extending the base images](#extending-the-base-images)
|
||||
- [Applying patches](#applying-patches)
|
||||
- [_uWSGI_ command line arguments](#uwsgi-command-line-arguments)
|
||||
- [6. Debugging with pdb](#6-debugging-with-pdb)
|
||||
- [7. Datastore and datapusher](#7-datastore-and-datapusher)
|
||||
- [8. NGINX](#8-nginx)
|
||||
- [9. ckanext-envvars](#9-ckanext-envvars)
|
||||
- [10. CKAN\_SITE\_URL](#10-ckan_site_url)
|
||||
- [11. Manage new users](#11-manage-new-users)
|
||||
- [12. Changing the base image](#12-changing-the-base-image)
|
||||
- [13. Replacing DataPusher with XLoader](#13-replacing-datapusher-with-xloader)
|
||||
- [Copying and License](#copying-and-license)
|
||||
* [1. Overview](#1-overview)
|
||||
* [2. Installing Docker](#2-installing-docker)
|
||||
* [3. docker compose vs docker-compose](#3-docker-compose-vs-docker-compose)
|
||||
* [4. Install (build and run) CKAN plus dependencies](#4-install-build-and-run-ckan-plus-dependencies)
|
||||
* [Base mode](#base-mode)
|
||||
* [Development mode](#development-mode)
|
||||
* [Create an extension](#create-an-extension)
|
||||
* [Running HTTPS on development mode](#running-https-on-development-mode)
|
||||
* [Remote Debugging with VS Code](#remote-debugging-with-vs-code)
|
||||
* [Updating the environment file for development mode](#updating-the-environment-file-for-development-mode)
|
||||
* [5. CKAN images](#5-ckan-images)
|
||||
* [Extending the base images](#extending-the-base-images)
|
||||
* [Applying patches](#applying-patches)
|
||||
* [6. Debugging with pdb](#6-debugging-with-pdb)
|
||||
* [7. Datastore and Datapusher](#7-datastore-and-datapusher)
|
||||
* [8. NGINX](#8-nginx)
|
||||
* [9. ckanext-envvars](#9-ckanext-envvars)
|
||||
* [10. CKAN_SITE_URL](#10-CKAN_SITE_URL)
|
||||
* [11. Manage new users](#11-manage-new-users)
|
||||
* [12. Changing the base image](#12-changing-the-base-image)
|
||||
* [13. Replacing DataPusher with XLoader](#13-replacing-datapusher-with-xLoader)
|
||||
|
||||
|
||||
## 1. Overview
|
||||
@ -108,7 +105,7 @@ dev script | description
|
||||
`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 (use `bin/compose up -d` instead to reload new values from .env)
|
||||
`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:
|
||||
@ -278,23 +275,9 @@ ckan
|
||||
├── setup
|
||||
├── Dockerfile
|
||||
└── Dockerfile.dev
|
||||
|
||||
```
|
||||
|
||||
### _uWSGI_ command line arguments
|
||||
|
||||
The images use the application server [_uWSGI_](https://uwsgi-docs.readthedocs.io/en/latest/) to run _CKAN_. There are two environment variables, that allow to configure _uWSGI_ using [command line arguments](https://uwsgi-docs.readthedocs.io/en/latest/Configuration.html#command-line-arguments). The available options are described [here](https://uwsgi-docs.readthedocs.io/en/latest/Options.html).
|
||||
|
||||
For most use cases, the defaults specified in `ckan-X.XX/setup/start_ckan.sh` in `DEFAULT_UWSGI_OPTS` of the [ckan/ckan-docker-base](https://github.com/ckan/ckan-docker-base) image are fine. If required, you can either _overwrite_ the defaults or _append_ additional arguments.
|
||||
|
||||
| Variable | Description | Defaults |
|
||||
|:--------------------|:------------------------------------------------------| :------------------|
|
||||
| `UWSGI_OPTS` | If set, overwrites `DEFAULT_UWSGI_OPTS`. If not set, `UWSGI_OPTS` will bet set to `DEFAULT_UWSGI_OPTS`. | unset |
|
||||
| `EXTRA_UWSGI_OPTS` | If set, appends its content to `UWSGI_OPTS`. | unset |
|
||||
|
||||
> [!IMPORTANT]
|
||||
> These setting **do not** apply for the dev images.
|
||||
|
||||
|
||||
## 6. Debugging with pdb
|
||||
|
||||
Add these lines to the `ckan-dev` service in the docker-compose.dev.yml file
|
||||
@ -350,18 +333,19 @@ For convenience the CKAN_SITE_URL parameter should be set in the .env file. For
|
||||
|
||||
1. Create a new user from the Docker host, for example to create a new user called 'admin'
|
||||
|
||||
`docker compose exec ckan ckan user add admin email=admin@localhost`
|
||||
|
||||
To set this user as a sysadmin run
|
||||
|
||||
`docker compose exec ckan ckan sysadmin add admin`
|
||||
`docker exec -it <container-id> ckan -c ckan.ini user add admin email=admin@localhost`
|
||||
|
||||
To delete the 'admin' user
|
||||
|
||||
`docker compose exec ckan ckan user remove admin`
|
||||
`docker exec -it <container-id> ckan -c ckan.ini user remove admin`
|
||||
|
||||
In development mode use `bin/ckan` instead of `docker compose exec ckan ckan` for the above commands.
|
||||
2. Create a new user from within the ckan container. You will need to get a session on the running container
|
||||
|
||||
`ckan -c ckan.ini user add admin email=admin@localhost`
|
||||
|
||||
To delete the 'admin' user
|
||||
|
||||
`ckan -c ckan.ini user remove admin`
|
||||
|
||||
## 12. Changing the base image
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
FROM postgres:16-alpine
|
||||
FROM postgres:12-alpine
|
||||
|
||||
# Include extra setup scripts (eg datastore)
|
||||
COPY --chown=postgres:postgres docker-entrypoint-initdb.d /docker-entrypoint-initdb.d
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user