feat(ci): build afp image on GitHub Actions and push to GHCR - #5
Merged
Merged
Conversation
…y deploy Builds ghcr.io/behindthemusictree/afp on ubuntu-latest (:staging on develop, :prod on main, :sha-<short>) and triggers the afp Coolify deploy, moving image builds off the VPS. Dockerfile drops its build args so one image serves every environment; log filenames become runtime env, FPCALC is baked in. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Moves the afp image build off the CPU-overloaded BTMT VPS. The new
.github/workflows/build-and-deploy.ymlbuilds the Docker image onubuntu-latest(this repo is public, so the minutes are free), pushes it toghcr.io/behindthemusictree/afp, then triggers the Coolify deploy of theafpapp throughBehindTheMusicTree/github-workflows/.github/actions/trigger-coolify-deploy@v4.3.4, which then health-checks/health.:stagingondevelop,:prodonmain, and:sha-<short>on every push. Coolify will deploy the movingstaging/prodtag.afpapp, environmentstaging(develop) orproduction(main). Both environments exist in the infrastructure repo.cancel-in-progress: false). Build caching uses the GHA cache.FLASK_LOG_*_FILENAME/GUNICORN_LOG_*_FILENAMEvariables are now read at runtime.settings.pyandscripts/setup-filesystem.shalready fail fast when they are missing, and Coolify already injects them at runtime (is_runtime: true).FPCALCis baked in as/app/bin/fpcalc, the path where the image itself puts the binary.Related Issues
N/A. Part of the BTMT "build public-repo images on GitHub Actions" plan. The infrastructure follow-up will switch the Coolify afp app source to the GHCR image and move the log filenames from
buildtime_envtostatic_env.Type of Change
Pre-PR Checklist
Code Quality
Tests
Documentation
[Unreleased]section for any notable changeGit Hygiene
develop, ormainfor hotfixes)Breaking Changes
Breaking Changes Description
N/A. Anyone running
docker buildby hand no longer passes--build-arg, and must now pass the log filename variables with-eat runtime (see the README). Coolify already provides them at runtime.Testing Instructions
How to Test
actionlint .github/workflows/build-and-deploy.ymlpasses.develop, the "Build and deploy" run succeeds,ghcr.io/behindthemusictree/afp:stagingexists, and the afp staging deploy passes its/healthcheck.main,:prodexists and the production deploy succeeds.Test Results
actionlint: clean.
Additional Context
Until the infrastructure follow-up lands, Coolify keeps building afp from git, so the triggered deploy still builds on the VPS. This is expected and temporary.
Checklist for Reviewers
🤖 Generated with Claude Code