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 -2
View File
@@ -60,9 +60,9 @@ services:
# Override to point at a different JDK install or pre-mounted Spark
# distribution. The entrypoint re-derives PATH from these at every
# container start, so overrides actually take effect.
# JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
# JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
# SPARK_HOME=/opt/spark
JAVA_HOME: ${JAVA_HOME:-/usr/lib/jvm/java-11-openjdk-amd64}
JAVA_HOME: ${JAVA_HOME:-/usr/lib/jvm/java-17-openjdk-amd64}
SPARK_HOME: ${SPARK_HOME:-/opt/spark}
# --- gunicorn.conf.py knobs (NOT read by common/config.py) ---