This is the Django web app for CGRAN.org
The information in the main table is automatically generated by parsing gr-recipes and gr-etcetera (PyBOMBS recipes).
To Install
- clone this repo
- install docker-ce with https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce
- install docker-compose with https://docs.docker.com/compose/install/#prerequisites
- allow running docker as non-root with https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user
- rename settings_secret.py.template to settings_secret.py and change the value of the secret key to something else (anything else)
To launch app
docker-compose up --build --no-deps
or
docker-compose up
Current TODO list
- make the parsing script automatically run once a day, at like 3am
Notepad to self
- For shell accessing-
docker exec -ti nginx bash
ordocker exec -ti web bash
docker ps
lists docker containers that are runningdocker ps -a
lists all built containers- you can stop and remove all docker containers using
docker stop $(docker ps -a -q)
thendocker rm $(docker ps -a -q)
- three-step guide to making model changes:
- Change your models (in models.py).
- Run python manage.py makemigrations to create migrations for those changes
- Run python manage.py migrate to apply those changes to the database.
- save db to yaml file-
python manage.py dumpdata --format yaml ootlist.Outoftreemodule -o db.yaml
- load yaml file to db-
python manage.py loaddata db.yaml