This repo contains the source code and configuration of my personal web server at veracioux.me, serving the following:
- Personal portfolio website
- Miscellaneous static content
- Docker registry
- Git server for private repos
- Various other self-hosted services
- GitHub Stats API server (because the free public API is subject to public rate limits)
- Private NPM registry
The services are orchestrated via docker compose, configured via compose.yml. The following services exist:
Compose Service: web
Configuration: nginx.conf
Serves my personal website along with some additional static content that’s useful to host myself (temporary files, github stats via <a href=”*GitHub Stats API server”>anuraghazra/github-readme-stats, etc).
Compose Service: github-stats
Configuration: apps/github-stats
Uses anuraghazra/github-readme-stats to serve my GitHub stats as images. The compose service itself serves as a generic GitHub stats server for any user, but in the reverse proxy I only expose my own stats. This is to prevent abuse (other users using my server to serve their own).
The web server is deployed as a VPS on Google Cloud. It is done using the following tools:
- Docker Compose for orchestrating the services (see compose.yml)
- Terraform as the IaC tool (see infra/main.tf)
- Ansible for provisioning (see infra/playbook.yml)
- Vagrant for preview deployment in a local VM (see infra/Vagrantfile)
Currently the whole web server can be deployed on a single machine of class
e2-small, running Debian 13. The deployment is done on separate prod and stg
(staging) environments.
- Build and push new images to
docker.veracioux.me - Provision a temporary staging environment via Ansible
- Clone production data to a temporary staging instance
- (New version was already deployed in the)
- Run tests on staging
- If tests pass, deploy to production via Ansible provisioning
The following ports are used by the compose services:
- Web
- 3000
- Docker registry
- 5000
- GitHub stats
- 9000
- NPM registry
- 4873
The following domains are used:
veracioux.me- Apex domain pointing to the main portfolio/static-content website
docker.veracioux.me- Points to the docker registry
- 80
- HTTP port, redirected to 443
- 443
- HTTPS port
- 22
- SSH server, configured for public-key-only
If you want to use the npm registry or docker registry during development, make sure to put the credentials into dev.htpasswd. This can be done using:
bun cli pass set <username> -f dev.htpasswd # Prompts for passwordTo serve a temporary file under veracioux.me/, just place it in the ~/tmp_root
directory on the server.
The CV can be generated using the CLI, via bun run cv (see --help for options).
I am working on a CLI tool for interacting with the various services hosted on my web server.