Skip to content
This repository has been archived by the owner on Mar 15, 2023. It is now read-only.

AcompanhaLegis/acompanha-legis-api

Repository files navigation

Acompanha Legis

Para ler esse arquivo em português, vá ao README-ptbr.md

This is a project for compile data from Dados Abertos da Camara and serve though API to Camara data portal.

Getting Started

These instructions will get you a copy of the project up and running on your local machine with docker for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

First, have docker, please. Then follow installation steps. If you want to run locally, iit is possible But I have no instructions here. Sorry.

Installing

Docker

  1. Install docker To install docker, please refer to their website and follow the instructions for your operational system.

  2. Copy the example environment file

$ cp .env.example .env

Locally

We plan to have the tutorial to install locally, but we do not yet.

Running

Docker

To run the api with docker, just run the following command

$ docker-compose up

Troubleshooting

For some people who built the project previously (docker-compose.dev.yml) you may face some problems, try the following commands:

$ docker-compose down && docker-compose build --no-cache

⚠️ If the problem persists please add an issue to get help, you can also try to remove the api and the task images manually and re-run docker-compose up

Development

Here are some tips...

Migrations

When changing a model, you will need to create new migrations and migrate them so they be applied on the database schema.

To create migrations based on the the changes in the model, run the following command

$ docker-compose exec api python ./manage.py makemigrations

To migrate and apply them to the database, run the following command

$ docker-compose -f docker-compose.dev.yml exec api python ./manage.py migrate

Email testing

To test the email, we have included the mailhog. It makes it possible to test sending and receiving emails by accessing: localhost:8025. By default django is already configured to use it.

Deployment

Add additional notes about how to deploy this on a live system

Built With

  • Django - DjangoThe web framework for perfectionists with deadlines.

Contributing

Please read CONTRIBUTING.md for details on the process for submitting pull requests to us.

Code of Conduct

Please read Code of Conduct. And always be considerate and respectful.

Versioning

We will use SemVer for versioning.

License

This project is licensed under the MIT License - see the LICENSE.md file for details


Go to the contributors page to see who participated in this project.