README.md 3.4 KB

home

Home page for monoexp.com. Showcase linking to different projects.

Plain HTML and CSS, no build step and no JavaScript.

Layout

public/            what gets deployed (the site root)
  index.html       the page: about section, then project cards
  style.css        all styles, light and dark via prefers-color-scheme
  favicon.svg
nginx/
  monoexp.com.conf reference copy of the server's vhost file

Adding a project

Copy one <li class="project"> block in public/index.html and change:

  • the title in <h3>
  • the tag (language or kind), e.g. Go
  • the one- or two-sentence description
  • the Visit link to https://<name>.monoexp.com/ (leave it out for source-only projects)
  • the Source link to https://git.monoexp.com/bajdev/<repo>

Open a PR; merging it deploys the page once the site is on the pipeline.

Hosting

Canonical URL https://monoexp.com
www.monoexp.com 301 redirect to the apex
Site root /srv/www/vhosts/monoexp.com
nginx file /etc/nginx/vhosts.d/monoexp.com.conf
Certificate monoexp-home (covers monoexp.com and www.monoexp.com)

DNS needs no change: the @ and * A records at Hover already point here.

First-time setup (as bajdev over SSH)

  1. Certificate. The issue-cert wrapper only accepts subdomains, so the apex goes through certbot directly:

    sudo certbot certonly --webroot -w /srv/www/acme --cert-name monoexp-home \
     -d monoexp.com -d www.monoexp.com --deploy-hook 'systemctl reload nginx'
    

Port 80 already serves /.well-known/acme-challenge/ for every .monoexp.com name, the apex included.

  1. Site folder and first deploy.

    mkdir /srv/www/vhosts/monoexp.com
    git clone git@git.monoexp.com:bajdev/home.git ~/src/home
    rsync -a --delete ~/src/home/public/ /srv/www/vhosts/monoexp.com/
    

(From Claude's account the same step is deploy-static monoexp.com ~/src/home/public; pass the source folder explicitly, since the script's default would look for ~/src/monoexp/public.)

  1. nginx.

    sudo install -o root -g root -m 644 ~/src/home/nginx/monoexp.com.conf /etc/nginx/vhosts.d/
    sudo nginx -t && sudo systemctl reload nginx
    
  2. Check.

    curl -sI https://monoexp.com | head -1          # HTTP/2 200
    curl -sI https://www.monoexp.com | grep -i location   # https://monoexp.com/
    curl -sI http://monoexp.com | grep -i location        # https://monoexp.com/
    

Merge-to-deploy

Same steps as any other site on the pipeline (see the VPS setup plan, Phase 7):

  1. In bajdev/devops, add bajdev/home to sites.json through a PR, modelled on the existing static entry for gotest, with host monoexp.com and content folder public. Merge, then reinstall the file: sudo install -o root -g root -m 644 sites.json /etc/deployd/sites.json
  2. Hand the deployed files to the deploy user: sudo chown -R deploy /srv/www/vhosts/monoexp.com
  3. In Gogs, on bajdev/home: add deploy (and claude, if Claude will work on it) as Write collaborators, turn on branch protection for main, and add a webhook: payload URL http://127.0.0.1:9000/deploy, content type application/json, the secret from /etc/deployd/secret.env, and only the Pull Request event.
  4. Merge a small test PR and check for a deploy/… tag and a line in /var/log/deploys.log.