Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ckan-2.9.11 #126

Merged
merged 19 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand Down
37 changes: 19 additions & 18 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ volumes:
pg_data:
solr_data:


services:
nginx:
build:
Expand All @@ -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
Expand All @@ -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/
Expand All @@ -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
Expand All @@ -64,12 +65,12 @@ 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"]

db:
build:
context: postgresql/
Expand All @@ -90,12 +91,12 @@ 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}"]

solr:
build:
context: solr/
Expand All @@ -107,27 +108,27 @@ 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:8983/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:
Expand Down
Loading