Merge branch 'ckan-master' into ckan-2.9.11

This commit is contained in:
mnjnz 2024-04-27 18:08:55 +02:00
commit cbdf78e3f2
No known key found for this signature in database
GPG Key ID: 2654E8DA034EB7B5
2 changed files with 57 additions and 21 deletions

View File

@ -204,6 +204,7 @@ To start the containers:
docker compose -f docker-compose.dev.yml up
See [CKAN images](#5-ckan-images) for more details of what happens when using development mode.
See [CKAN images](#5-ckan-images) for more details of what happens when using development mode.
#### Create an extension
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:
@ -215,19 +216,24 @@ You can use the ckan [extension](https://docs.ckan.org/en/latest/extensions/tuto
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. You might need to change the owner of its folder to have the appropiate permissions.
#### 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:
```
```
USE_HTTPS_FOR_DEV=true
```
```
and update the site URL setting:
```
```
CKAN_SITE_URL=https://localhost:5000
```
```
After recreating the `ckan-dev` container, you should be able to access CKAN at https://localhost:5000

View File

@ -4,6 +4,7 @@ volumes:
pg_data:
solr_data:
services:
nginx:
build:
@ -14,8 +15,8 @@ services:
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
max-size: "100m"
max-file: "10"
networks:
- webnet
- ckannet
@ -24,7 +25,7 @@ services:
ports:
- "0.0.0.0:${NGINX_PORT_HOST}:${NGINX_PORT}"
- "0.0.0.0:${NGINX_SSLPORT_HOST}:${NGINX_SSLPORT}"
ckan:
build:
context: ckan/
@ -41,8 +42,8 @@ services:
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
max-size: "100m"
max-file: "10"
depends_on:
- db
- solr
@ -53,7 +54,14 @@ services:
- /usr/lib/python3.9/site-packages
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:${CKAN_PORT}"]
test:
[
"CMD",
"wget",
"-qO",
"/dev/null",
"http://localhost:${CKAN_PORT}"
]
pycsw:
build:
@ -64,12 +72,19 @@ services:
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
max-size: "100m"
max-file: "10"
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:5000"]
test:
[
"CMD",
"wget",
"-qO",
"/dev/null",
"http://localhost:5000"
]
db:
build:
context: postgresql/
@ -90,12 +105,20 @@ services:
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
max-size: "100m"
max-file: "10"
restart: unless-stopped
healthcheck:
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}", "-d", "${POSTGRES_DB}"]
test:
[
"CMD",
"pg_isready",
"-U",
"${POSTGRES_USER}",
"-d",
"${POSTGRES_DB}"
]
solr:
build:
context: solr/
@ -107,27 +130,34 @@ services:
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
max-size: "100m"
max-file: "10"
volumes:
- solr_data:/var/solr
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:${SOLR_PORT}/solr/"]
test:
[
"CMD",
"wget",
"-qO",
"/dev/null",
"http://localhost:${SOLR_PORT}/solr/"
]
redis:
image: redis:${REDIS_VERSION}
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
max-size: "100m"
max-file: "10"
networks:
- redisnet
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "-e", "QUIT"]
test: [ "CMD", "redis-cli", "-e", "QUIT" ]
networks:
webnet:
ckannet: