short description of the project
- clone the repo
- change into the project's root directory e.g.
cd abcd-db
- create a virtual environment e.g.
virutalenv env
and activate itsource env/bin/activate
- install required packages
pip install -r requirements_dev.txt
- [to connect to a postgres-db called
abcd_db
with user/passwordpostgres
runsource source set_env_variables.sh
] (this will set environment variables declared in `env.default) - run migrations
python manage.py migrate
- start the dev sever
python manage.py runserver
- go to http://127.0.0.1:8000 and check if everything works
- run
python manage.py import_abcd_data
(this script processes data from the gsheets Bruckner_DB_20220204 and Literatur_DB_20220204)
- install spacy
- install needed spacy model
python -m spacy download de_core_news_lg
- run
python manage.py import_ners
At the ACDH-CH we use a centralized database-server. So instead of spawning a database for each service our services are talking to a database on this centralized db-server. This setup is reflected in the dockerized setting as well, meaning it expects an already existing database (either on your host, e.g. accessible via 'localhost' or some remote one)
docker build -t abcd:latest .
docker build -t abcd:latest --no-cache .
To run the image you should provide an .env
file to pass in needed environment variables; see example below:
docker run -it -p 8020:8020 --rm --env-file env.default --name abcd abcd:latest
This project was bootstraped by djangobase-cookiecutter