fix: discover sitespeed.js path at build time, export via /sitespeed_env
sitespeed.io is not on PATH in the container -- the base image uses a full absolute path for its ENTRYPOINT. We now run 'find' during the Docker build, write the path to /sitespeed_env, and source it in start.sh so SITESPEED_BIN is set before node app.js starts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,13 @@ COPY . .
|
||||
|
||||
RUN chmod +x /app/start.sh
|
||||
|
||||
# Locate sitespeed.js at build time and write the path to /sitespeed_env.
|
||||
# The base image sets sitespeed.io as ENTRYPOINT via a full path, so it is
|
||||
# not on $PATH. We find it once here so start.sh can export it at runtime.
|
||||
RUN SITESPEED_JS=$(find / -name 'sitespeed.js' -path '*/bin/*' 2>/dev/null | head -1); \
|
||||
echo "Build-time sitespeed.js found at: $SITESPEED_JS"; \
|
||||
echo "export SITESPEED_BIN=$SITESPEED_JS" > /sitespeed_env
|
||||
|
||||
# Create persistent directories
|
||||
RUN mkdir -p /data/reports
|
||||
|
||||
|
||||
Reference in New Issue
Block a user