./resources/setup.sh
It will initialize the password of the db in resources/local.ini and then the db in /opt/dcpad/
To change the folder, edit docker-compose.yml. For testing purpose you can set it to /tmp/dcpad/.
docker-compose up --build [-d]
If you want to run the webserver with a python manage runserver.py
, like during your development, you need to have access to the db. To do so start the database:
docker-compose run db
and then in your terminal:
python manage runserver.py
The ip of the database is found thanks to get_db_ip, if you encounter any problem feel free to fix it and do a PR !
You can use django to server the project:
docker-compose run web django
which is a shortcut for
docker-compose run web python manage.py runserver 0.0.0.0:80
It will be served at http://172.18.0.3
You can use gunicorn to serve in https the project:
docker-compose run web gunicorn
It will serve in https using the certs specified in default.ini/local.ini
It will be served at https://172.18.0.3
You can enter the container by typing
docker-compose run web bash
You can enter the container by typing
docker-compose run db