Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
c68e5fe
Update compose files
kowh-ai Aug 1, 2024
26dd5bd
Update docker-compose.yml
kowh-ai Aug 14, 2024
8cec49d
Fixing broken link....
jduckles Sep 1, 2024
bf6d751
Merge pull request #169 from jduckles/patch-1
kowh-ai Sep 2, 2024
56d492d
Update Dockerfile and Dockerfile.dev
kowh-ai Sep 9, 2024
6a6afb1
default config for 100MB uploads
wardi Oct 8, 2024
b462bec
add warning, remove image of text
wardi Oct 8, 2024
7d271b5
remove old datapusher options
wardi Oct 9, 2024
39727d9
Merge pull request #175 from ckan/readme-warning
kowh-ai Oct 9, 2024
ce81191
Merge pull request #174 from ckan/max-file-size
kowh-ai Oct 9, 2024
88f9356
fix example extension ownership command, remove image
wardi Oct 9, 2024
01a91ea
Merge pull request #178 from ckan/fix-extension-ownership
kowh-ai Oct 10, 2024
fbef360
Merge branch 'master' into Update-healthcheck-to-Docker-Compose
kowh-ai Oct 11, 2024
f62ff0c
Merge pull request #164 from ckan/Update-healthcheck-to-Docker-Compose
kowh-ai Oct 11, 2024
32dd69c
Merge pull request #176 from ckan/old-datapusher-options
kowh-ai Oct 11, 2024
6573174
Merge branch 'master' into minimise-root-user
kowh-ai Oct 13, 2024
b33d0b9
Update docker-compose.dev.yml
kowh-ai Oct 13, 2024
e906e1f
Merge branch 'master' into minimise-root-user
kowh-ai Oct 13, 2024
fc0dc34
add new error.html file
Oct 14, 2024
e1a9023
Merge pull request #179 from Nisha1293/ckan-docker-issue/177
kowh-ai Oct 15, 2024
ec2a680
Cache correct paths for new images
wardi Nov 7, 2024
4b9e581
update readme for create and install extension commands
wardi Nov 8, 2024
a870d3a
last commit
kowh-ai Nov 13, 2024
d2d856d
Merge pull request #172 from ckan/minimise-root-user
kowh-ai Nov 13, 2024
7c3fb39
update instructions, cache dir for VS Code debugging
wardi Dec 4, 2024
31e39c8
Merge pull request #194 from ckan/debugpy-fix
kowh-ai Dec 12, 2024
faa3234
commands for working with dev
wardi Dec 16, 2024
d9a3540
fix for macOS
wardi Dec 18, 2024
00a1890
Merge pull request #198 from ckan/dev-bin-scripts
kowh-ai Dec 19, 2024
0ef9c57
reload command
wardi Dec 23, 2024
8a48701
add bin scripts to README
wardi Dec 24, 2024
7f58627
Merge pull request #202 from ckan/dev-bin-scripts
kowh-ai Jan 6, 2025
c42f381
small updates for the README
wardi Jan 7, 2025
fdb31a1
Merge pull request #204 from ckan/small-readme-updates
kowh-ai Jan 9, 2025
f2cc124
Update Dockerfile
kowh-ai Mar 20, 2025
6b644db
Update .env.example
kowh-ai Apr 8, 2025
6decd3c
Merge pull request #212 from ckan/bump-datapusher-to-0.0.21
kowh-ai Apr 8, 2025
05ad04a
Update to postgres:16-alpine
kowh-ai Apr 9, 2025
3c05e56
Merge pull request #208 from ckan/bump-postgres-to-v14
kowh-ai Apr 9, 2025
fd530da
Add documentation for for new uWSGI env var configs
BWibo Apr 24, 2025
4f0b303
Add link to base image
BWibo Apr 24, 2025
fc90a89
Merge pull request #215 from BWibo/uwsgi-opts
amercader May 7, 2025
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
5 changes: 2 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ CKAN_SMTP_STARTTLS=True
CKAN_SMTP_USER=user
CKAN_SMTP_PASSWORD=pass
CKAN_SMTP_MAIL_FROM=ckan@localhost
CKAN_MAX_UPLOAD_SIZE_MB=100
TZ=UTC

# Solr
Expand All @@ -56,11 +57,9 @@ CKAN_REDIS_URL=redis://redis:6379/1
TEST_CKAN_REDIS_URL=redis://redis:6379/1

# Datapusher
DATAPUSHER_VERSION=0.0.20
DATAPUSHER_VERSION=0.0.21
CKAN_DATAPUSHER_URL=http://datapusher:8800
CKAN__DATAPUSHER__CALLBACK_URL_BASE=http://ckan:5000
DATAPUSHER_REWRITE_RESOURCES=True
DATAPUSHER_REWRITE_URL=http://ckan:5000

# NGINX
NGINX_PORT=80
Expand Down
163 changes: 107 additions & 56 deletions README.md

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions bin/ckan
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -e
ROOT="$(dirname ${BASH_SOURCE[0]})/.."

docker compose -f "${ROOT}/docker-compose.dev.yml" exec ckan-dev ckan "$@"
6 changes: 6 additions & 0 deletions bin/compose
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -e
ROOT="$(dirname ${BASH_SOURCE[0]})/.."

docker compose -f "${ROOT}/docker-compose.dev.yml" "$@"
14 changes: 14 additions & 0 deletions bin/generate_extension
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

set -e
ROOT="$(dirname ${BASH_SOURCE[0]})/.."
if [[ "$(uname)" == "Darwin" ]]; then
# macOS
USERGROUP="$(stat -f '%u:%g' "${ROOT}/src")"
else
USERGROUP="$(stat -c '%u:%g' "${ROOT}/src")"
fi

