summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorElizabeth Alexander Hunt <me@liz.coffee>2026-11-13 16:04:21 -0800
committerElizabeth Alexander Hunt <me@liz.coffee>2026-11-13 16:04:21 -0800
commit8974b115b69bc25ebf174e8c9637373c4d206325 (patch)
tree37eeedfd098827199552987a656596459375e8cc /Dockerfile
parent009525bd46edfc77068da212e36f38d410503f2c (diff)
downloadrookery-8974b115b69bc25ebf174e8c9637373c4d206325.tar.gz
rookery-8974b115b69bc25ebf174e8c9637373c4d206325.zip
CI: publish the builds as a download site, deploy via Coolify
The deployed image is now a small nginx site instead of a bare app tree: the Linux app (with its runtime), a universal jar, the Android APK, SHA256SUMS and a landing page showing the commit and build date. - desktop: universalJar bundles the Skiko natives for Linux, macOS and Windows (Compose's own jar only carries the building OS's). - Dockerfile: the build stage runs tests and builds every artifact; site/assemble.sh lays them out; the final stage is nginx:alpine. - .ci: after the image is built, `main` calls the beta Coolify hook and `release` the production one; other branches only build. - .dockerignore keeps local.properties and secrets out of the build. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile20
1 files changed, 12 insertions, 8 deletions
diff --git a/Dockerfile b/Dockerfile
index 30c099e..84e02b2 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-# Build + test stage: a failing test fails the image build, which is what lizCI checks.
+# Build stage: tests and every download. A failing test fails the image build, which is what lizCI checks.
FROM eclipse-temurin:21-jdk AS build
WORKDIR /src
# Android SDK: core and ui have Android targets, so Gradle needs one even for the desktop build.
@@ -16,11 +16,15 @@ COPY desktop/build.gradle.kts desktop/
COPY android/build.gradle.kts android/
RUN ./gradlew --no-daemon -q help
COPY . .
-RUN ./gradlew --no-daemon :core:jvmTest :desktop:createDistributable
-
-# Artifact image: just the packaged Linux desktop app (with its bundled runtime).
-FROM alpine:3.20 AS rookery
+# Tests, then every download: the Linux app (with its runtime), the universal jar and the Android APK.
+RUN ./gradlew --no-daemon :core:jvmTest :desktop:createDistributable :desktop:universalJar :android:assembleDebug
+# The commit goes in last, so a new commit doesn't redo the build above's cache-able layers.
ARG COMMIT=unknown
-COPY --from=build /src/desktop/build/compose/binaries/main/app/rookery /opt/rookery
-RUN printf '%s' "$COMMIT" > /opt/rookery/commit
-CMD ["ls", "/opt/rookery"]
+RUN sh site/assemble.sh /site "$COMMIT"
+
+# The deployed image: a static download page and the files it links to.
+FROM nginx:alpine AS rookery
+COPY site/nginx.conf /etc/nginx/conf.d/default.conf
+RUN rm -f /usr/share/nginx/html/index.html /usr/share/nginx/html/50x.html
+COPY --from=build /site /usr/share/nginx/html
+EXPOSE 80