A small development environment can be started with docker. This consists of two containers, one for the database and one for the Flask-application. The Flask application auto-reloads its code when you edit files on your docker host.
- Create a config file:
cp instance/evalg_config.py.example.dev instance/evalg_config.py- Start the docker containers using docker-compose:
docker-compose -f docker-compose-evalg-dev.yaml up- :doc:`Initialize the database <database>`:
docker exec -it evalg_evalg_1 flask db migrate
docker exec -it evalg_evalg_1 flask db upgradeYou can run different :doc:`flask commands <flask-commands>` in the evalg
container using docker exec. If you e.g. want to start an ipython shell:
docker exec -it evalg_evalg_1 flask shellTip
Create an alias for running flask commands in the docker container: alias
docker-flask='docker exec -it evalg_evalg_1 flask'
If you should like to use psql:
docker exec -u postgres -it evalg_db_1 psqlTip
Create an alias for running psql in the docker container: alias
docker-psql='docker exec -u postgres -it evalg_db_1 psql'