You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README-source.adoc
+43-1Lines changed: 43 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,4 +76,46 @@ See `.env.example` for a list of available environment variables.
76
76
* `nginx/`: Contains the Nginx Dockerfile and configuration files for serving CKAN over HTTPS.
77
77
* `ckan/`: Includes the CKAN Dockerfile, custom entrypoint scripts (in `docker-entrypoint.d`), patches, and setup scripts.
78
78
* `postgresql/`: Contains the Docker setup for PostgreSQL, including database initialization.
79
-
* `setup/`: Houses the initialization scripts that handle database setup, plugin configuration, Solr checks, and sysadmin creation.
79
+
* `setup/`: Houses the initialization scripts that handle database setup, plugin configuration, Solr checks, and sysadmin creation.
80
+
81
+
== Developing
82
+
In the following section, we show how changes can be made to the CKAN extension "ckanext-organisation-group" and how these are immediately visible in the running containers. The customisation of CSS classes in a template serves as an example. Before we can make the actual changes, we need to make some preparations:
83
+
84
+
=== 1) Clone the extension code next to CKAN Docker (`docker-ckan`)
85
+
To be able to make changes independently of CKAN, it makes sense to check out the extension alongside CKAN Docker. This makes it easy to commit changes to the extension without having to change CKAN Docker.
86
+
87
+
A typical directory might look like this:
88
+
```
89
+
drwxrwxrwx 6 alex 502 4096 Feb 17 18:17 ckanext-organization-group
90
+
drwxr-xr-x 5 alex alex 4096 Jan 20 08:45 ckanext-system-stats
91
+
drwxr-xr-x 5 alex alex 4096 Jan 23 10:52 ckanext-tif-imageview
92
+
drwxr-xr-x 5 alex alex 4096 Jan 20 16:46 ckanext-user-manual
93
+
drwxr-xr-x 7 alex alex 4096 Feb 17 16:05 docker-ckan
94
+
```
95
+
96
+
=== 2) Add a volume to `docker-compose.override.yaml`
97
+
Now we want to replace the code of the extension included in the container with the checked-out code. To do this, we use a so-called "volume" which is specified in `docker-compose.override.yaml`:
=== 3) Add a temporary startup script for the CKAN container
109
+
Add a startup script `ckan/docker-entrypoint.d/99_dev.sh` with the following content. This script ensures that the correct file permissions and ownership are set, and that the installation is complete:
Run `make build bash` to build and run the containers including the volume and the startup script. All changes to the extension code are now "mirrored" directly in the container and are generally visible immediately.
0 commit comments