Skip to content

JVickery-TBS/ckan-docker

Repository files navigation

Docker Setup for CKAN Core

Prerequisites

  • WSL2 if using Windows
  • Docker
  • docker-compose
  • Git
    • You will also need your git configuration to be accessible to your user, located by default at ~/.gitconfig. This will be attached to the Docker container so that the build scripts can pull the repositories.
    • If using WSL2, you will need to have this config set up inside of WSL2 for your WSL2 user.

Pre-Build

  1. Make mkdir nginx postgres redis solr ckan
  2. Copy cp .env_example .env
  3. Change USER_ID in .env to your local uid
  4. Change GROUP_ID in .env to your local gid
  5. Copy cp registry_example.ini registry.ini
  6. Copy cp registry_example.ini registry_test.ini
  7. Change ckanext.cloudstorage.container_name in registry.ini and registry_test.ini value to <your user name>-dev
  8. Change ckanext.cloudstorage.driver_options in registry.ini and registry_test.ini secret value to the secret key for opencanadastaging
  9. Change sqlalchemy.url, ckan.datastore.write_url, ckan.datastore.read_url, ckanext.xloader.jobs_db.uri in registry_test.ini to the test databases(__test)

Build

  1. Build the container: docker-compose build
    • The initial build will take a long time.
    • If you are rebuilding and receive errors such as max depth exceeded, you may need to destroy all of the docker images (docker image prune -a) and then run the above build command. Please note that this will also destroy any other docker images you have on your machine.
    • If your build fails with errors regarding failure of resolving domains, restart your docker service (sudo service docker restart).
  2. Bring up the app and detach the shell: docker-compose up -d to make sure that all the containers can start correctly.
    • The initial up may take a long time.
    • To stop all the containers: docker-compose down

Installation

Databases

  1. Bring up the CKAN Registry docker container: docker-compose up -d ckan-devm
  2. Run the install script in the docker container: docker-compose exec ckan-devm ./fix-databases.sh

CKAN

  1. Bring up the CKAN Registry docker container: docker-compose up -d ckan-devm
  2. Run the install script in the docker container: docker-compose exec ckan-devm ./install-ckan.sh

Usage

CKAN

  1. Bring up the CKAN Registry docker container: docker-compose up -d ckan-devm
  2. Open a browser into: http://localhost:5009
    1. Login here: http://localhost:5009/en/user/login
      1. Normal User:
        1. Username: user_local
        2. Password: 12345678
      2. Sys Admin User:
        1. Username: admin_local
        2. Password: 12345678

About

Docker setup for CKAN core

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published