Skip to content

filippo-orru/personal-site-hugo

Repository files navigation

Personal Site (Hugo)

Hugo source of my personal portfolio & blog. Available at filippo-orru.com.

Prerequisites

Before getting started, make sure you have the following installed on your machine:

  • Docker
  • Docker Compose

Setup / Deployment

  1. Set up reverse proxy with traefik: https://github.com/filippo-orru/vps-reverse-proxy. Follow instructions there.

  2. Create a deploy key using this script and add it to the Github repository.

  3. Clone this repository using the command echoed by the script.

  4. Pull the submodule webhook-listener (used for automatic deployment).

    1. Generate a deploy key and add it to the Github repository.

    2. Clone the webhook-listener repository using the command echoed by the script.

  5. Create the file webhook.secret to store the Github webhook secret used by the webhook-listener.

  6. Copy the ssh config files to the webhook listener.

    cp deploy/shared/ssh/config webhook-listener/shared/ssh/config
    cp ~/.ssh/id_rsa.personal-site-hugo webhook-listener/shared/ssh/id_rsa.personal-site-hugo
    cp ~/.ssh/id_rsa.webhook-listener webhook-listener/shared/ssh/id_rsa.webhook-listener
  7. Configure Plausible analytics

    1. Create the plausible env file:
    cp plausible/plausible-conf.demo.env plausible/plausible-conf.env
    1. Create a secret using the following command and copy it to the .env file.
    openssl rand -base64 64 | tr -d '\n' ; echo
  8. Create systemd service file.

    1. Modify WorkingDirectory in personal-site.service to point to the root of this repository.

    2. Copy the file:

    sudo cp personal-site.service /etc/systemd/system/personal-site.service
    sudo systemctl daemon-reload
    sudo systemctl enable personal-site.service
    sudo systemctl start personal-site.service
  9. Check the status:

    sudo systemctl status personal-site.service