EarthxHack Hackaton - Fill in the missing gap of global collaboration on sustainibility issues
- Install Docker (https://docs.docker.com/install/), for Windows install Docker Tools (https://docs.docker.com/toolbox/overview/#ready-to-get-started)
- Run Docker
- Clone the project
- Run
docker build
- it will start building the project - might take 5-10 minutes with good connection - Run
docker-compose up
- if everything went well it will run the server with all the modules To run it daemonized (as a background task) - rundocker-compose up -d
- Open the browser at
http://localhost:3000
and create new user. - Open the terminal and turn this user to superuser with the following set of commands below. Two options for creating Admin: 7.1 Open the terminal and run
docker-compose exec back-end /bin/bash
cd st/back-end
python manage.py createsuperuser
7.2 The superuser is the equivalent of the Admin as of the scope of the project:
docker-compose exec back-end /bin/bash
cd st/back-end
python manage.py shell
>>> from api.models import Client
>>> u = Client.objects.last().user
>>> u.is_staff = True
>>> u.is_superuser = True
>>> u.save()
-
Now you could navigate in your browser to
localhost:8000/admin
and enter as an admin -
To run tests enter the container and execute the tests with the following set of commands:
docker-compose exec back-end /bin/bash
cd calories/back-end
python manage.py test
- Documentation is available at
http://localhost:8000/admin/doc/