Skip to content

acorn1010/render

Repository files navigation

Prerender service based on https://prerender.io

NOTE: All commits should use https://www.conventionalcommits.org/en/v1.0.0/. TODO(acorn1010): Use https://github.com/semantic-release/semantic-release

Prerequisites

You'll need the following dependencies before you can run this project:

  • CLI tools:
  • Make an ed25519 SSH key (rsa isn't supported):
    [ -f ~/.ssh/id_ed25519 ] || ssh-keygen -t ed25519 -N "" -f ~/.ssh/id_ed25519 && chmod 400 ~/.ssh/id_ed25519*
  • Set up an hcloud context: hcloud context create <project-name>
  • Add this Bash alias:
    alias createkh='tmp_script=$(mktemp) && curl -sSL -o "${tmp_script}" https://raw.githubusercontent.com/kube-hetzner/terraform-hcloud-kube-hetzner/master/scripts/create.sh && chmod +x "${tmp_script}" && "${tmp_script}" && rm "${tmp_script}"'

Deployment

  • Run createkh from your repository root. Press Enter to skip directory choice, then yes when creating the MicroOS snapshots.

Tech Stack

  • Hetzner for K3s cluster (CPX31)
    • Terraform
  • client:
  • server:
  • shared
    • A repo shared by both client and server. Safe way to allow typed APIs without leaking server code. ts-json-schema-generator is used for validation on the server.

Deployment

  1. Create a Terraform user API token here and set up an organization and workspace. This is your TF_API_TOKEN.
  2. Get your SSH_PUBLIC_KEY from your https://github.com/acorn1010.keys
  3. Add SSH_PUBLIC_KEY, TF_API_TOKEN, GCR_SECRET, HETZNER_TOKEN to your GitHub Settings > Secrets and Variables > New repository secret

Overview

  • Backend Service on K8 handles API requests to render pages, store the pages in our Storage solution

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published