Skip to content

rbocchinfuso/cv-api

Repository files navigation

CV API

Test

alt text

Language grade: Python Total alerts Quality Gate Status

Summary

A Curriculum Vitae (Resume) API

Note: If you have any questions or comments you can always DM me on the twitter @rbocchinfuso.

Why

  • Just for fun.
  • Because I can.
  • Inflight boredom and shitty United WiFi.
  • Because we learn by doing.
  • Because we live in an API driven world.
  • The motivation for the CV API is a long story, but the key reason that I decided to build this was really driven by a desire to create a gate for those looking to inspect my CV. I wanted a way to inspect the inspector without having to do the inspection. More details on my motivations can be gleamed from a blog I published here: http://bit.ly/372imHl

How

  • Create a JSON structure to store CV details.
  • Build API with Python and Flash
  • Package and containerize API
  • CI/CD
graph LR
A[Git Commit] -->B(Docker Hub Build)
    B --> C{Decision}
    C -->|Build Success| D[Watchtower pulls latest image and restarts contianer]
    C -->|Build Failure| E[Watchtower leaves existing container image running]
Loading

Tooling

What

  • Deploys nginx docker container and exposes port 80
  • Builds cv-api docker container from source, exposes port 5000 and creates revese proxy to cv-api from nginx contianer using virtual hostname "cv.bocchinfuso.net"
  • Allows user with bearer token make a REST GET for CV data

Todo

  • Integrate automated testing into the pipeline
  • Add reqeust logging
  • Add REST PUT for user initiated requests
  • Add Pushover push notifications on REST PUT
  • Integrate Sentry for error logging

Requirements

Usage

Make Request

Get my CV API from Docker Hub for local use

docker pull rbocchinfuso/cv-api

Deploy for Personal Use

  • Download code from GitHub for personal use

     git clone https://github.com/rbocchinfuso/cv-api.git
    
  • Note: If you don't have Git installed you can also just grab the zip: https://github.com/rbocchinfuso/cv-api/archive/master.zip

  • Modify the cv.json file

  • Modify the config.ini (if desired, e.g. you want to update the auth token)

  • Build and deploy (attached)

     docker-compose up --build
    
  • Build and deploy (detached)

     docker-compose up -d --build
    

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request ツ

History

  • version 0.1 (initial release) - 2020/01/21
  • version 0.2 (readme.md updates) - 2020/02/15
  • version 0.3 (refactored preso-as-code using Mark) - 2020/06/10

Credits

Rich Bocchinfuso <rbocchinfuso@gmail.com>

License

MIT License

Copyright (c) [2020] [Richard J. Bocchinfuso]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Curriculum Vitae (CV) API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages