changelog.com CMS

repository·master·Indexed 25 days ago

https://github.com/thechangelog/changelog.com

An open-source CMS powering changelog.com. Built as a specialized Elixir/Phoenix application, it is designed for managing podcast-related content and media, utilizing Node.js for static assets and PostgreSQL for data persistence.

Tokens
6.8K
Snippets
15
Records
77
Agent score
83%

What's inside changelog.com

  1. Overview of the changelog.com CMS

    master
    The changelog.com repository contains the Content Management System (CMS) used by changelog.com. It is an Elixir application built using the Phoenix web framework. The system utilizes Node.js for managing static assets and PostgreSQL for data persistence. While it is highly customized for the specific needs of The Changelog (including hardcoded podcast names and specific data structures), it serves as a reference implementation for high-performance Phoenix web applications.
  2. Launch an Incus container or virtual machine

    master

    You can use Incus to launch either a container or a full virtual machine using the incus launch command.

    To launch a container (e.g., OpenSUSE Tumbleweed):

    incus launch images:opensuse/tumbleweed

    To launch a virtual machine (e.g., OpenSUSE Tumbleweed):

    incus launch images:opensuse/tumbleweed --vm
  3. Optimize Incus storage with ZFS

    master

    If ZFS is available on your host, use it instead of the default dir backend for significantly faster incus publish times. ZFS only processes allocated blocks and uses lz4 compression.

    sudo zfs create <your-pool>/incus
    incus storage create zfs zfs source=<your-pool>/incus
    incus profile device set macvlan root pool=zfs
  4. Deploy PgHero on Fly.io

    master

    To deploy a PgHero performance dashboard instance on Fly.io, create the app, set the DATABASE_URL secret using your Neon.tech Postgres connection string, and deploy with specific resource constraints. Note that this instance is configured to run on a private network and requires a WireGuard tunnel for access.

    flyctl apps create pghero-2024-03-27 --org changelog
    flyctl secrets set DATABASE_URL="$(op read op://changelog/neon/url --account changelog.1password.com --cache)"
    flyctl deploy --ha=false --vm-memory=512
  5. Start a new development session

    master

    To start a fresh development environment, run mise vm:launch. Re-running this command re-enters the existing VM (starting it if it is stopped), allowing for resumable sessions.

    Once inside the VM, run the work command to:

    • Set up ~/workspace
    • Start a timestamped tmux session
    • Launch claude inside the session

    To manage the tmux session, use Ctrl-b d to detach and tmux attach to return. To run claude directly without tmux, use the shell abbreviations c<SPACE> for local sessions or cr<SPACE> for remote-control sessions.

    mise vm:launch
    work
  6. Persist changes from the VM to the host

    master

    To save progress made by claude or other processes within the VM, run mise vm:keep. This command uses rsync to sync ~/workspace back to the host mount at /host/repo, respecting .gitignore filters to exclude build artifacts and generated directories.

    Note: mise vm:keep will fail if /host/repo is not a real host mount (e.g., virtiofs/9p filesystem) to prevent silent data loss.

    mise vm:keep
  7. Configure Incus VM manager with macvlan

    master

    To set up a VM manager that avoids NAT and provides direct LAN access via DHCP, use the mise vm:incus command. This installs the latest stable Incus from the Zabbly repo, adds your user to the incus-admin group, initializes Incus with a dir storage pool, and creates a macvlan profile on the specified physical interface.

    Note: Replace enp97s0 with your actual host network interface (found via ip link).

    mise vm:incus enp97s0
  8. Update the base VM image

    master

    To update the base VM image during a follow-up session, use the mise vm:launch command. After making the necessary changes within the VM, use mise vm:blueprint to freeze the new state into the blueprint.

    mise vm:launch
    # ... make changes ...
    mise vm:blueprint
  9. Load project secrets from 1Password

    master

    To access project secrets, first sign in to 1Password, then use mise team:secrets:load to enable fnox-env. This automatically loads shared secrets from the changelog vault and personal secrets from the Employee vault.

    # One-time: add your account
    op account add
    
    # Per-session: sign in
    eval (op signin)
    mise team:secrets:load