CKAN Project with Repository-Based Configuration and Custom Frontend
This project is a Dockerized CKAN 2.10+ instance with a custom Next.js frontend designed for repository-based configuration. It follows Infrastructure as Code principles, where the entire portal state is defined by the files in this repository.
Features
- CKAN 2.10+: Core CKAN platform.
- Next.js Frontend: Custom React-based interface (Data4OOV Catalog).
- Dockerized Architecture: Simplified setup using Docker Compose.
- Extensions Included:
ckanext-spatial: Geospatial capabilities.ckanext-harvest: Framework for harvesting datasets from other sources.
- Environment Driven: Configuration via environment variables and a base
ckan.ini.
Project Structure
frontend/: Next.js frontend application source code.docker-compose.yml: Definesfrontend,ckan,db (PostgreSQL),solr,redis, and some demotensorflow stuffservices.ckan.ini: Base configuration file with environment variable placeholders..env.example: Template for environment variables.requirements.txt: Python dependencies for CKAN and extensions.
Prerequisites
This project utilizes a Nix Flake and direnv to provide a consistent development environment across all services.
❄️ Nix Managed (Automatic)
These tools are automatically provided by the project's shell:
- Node.js (v24) & Yarn
- Python (v3.11) & Ruff
- Docker CLI & Docker Compose
🛠 Manual Installations
These tools must be installed manually on your system:
- Nix: For package management.
- direnv: For automatic environment switching.
- Docker Desktop (or OrbStack): Required to run the containers on macOS.
- Antigravity AI: The AI coding assistant for this repository.
Quick Start
Follow these steps to set up the project:
1. Initialize the Development Environment
Once Nix and Direnv are installed, cd into the project root and allow the environment:
direnv allowThis will automatically load Node 24, Yarn, Python 3.11, and the Docker CLI into your shell.
2. Configure Environment Variables
Copy the example environment file and adjust any settings if necessary (the defaults are usually fine for local development):
cp .env.example .env3. Build and Start the Services
Use Docker Compose to build the custom CKAN image and start all services, examples:
docker compose up
docker compose up --build
docker compose up frontend --force-recreate --build4. Initialize the Database and Automated Setup
You can initialize/bootstrap ckan using the following command:
docker compose exec ckan python3 /srv/app/ckan-init.pyDefault Admin Credentials:
- User:
admin - Password:
password - Email:
[email protected]
These can be adjusted through env variables.
5. Access the Portal
The services will be available at:
- Frontend: http://localhost:3000 If not using the container, check
./frontend - CKAN Backend: http://localhost:4000
Infrastructure as Code: Configuring the Portal
The state of the portal (organizations, groups, datasets, and harvesters) is defined in ckan-config.yaml. This follows IaC principles, and the configuration is automatically applied when the CKAN container starts.
1. Define your configuration
Edit ckan/ckan-config.yaml to include the entities you want to create:
2. Apply changes
If you update ckan-config.yaml while the container is running, make sure you rerun:
docker compose exec ckan python3 /srv/app/ckan-init.pyTo run Harvester see ckanext-harvester
docker compose exec ckan ckan --config=/srv/app/ckan.ini harvester gather-consumer
docker compose exec ckan ckan --config=/srv/app/ckan.ini harvester fetch-consumer
docker compose exec ckan ckan --config=/srv/app/ckan.ini harvester runCommon Commands
- Stop services:
docker compose stop - View logs:
docker compose logs -f ckan - Restart a service:
docker compose restart ckan - Run CKAN CLI commands:
docker compose exec ckan ckan -c /srv/app/ckan.ini <command>
Configuration
Most configuration settings can be managed via the .env file. These variables are passed to the ckan.ini file using placeholders like ${CKAN_SITE_URL}.

