Arboviruses geographic info
- Clone this project
- Install Docker and Docker Compose
- Once in its root, run
docker-compose build
- Start the database with
docker-compose up -d db
- Then
docker-compose run --rm web sh -c 'python manage.py sqlcreate && python manage.py migrate'
- And finally
docker-compose up -d
. Every other time, this is all you'll need.
When you're working, just run docker-compose up -d
. The system will be
available at http://127.0.0.1:8000
This will run the project in the background. To stop,
do docker-compose down
.
If you do not want to run it in the background,
ommit the -d
flag, docker-compose up
Got stuck somewhere? You can see the logs with docker-compose logs
.
If you're only interested in Django's logs, run docker-compose logs web
.
If you're only interested in database's logs, run docker-compose logs db
.
Our Django setup comes with a very handy super shell. It is useful to interact with our code in a REPL shell.
Run it with docker-compose run --rm web python manage.py shell_plus
docker-compose run --rm web pytest
- Create a virtual environment
python -m venv env
- Activate it
source env/bin/activate
- Install the requirements with
pip install -r requirements/local.txt
- Install pre-commit
- Run
pre-commit install -t pre-commit -t pre-push
- Optional: you may run all hooks with
pre-commit run --all
- Copy
sample.env
to.env
->cp sample.env .env