Getting started¶
The project is developed in Python using the Django framework. There are 3 sections below, focussing on developers, running the project using Docker and hints for running the project in production.
Installation¶
Prerequisites¶
You need the following libraries and/or programs:
Python 3.7 or above
Python Virtualenv and Pip
PostgreSQL 10 or above, with the PostGIS-extension
Getting started¶
Developers can follow the following steps to set up the project on their local development machine.
Navigate to the location where you want to place your project.
Get the code:
$ git clone git@github.com:open-zaak/open-zaak.git $ cd open-zaak
Install all required libraries:
$ virtualenv env $ source env/bin/activate $ pip install -r requirements/dev.txt
Install the front-end CLI tool gulp if you’ve never installed them before and install the frontend libraries:
$ npm install $ npm run build
Activate your virtual environment and create the statics and database:
$ source env/bin/activate $ python src/manage.py migrate
Create a superuser to access the management interface:
$ python src/manage.py createsuperuser
You can now run your installation and point your browser to the address given by this command:
$ python src/manage.py runserver
Note: If you are making local, machine specific, changes, add them to
src/openzaak/conf/includes/local.py
. You can also set certain common
variables in a local .env
file. You can base these files on the
example files included in the same directory.
Note: You can run watch-tasks to compile Sass to CSS and ECMA to JS
using npm run watch
. By default this will compile the files if they change.
Update installation¶
When updating an existing installation:
Activate the virtual environment:
$ cd open-zaak $ source env/bin/activate
Update the code and libraries:
$ git pull $ pip install -r requirements/dev.txt $ npm install $ npm run build
Update the statics and database:
$ python src/manage.py migrate
Configuration via environment variables¶
A number of common settings/configurations can be modified by setting
environment variables, add them to your .env
file or persist them in
src/openzaak/conf/includes/local.py
.
SECRET_KEY
: the secret key to use. A default is set indev.py
DB_NAME
: name of the database for the project. Defaults toopen-zaak
.DB_USER
: username to connect to the database with. Defaults toopen-zaak
.DB_PASSWORD
: password to use to connect to the database. Defaults toopen-zaak
.DB_HOST
: database host. Defaults tolocalhost
DB_PORT
: database port. Defaults to5432
.SENTRY_DSN
: the DSN of the project in Sentry. If set, enabled Sentry SDK as logger and will send errors/logging to Sentry. If unset, Sentry SDK will be disabled.
Settings¶
All settings for the project can be found in
src/openzaak/conf
.
The file includes/local.py
overwrites settings from the base configuration,
and is only loaded for the dev settings.