REST API built in Django with PostGis
Django is the most famous and supported python web framework, is focused on reducing the development time, is compatible with major operating systems and easy to extend and scale.
- Docker >= 19.03
- Docker Compose >= 1.26
For dockerized app the service will run in "127.0.0.1:8000"
First run the cointainer for the db
docker-compose up --build -d dbAfter the db service is ready, then run the container for the web service
docker-compose up --build -d web(Optional) List all running Docker containers to verify the success of the building
docker psThen create the database migrations and populate with the initial data
docker-compose exec web python manage.py migrateIn the Heroku dashboard create an app and attach it the Heroku Postgres add-on, then by the Heroku CLI run the commands below:
heroku loginheroku pg:psql -a <app_name>=> CREATE EXTENSION postgis;
=> SELECT postgis_version();
=> \qheroku container:login
heroku container:push web -a <app_name>
heroku container:release web -a <app_name>heroku run python manage.py makemigrations -a <app_name>
heroku run python manage.py migrate -a <app_name>In the 'postman' folder there are the collection and environment files for make some requests to testing the API REST