This repository includes the CKAN theme used by data.codefordc.org as well any custom pages used by the site.
- Docker for your operating system
Cloning the repository
First, you'll need to fork this repository and clone it onto your computer. To fork it, click "Fork" in the upper-right corner of this page. You can then clone your fork using one of these two methods:
- in the terminal, navigate to whatever directory you want the repository to be cloned into and run
git clone https://github.com/<username>/opendatadc(replace
<username>with your GitHub username)
- inside of GitHub Desktop, go to File > Clone Repository and then choose where to clone the repo to
This is the only time you will need to do this step. In future development sessions, you can just run the steps in the "Getting started" section.
This project uses docker to speed up on boarding and make it easier to maintain.
Up and Down
Sometimes its convenient to start the application without taking up a terminal window. To do so, run
docker-compose up -d; the application will now start in the background and will be avaible at
localhost (might take a few minutes to start up). Now run:
docker-compose ps and you should see the running containers
Setting up Admin account
docker-compose exec ckan ckan-paster --plugin=ckan sysadmin add admin email=admin@admin -c /etc/ckan/default/ckan.ini
Setting up test-data
Very basic test data can be setup; alternatively sets can be exported from the real site and uploaded to your local one.
To set up test data run:
docker-compose exec ckan ckan-paster --plugin=ckan create-test-data -c /etc/ckan/default/ckan.ini
Changes to Python files will require the CKAN container to be restarted. To do so run
docker-compose restart ckan.
SASS is used to create and maintain styles for the theme in order to compile the styles run
sass ckanext/open_data_dc/fanstatic/open_data_dc.scss ckanext/open_data_dc/fanstatic/open_data_dc.css
Is a very large subject and the best way to get started is to read the CKAN documents
Feel free to contribute here or join us on Waffle.io
Deploying a new version
- Login to the remote production machine through ssh
docker-compose rm ckan
docker-compose up -d
This needs to get run when solr is updated
docker-compose exec ckan ckan-paster --plugin=ckan search-index rebuild -c /etc/ckan/default/ckan.ini
Note: running this might require a restart via
docker-compose restart ckan