chore(docker): migrate trustlab to bake and make app images env-neutral#1411
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e0c54fce3c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Otherwise, over to you for reviews. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
Speak now (in the next hour) or forever hold your peace @CodeForAfrica/tech |
maquchizi
left a comment
There was a problem hiding this comment.
Quite a bit of changes but LGTM. CI is failing for some reason. I've re-ran the failing jobs, let's see how that goes.
Summary
This PR migrates
trustlabto the Bake-based Docker build flow and incorporates shared fixes discovered whilevalidating the existing
techlabblogmigration.It also moves migrated app images toward a more environment-neutral model by removing unnecessary build-time env
coupling and relying on runtime/server configuration where appropriate.
Changes
trustlabtodocker-bake.hclwith a dedicated app Dockerfiletechlabblogaligned with shared Docker/Bake fixesscripts/bake-up.shscripts/revalidate.mjsfor authenticated post-deploy ISR revalidationapp.jsonfiles underdocker/apps/<app>/docker/apps/<app>/revalidateDeletecondition inversion inrevalidateCache.js(wasif (!path), so deletions never triggered revalidation)trustlabgetStaticPathsto return{ paths: [], fallback: "blocking" }— pages are no longer pre-rendered at build time; they are generated on first request per environment, which is required for the env-neutral image modelrevalidate.mjsscript that is used bydokku.scripts.postdeployto rebuild major pages at deployment time.Notes
techlabblogwas already migrated before this PR; this change mainly focuses ontrustlabplus shared hardening/cleanup
docker/, not inside app source treestrustlablocal builds should go through the env-loaded flow (scripts/bake-up.sh) because Payload still requires build-time secrets duringnext buildtrustlabbuild still emitsurl.parse()deprecation warnings from upstream dependency/framework code duringnext build; this is not introduced by this PRValidation
make trustlabsucceedstrustlabbuilds successfully via the env-loaded local pathapp.jsonscripts/revalidate.mjsScreenshots
N/A
Checklist: