Repository navigation
fix(template): ship a buildable Spring Boot app and drop the shared ALB priority - #5
Merged
Merged
Conversation
…LB priority The Dockerfile ran ./mvnw package but the template had no mvnw or pom.xml, so a repo made from it could not build. Add a minimal Spring Boot 4 app (Java 21, Maven wrapper) that serves / and /actuator/health on 8080, runs as user 1000 and only writes to /tmp, and point compute.health_check at /actuator/health. Remove routing.priority: 100, which every repo made from the template shared and which collided on deploy (PriorityInUse); the platform derives one. Order the README steps so the repo is added to the GitHub team before the first push to main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
./mvnw package, but the template has nomvnworpom.xml. A repo created from it fails at the Docker build on its first push.app.yamlsetscompute.health_check: /health. A Spring Boot app serves/actuator/healthunless configured otherwise, so the ALB health check would fail even once the app builds.app.yamlshipsrouting.priority: 100. Every repo created from the template gets that same value, and the second one to deploy hitsPriorityInUse(jz-watch did).main. CI checks repo → team before it hands out credentials.Change
GET /andGET /actuator/healthon 8080 and exposes only thehealthactuator endpoint over HTTP. It includes a@SpringBootTestthat checks both paths.dependency:go-offlineso dependencies are cached between builds. It runs asUSER 1000withjava.io.tmpdir=/tmp, the same as the platform's non-root, read-only-root container. Adds.dockerignore, and addstarget/to.gitignore.app.yaml: setshealth_check: /actuator/healthand removesrouting.priority. A comment explains that the platform derives a priority and when you would still set one yourself.Depends on
The generator on platform
mainstill requiresrouting.priority(routing.priority is required: a unique integer 1-50000). Merge this after javaBin/platform#181, which derives the priority. Until then, a repo made from this template fails at theexpandstep.Verification
docker build .: succeeds.docker run --read-only --tmpfs /tmp -p 18080:8080:GET /actuator/health→{"groups":["liveness","readiness"],"status":"UP"},GET /→ 200,/actuator/env→ 404,id→uid=1000../mvnw -B verify(ineclipse-temurin:21-jdk-alpine): 2 tests, 0 failures.generate-modules.pyagainst thisapp.yamlproduceshealth_check_path = "/actuator/health"and a derivedlistener_rule_priority. With the generator on platformmainit fails as described above.🤖 Generated with Claude Code