jodal is het JOurnalistiek DAshboard Lokaal.
# clone the repo and chdir to there
cd backend && cp config.py.example config.py && cp config.yaml.example config.yaml
# Edit config.py and config.yaml accordingly to what you want
cd ../docker
docker-compose up -d
cd ..
./setup.sh
docker exec -it jodal_backend_1 ./manage.py scrapers locations
In development mode you can run ./bin/dev.sh
from the base directory, which will launch
the development environment.
To access the local development environment, add the following in /etc/hosts
:
127.0.0.1 api.jodal.nl users.jodal.nl www.jodal.nl app.jodal.nl
Then you can go to http://app.jodal.nl
preferably in a private window, because of HSTS parameters on the live setup.
- Go to
http://localhost:9011/
- Make an admin account
- Complete the steps on the main DAshboard
- Make an application (for example 'jodal')
1. Login ap config:
- Require an API key: Yes
- Generate Refresh Tokens: No
- Enable JWT refresh: No
- Passwordless: yes 2. Authentication tokens: no 3. JWT Enabled: Yes 4. Self serice registration:
- Enabled: Yes
- Require password confirmation: Yes
- Fields: 5. OAuth config:
- Require authentication: Yes
- Generate Refresh Tokens: Yes
- Logout URL: https://app.jodal.nl/
- Logout behavior: All applications
- Authorized origins: – Authorized redirects: https://api.jodal.nl/users/simple/callback, http://localhost:8080/api/2/sessions/callback, https://aleph.openstate.eu/api/2/sessions/callback
- Enabled grants: Authorization Code, Refresh Token 6. SAML:
- Enabled: No 7. Roles:
- Generate an api key for use with the jodal application
- Settings
- Cors: Enabled
- copy the client id and secret from the application to
backend/config.py
- copy the api key to
backend/config.py
- restart backend and api container
Open Overheidsdata uses Fabric for deployment. Run fab deploy
.
Open Overheidsdata uses alembic for migrations
docker exec jodal_backend_1 alembic upgrade head
docker exec jodal_backend_1 alembic downgrade -1
docker exec jodal_backend_1 alembic revision -m "create account table"
Open Overheidsdata runs several scrapers, in the jodal_backend_1
container. Run the floowing steps to get started:
docker exec jodal_backend_1 ./mana ge.py scrapers locations
docker exec jodal_backend_1 ./mana ge.py scrapers openspending -f 2021-01-01
docker exec jodal_backend_1 ./mana ge.py scrapers poliflw -f 2021-01-01
docker exec jodal_backend_1 ./mana ge.py scrapers obv -f 2021-01-01
Send an email to breyten@openstate.eu