The batch processor for the governet core application
289
Governet provides an interface to FEC election data. Governet acts as a facade over the FEC bulk data, allowing for local maniuplation and management of the data. This repository contains the core governet services, including the database, api, batch processor, and soon the UI and cache.
Install Docker & Docker Compose. Docker Community Edition for Mac and Windows comes pre-packaged with Docker Compose.
Copy the file .env.example, renaming it to .env.
The application relies on environment variables to understand how to connect to the database. Docker Compose looks for those environment variables stored in a .env file in the root of the project. As this file can contain sensitive information it's gitignored. However, we've included a working example. Simply rename the .env.example file in the root to .env and docker compose will pick it up
Run docker-compose up in the root directory of the project
This will stand up the database, the loader, fetch the data from the FEC and load it into the DB, and stand up the API, connecting it to the database.
check out the data
127.0.0.1:5000
127.0.0.1:3000/api/candidates
React frontend for the system
Postgres database
Exposes port 5324
Base database is governet.
Node.js + Express API
Exposes port 3000
See the file /backend/routes.js in this directory for the available routes
Python batch processer
Exposes port 5000, for a simple config/health check
At startup reads the configuration file from the loader directory, and fetchs + loads the requested years and data sets from the FEC bulk data server.
Dan Budris
Content type
Image
Digest
Size
352.5 MB
Last updated
over 7 years ago
docker pull danbudris/governetcore_loader