ci: deploy native binary directly to LXC via SSH (drop Docker/registry)
CI / Build Native (push) Failing after 12m4s

Switch the runtime from a Docker image to a systemd service running the
native binary on the LXC host. The CI still uses Docker for the build
environment (maven:3.9.6-eclipse-temurin-21), but stops at producing the
static native binary.

Pipeline changes:
- Drop docker.io, docker-buildx, docker buildx, docker push, registry.
- Drop Dockerfile, compose.yaml, .dockerignore (no longer needed).
- Build native binary in CI container, SCP to LXC, run deploy script.
- Deploy script stops the service, swaps the binary, starts it, hits
  /q/health/live to verify.

LXC one-time setup (manual, run on the host):
- useradd runner (UID 1001)
- mkdir /opt/shot-crafter-calculator/{data,keys,deploy}
- copy RSA JWT keys into keys/
- install /etc/systemd/system/shot-crafter-calculator.service
- install /usr/local/bin/deploy-shot-crafter-calculator.sh
- useradd deployer + ssh keypair for the CI
- store DEPLOY_SSH_KEY secret in Gitea

Bootstrap the first deploy manually with scp + ssh before relying on CI.
This commit is contained in:
2026-08-13 20:05:17 -04:00
parent ac349c1b34
commit a2fb5cc521
4 changed files with 15 additions and 129 deletions
-19
View File
@@ -1,19 +0,0 @@
FROM registry.access.redhat.com/ubi9/ubi-minimal AS curl-builder
RUN microdnf install -y curl-minimal && microdnf clean all \
&& mkdir -p /out/etc/pki /out/etc \
&& install -D -m 0755 /usr/bin/curl /out/usr/bin/curl \
&& for lib in $(ldd /usr/bin/curl | awk '/=>/ {print $3}' | sort -u); do \
install -D -m 0755 "$lib" "/out$lib"; \
done \
&& cp -rP /etc/pki/ca-trust /out/etc/pki/ \
&& cp -rP /etc/ssl /out/etc/
FROM quay.io/quarkus/quarkus-micro-image:2.0
WORKDIR /work/
COPY --chown=1001:1001 build-output/shot-crafter-calculator-1.0.0-runner /work/application
COPY --from=curl-builder /out/ /
EXPOSE 8080
USER 1001
ENTRYPOINT ["./application"]