Skip to content

jamidwyer/election-cms

Repository files navigation

election cms

Goal: Election data API.

Current status: empty state, event, and candidate REST endpoints. Probably will get a job before this goes anywhere useful. Please feel free to run with this code/idea yourself!

Requirements

Python 3

Docker

AWS cli

Setup

git clone [email protected]:jamidwyer/election-cms.git

cd election-cms

Develop (no Docker)

python3 -m venv venv
. venv/bin/activatepython3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt
python3 -m pip install --upgrade pip
python3 manage.py runserver

Visit: http://127.0.0.1:8000/

Develop (Docker)

docker build -t election-cms .
docker run -p 8000:8000 election-cms

Visit: http://0.0.0.0:8000/

Deploy

  • change tag in dockerrun.aws.json
  • docker build -t elections .
  • docker tag elections:latest /elections:latest
  • docker push /elections:latest
  • eb deploy elections-dev

Demo

Feel free to check it out here: http://elections-dev.us-west-2.elasticbeanstalk.com/. The data's sqlite, so it's gonna get wiped a lot until I decide how to persist it.

Roadmap

MVP

  • make something that uses the api to see what fields i need to add/change
  • handle data correctly. shouldn't be sqlite on whatever server it's on.
  • contributor verification

Important

  • smaller geographic areas than states
  • automate deploy
  • think about ways it will be misused by people with deep pockets; prevent those
  • better docs

Maybe

  • activityfeed
  • graphql
  • eks instead of eb?

Thanks

This blog post: https://dev.to/ki3ani/deploying-your-first-dockerized-django-rest-api-on-aws-elastic-beanstalk-a-comprehensive-guide-2m77

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published