add line to infra_gateway
Created by: jedmund
Drops line (the SvelteKit start page that will eventually replace Glance) into the existing infra_gateway stack. Lives at line.atelier.house for now; the plan is to move it to the apex atelier.house once it's proven, displacing Glance.
Image is built on the server from a clone of the line repo, mirroring the album_sort pattern. No ghcr push needed.
What's in here
-
roles/infra_gateway/defaults/main.yml— newline_*block: port 5180, repo + branch + source path, subdomainline, derived URLs for OIDC issuer + redirect. Also addsline.atelier.houseto the DDClient subdomain list. -
roles/infra_gateway/templates/compose.yaml.j2— newlineservice mirroring the Glance pattern: on theproxynetwork, Traefik labels forline.{{ traefik_domain }}with letsencrypt,build:from the server-side clone, bind-mount./config/line/datato/datafor SQLite. -
roles/infra_gateway/templates/env/line.env.j2— env file:DATABASE_URL=/data/line.db,OIDC_ISSUERfrompocketid_app_url, plus the fourOIDC_*vars. -
roles/infra_gateway/tasks/main.yml—./config/line/dataadded to the dirs loop,lineadded to the env-files loop, and a newansible.builtin.gittask that pulls the line repo to{{ docker_base_path }}/{{ stack_name }}/source/line. Stack deploy now usesbuild: always. -
roles/infra_gateway/handlers/main.yml— restart handler also getsbuild: alwaysso handler-triggered rebuilds use fresh source. -
README.md— documents the two new vault entries (line_oidc_client_id,line_oidc_client_secret), notes the server-side build, and updates the role description.
Before this can deploy, do these two things
-
Register an OIDC client in PocketID at
https://id.atelier.house:- Redirect URI:
https://line.atelier.house/auth/callback(must match exactly) - Note the client ID and secret.
- Redirect URI:
-
Add the secrets to vault:
make edit-vault FILE=group_vars/infra_gateway/vault.ymlAppend:
line_oidc_client_id: "..." line_oidc_client_secret: "..."
Deploy
make deploy-infra-gateway
The git task pulls latest main of the line repo, then build: always rebuilds the image. First run is slow (Docker cache empty); subsequent rebuilds reuse layers. DDClient will pick up line.atelier.house and create the Cloudflare DNS record.
Redeploys the whole gateway stack (Traefik, PocketID, etc.). Compose-v2 is idempotent so existing services aren't disrupted, but blast radius is wider than ideal. Adding --tags line support is separate cleanup.
Notes / decisions
-
Server-side build mirrors the
album_sortrole exactly. To pin to a specific commit/tag instead ofmain, setline_versionin defaults. - No TinyAuth in front. Line has its own PocketID OIDC integration so the forward-auth proxy isn't needed.
-
Glance left alone. When you're ready to swap them, change
line_subdomain(or add a second host to the Traefik rule) so line takes overatelier.houseandstart.atelier.house, then drop the Glance service.