Docker Guide¶
The docker file is based on build and compose and a bit of django hub
Build¶
The first time you use the docker image of trigger happy, launch this command to build the image.
This won’t be necessary for the next time
docker-compose build
Database update/create¶
This is necessary the first time, after building the docker image done above.
docker-compose run web python manage.py migrate --settings=django_th.settings_docker
docker-compose run web python manage.py loaddata initial_services --settings=django_th.settings_docker
docker-compose run web python manage.py createsuperuser --settings=django_th.settings_docker
This is necessary only when a new release of Trigger Happy is done
docker-compose run web python manage.py migrate --settings=django_th.settings_docker
Running tasks¶
2 tasks are usually in the crontab: one to read the data source, one to publish the grabbed data:
docker-compose run web python manage.py read --settings=django_th.settings_docker
docker-compose run web python manage.py publish --settings=django_th.settings_docker