Skip to content

Build and publish the portal image so a deploy needs no checkout - #8

Merged
louis14448 merged 1 commit into
masterfrom
ci-ghcr-prod-compose
Aug 6, 2026
Merged

Build and publish the portal image so a deploy needs no checkout#8
louis14448 merged 1 commit into
masterfrom
ci-ghcr-prod-compose

Conversation

@louis14448

Copy link
Copy Markdown
Contributor

Deploying anywhere but a developer machine meant cloning the repo and building on the target, which put the Go toolchain on the critical path of every production host and left no artifact to roll back to.

CI runs go vet and go test on every pull request and on master, then builds the image. Publication to GHCR is gated behind needs: test, so a red suite cannot reach the registry; a separate release workflow would have lost that ordering. Pull requests build without pushing — the build is the check, and a fork has no registry credentials anyway. Alongside latest, every commit is tagged sha-<7 chars>, which is what makes a rollback possible at all.

docker-compose.prod.yml consumes that image instead of a build context, restarts services unless stopped, and carries a commented Traefik v3 block for TLS. Two settings there are specific to this application: request buffering stays off and the route timeouts are zero, because a submission is one long request — up to 4 GiB uploaded, then validated, then scanned by clamd for up to 15 minutes before the response is written. A buffering proxy would spool the whole archive to its own disk first, and a finite timeout would report failure for a submission that actually succeeded.

The upstream clamav and minio tags are left floating with a note rather than pinned, since the right pin is whatever version the deployment has been tested against.

Deploying anywhere but a developer machine meant cloning the repo and
building on the target, which put the Go toolchain on the critical path
of every production host and left no artifact to roll back to.

CI runs go vet and go test on every pull request and on master, then
builds the image. Publication to GHCR is gated behind `needs: test`, so
a red suite cannot reach the registry; a separate release workflow would
have lost that ordering. Pull requests build without pushing — the build
is the check, and a fork has no registry credentials anyway. Alongside
latest, every commit is tagged sha-<7 chars>, which is what makes a
rollback possible at all.

docker-compose.prod.yml consumes that image instead of a build context,
restarts services unless stopped, and carries a commented Traefik v3
block for TLS. Two settings there are specific to this application:
request buffering stays off and the route timeouts are zero, because a
submission is one long request — up to 4 GiB uploaded, then validated,
then scanned by clamd for up to 15 minutes before the response is
written. A buffering proxy would spool the whole archive to its own disk
first, and a finite timeout would report failure for a submission that
actually succeeded.

The upstream clamav and minio tags are left floating with a note rather
than pinned, since the right pin is whatever version the deployment has
been tested against.
@louis14448
louis14448 merged commit e29b6c1 into master Aug 6, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant