The DPNK django application was developed to power the Do Práce na Kole bike to work competition run by the non-profit Auto*mat organization in the Czech Republic. With some work, you can modify it to run your own bike to work competition in your home country.
This readme file is intended to document how to develop and deploy the code.
Do práce na kole is designed to use Python 3.4+ and Django 2.1
- Docker
$ git clone https://github.com/auto-mat/do-prace-na-kole.git
$ cd do-prace-na-kole
$ cp docker.env.sample docker.env
$ $EDITOR docker.env
$ make docker-compose
$ sudo docker-compose up
$ sudo docker exec -it dopracenakole_web_1 bash
# su test
$ ./setup.sh
And in another window launch the development webserver
$ sudo docker exec -it dopracenakole_web_1 bash
$ python3 manage.py runserver 0.0.0.0:8021
On your first visit you should go to the URL:
Go to http://test.localhost:8021/admin/dpnk/campaign/
Log in.
Add a campaign named Test and individual phases.
Add a user profile for your user http://test.localhost:8021/admin/dpnk/userprofile/
Now you can go to 'http://test.localhost:8021/' and start to play around.
Once you have your test environment working, it's a good idea to back up your database.
First stop docker compose
$ docker-compose down
Then copy db folder
$ cp -r ./db ./db-bk