SantosDerek.com
My personal website and dynamic resume.
Project Overview
In order to showcase my projects and experience using specific technologies, I have decided to create a resource where users may view an overview of my latest achievements. This website is also a project within itself since all aspects of the website was created using Python, Docker, Github Actions, and Ansible. Below is a dive into the work, and features this website holds under the hood as well as the deployment of the website itself.
A Dynamic Home Page
Due to the nature of using Flask as a web framework, Jinja is used as the default templating solution for webpages. The landing page of the application is built and populated by two major templates; base.html and home.html which can be viewed within the GitHub repository. Home.html extends the base.html template and populates the page using data declared within the home route's declared function within the Flask application factory, i.e. __init__.py. This allows me to have a general format for the page, but dynamically populate the contents by importing the data into the rendered template at each request.
The data is organized and parsed from a series of JSON files found within the resources folder of the repository. These files are read, parsed into python lists and dictionaries, and sent to the view. When updating the home page of my website, I only need to add or remove entries within these JSON files, and the contents of the page should adjust automatically on the next request.
Automatic Resume Creator
Upon runtime of the web application, the JSON resource files are used to create a structured and styled Word Document entirely using the python-docx module. This Word Document is the very same file given when visiting /resume route.
Deployment Architecture
The deployment process of the website involves the usage of Github, Github Actions, a DigitalOcean, Ansible, and Docker. When committing changes, I push the respective commits to Github where upon creating a pull request will trigger a workflow to verify all unit tests pass. The workflow also verifies and build the Dockerfile to be deployed. After all checks pass, I accept the pull request and first deploy the updated Docker image to a test environment within my homelab using Ansible. Once my inspection is complete within the test environment, I run a second Ansible script which deploys the code to the Digital Ocean droplet, updating the docker image to the most recent change, and serves the flask application through santosderek.com.