fix(deploy): align JAVA_HOME default to JDK 17 (match Dockerfile)

The Dockerfile installs openjdk-17-jre-headless and sets
JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64, but the entrypoint
default was still /usr/lib/jvm/java-11-openjdk-amd64. The
validation caught the mismatch at container start:

  [entrypoint] FATAL: JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
  but /usr/lib/jvm/java-11-openjdk-amd64/bin/java is missing or
  not executable

That's exactly the failure mode the validation is designed to catch
- the deployment config got out of sync. Aligning all four files
(Dockerfile, entrypoint, .env.example, docker-compose.yml) to
java-17-openjdk-amd64.

No app code touched. 165/165 still pass.
This commit is contained in:
Claude
2026-06-25 17:27:27 +08:00
parent f2a3784b5c
commit 0cb7605afa
3 changed files with 8 additions and 7 deletions
+2 -1
View File
@@ -23,7 +23,8 @@
set -e
# Defaults match the Dockerfile's build-time ENV
: "${JAVA_HOME:=/usr/lib/jvm/java-11-openjdk-amd64}"
# (openjdk-17-jre-headless + Spark 3.5.8)
: "${JAVA_HOME:=/usr/lib/jvm/java-17-openjdk-amd64}"
: "${SPARK_HOME:=/opt/spark}"
# --- Validation (fail fast with a clear error) ---