Skip to content
jvandewPublic

About

Personal website and all the garbage that comes with it.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

www

Personal website and all the garbage that comes with it.

Architecture

The web backend here is a simple Python Tornado app serving templated static content. It is deployed as a Docker container onto the GCP free tier, using Certbot and an in-container Nginx to provision SSL certs and terminate connections.

Development

Bootstrap

  1. brew update && brew upgrade pyenv virtualenv

  2. pyenv install

  3. ./bootstrap.sh

Running locally

python3 server.py

Building via docker

./build.sh

Running via docker

docker run -it -p 8888:8888 <image tag>

Publishing

  1. gcloud auth login

  2. ./build.sh --upload

Deploying

  1. update image tag in gcp_vm_startup.sh

  2. edit VM instance in GCP and copy-paste gcp_vm_startup.sh as the startup script

  3. stop/start VM instance

  4. update DNS records to point at new VM external IP

Updating dependencies in requirements.txt

  1. pip freeze | xargs pip uninstall -y

  2. pip install -r requirements.txt

  3. pip freeze -r requirements.txt > requirements.txt.freeze

TODO

  • store SSL certs in GCP's Secret Manager rather than provisioning them on boot
  • automatically pull external IP and update DNS records as needed
  • block well known scraper paths (wordpress/php/etc stuff) at the Nginx layer
  • move to a more modern web architecture using react/typescript and whatnot

About

Personal website and all the garbage that comes with it.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages