Files
ai-memory/bin/deploy.env.example
AkitaOnRailsandClaude Opus 5 e40b9964b1 fix(deploy): refuse to flatten a multi-arch tag to one architecture
`bin/deploy` builds with plain `docker build`, which produces an image for
the architecture of the machine running it. Pushing that to a tag whose
current manifest is a multi-arch list replaces the list outright, and every
host on the other architecture fails the next pull with `exec format error`.

This is not hypothetical — it happened to `:latest` on 2026-08-18 and was
reported within hours as #427. The release workflow builds amd64 and arm64
and joins them into a manifest; a homelab deploy from an x86 workstation
then silently flattened that to amd64-only. The registry has been repaired
by re-pointing `:latest` at the `:1.28.1` manifest list.

Two changes so it cannot recur:

- `bin/deploy` inspects the target tag first and exits 65 if it already
  resolves to a manifest list, naming the private-tag fix and the
  pull-only alternative for deploying a released image.
- `bin/deploy.env.example` shipped `IMAGE="akitaonrails/ai-memory:latest"`,
  so the documented setup pointed the operator's build at the public
  release tag by default. It now defaults to `:homelab`.

Refs #427

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-19 12:16:30 -03:00

32 lines
1.4 KiB
Bash

# Homelab-specific deploy configuration.
#
# Copy this file to `bin/deploy.env` and fill in your values. The real
# `bin/deploy.env` is gitignored — never commit it.
# SSH target (user@host or just host if you've set it up in ~/.ssh/config).
SERVER="me@homelab.example.com"
# Absolute path on the homelab where docker-compose.yml + .env.production live.
# The deploy script runs `docker compose pull/down/up` inside this dir.
DEPLOY_DIR="/var/opt/docker/utils/ai-memory"
# Image tag to build + push + pull. Make sure the Docker host can pull
# from wherever you push to (Docker Hub, GHCR, your own registry).
#
# Use a tag of your OWN, not a release tag. `bin/deploy` builds for the
# architecture of the machine you run it on; pushing that over `:latest`
# or `:X.Y.Z` — which CI publishes as multi-arch manifests — drops every
# other architecture and breaks those hosts with "exec format error"
# (issue #427). bin/deploy refuses to do it, but pick a private tag here
# and there is nothing to refuse.
IMAGE="akitaonrails/ai-memory:homelab"
# If you only want to run the RELEASED image rather than build your own,
# you do not need bin/deploy at all — point docker-compose.yml at
# `akitaonrails/ai-memory:latest` on the server and run:
# docker compose pull && docker compose up -d
# Optional: override the container name if your docker-compose.yml
# uses something other than the default `ai-memory`.
# CONTAINER_NAME="ai-memory"