docker compose -f "${ROOT}/docker-compose.dev.yml" exec -u "$USERGROUP" \
-e HOME=/srv/app/src_extensions ckan-dev ckan generate extension \
--output-dir /srv/app/src_extensions
6 changes: 6 additions & 0 deletions bin/install_src
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -e
ROOT="$(dirname ${BASH_SOURCE[0]})/.."

docker compose -f "${ROOT}/docker-compose.dev.yml" run -u root ckan-dev ./install_src.sh
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[^/]*'"'"')'
6 changes: 6 additions & 0 deletions bin/restart
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -e
ROOT="$(dirname ${BASH_SOURCE[0]})/.."

docker compose -f "${ROOT}/docker-compose.dev.yml" restart ckan-dev
6 changes: 6 additions & 0 deletions bin/shell
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -e
ROOT="$(dirname ${BASH_SOURCE[0]})/.."

docker compose -f "${ROOT}/docker-compose.dev.yml" exec ckan-dev bash "$@"
8 changes: 5 additions & 3 deletions ckan/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
FROM ckan/ckan-base:2.11.0
FROM ckan/ckan-base:2.11

# Install any extensions needed by your CKAN instance
# See Dockerfile.dev for more details and examples

# Copy custom initialization scripts
COPY docker-entrypoint.d/* /docker-entrypoint.d/
COPY --chown=ckan-sys:ckan-sys docker-entrypoint.d/* /docker-entrypoint.d/

# Apply any patches needed to CKAN core or any of the built extensions (not the
# runtime mounted ones)
COPY patches ${APP_DIR}/patches
COPY --chown=ckan-sys:ckan-sys patches ${APP_DIR}/patches

USER ckan

RUN for d in $APP_DIR/patches/*; do \
if [ -d $d ]; then \
Expand Down
8 changes: 5 additions & 3 deletions ckan/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ckan/ckan-dev:2.11.0
FROM ckan/ckan-dev:2.11

# Install any extensions needed by your CKAN instance
# - Make sure to add the plugins to CKAN__PLUGINS in the .env file
Expand Down Expand Up @@ -35,11 +35,13 @@ FROM ckan/ckan-dev:2.11.0
# to get them mounted in this image at runtime

# Copy custom initialization scripts
COPY docker-entrypoint.d/* /docker-entrypoint.d/
COPY --chown=ckan-sys:ckan-sys docker-entrypoint.d/* /docker-entrypoint.d/

# Apply any patches needed to CKAN core or any of the built extensions (not the
# runtime mounted ones)
COPY patches ${APP_DIR}/patches
COPY --chown=ckan-sys:ckan-sys patches ${APP_DIR}/patches

USER ckan

RUN for d in $APP_DIR/patches/*; do \
if [ -d $d ]; then \
Expand Down
14 changes: 11 additions & 3 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ volumes:
solr_data:
pip_cache:
site_packages:
vscode_server:
local_bin:
home_dir:

services:

Expand All @@ -26,17 +27,24 @@ services:
- ckan_storage:/var/lib/ckan
- ./src:/srv/app/src_extensions
- pip_cache:/root/.cache/pip
- site_packages:/usr/lib/python3.10/site-packages
- vscode_server:/root/.vscode-server
- site_packages:/usr/local/lib/python3.10/site-packages
- local_bin:/usr/local/bin
- home_dir:/srv/app/
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:5000"]
interval: 60s
timeout: 10s
retries: 3

datapusher:
image: ckan/ckan-base-datapusher:${DATAPUSHER_VERSION}
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:8800"]
interval: 60s
timeout: 10s
retries: 3

db:
build:
Expand Down
8 changes: 7 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ services:
- site_packages:/usr/lib/python3.10/site-packages
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:5000"]
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:5000/api/action/status_show"]
interval: 60s
timeout: 10s
retries: 3

datapusher:
networks:
Expand All @@ -56,6 +59,9 @@ services:
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:8800"]
interval: 60s
timeout: 10s
retries: 3

db:
build:
Expand Down
3 changes: 2 additions & 1 deletion nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ RUN apk update --no-cache && \

COPY setup/nginx.conf ${NGINX_DIR}/nginx.conf
COPY setup/index.html /usr/share/nginx/html/index.html
COPY setup/error.html /usr/share/nginx/html/error.html
COPY setup/default.conf ${NGINX_DIR}/conf.d/

RUN mkdir -p ${NGINX_DIR}/certs
Expand All @@ -20,4 +21,4 @@ ENTRYPOINT \
-keyout ${NGINX_DIR}/certs/ckan-local.key \
-out ${NGINX_DIR}/certs/ckan-local.crt \
-days 365 && \
nginx -g 'daemon off;'
nginx -g 'daemon off;'
12 changes: 12 additions & 0 deletions nginx/setup/error.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Error</title>
</head>
<body>
<h1>Oops! Something went wrong.</h1>
<p>We're sorry, but the page you requested could not be found.</p>
</body>
</html>
4 changes: 3 additions & 1 deletion nginx/setup/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ http {

# Enable gzip encryption
gzip on;

proxy_cache_path /tmp/nginx_cache levels=1:2 keys_zone=cache:30m max_size=250m;
proxy_temp_path /tmp/nginx_proxy 1 2;

client_max_body_size 140M;

include /etc/nginx/conf.d/*.conf;

# Error status text
Expand Down
2 changes: 1 addition & 1 deletion postgresql/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM postgres:12-alpine
FROM postgres:16-alpine

# Include extra setup scripts (eg datastore)
COPY --chown=postgres:postgres docker-entrypoint-initdb.d /docker-entrypoint-initdb.d
Empty file added src/.placeholder
Empty file.