fix missing/invalid_token: bake xc_token file + XC_TOKEN_FILE first; dual ENV; token_probe diagnostics (63 tests)

This commit is contained in:
Victor Cao
2026-10-17 07:38:59 +08:00
parent 0e47086e85
commit b79e05a856
12 changed files with 122 additions and 17 deletions

View File

@@ -8,12 +8,16 @@ WORKDIR /app
# Copy only what the runtime needs (see .dockerignore)
COPY src/ ./src/
COPY templates/ ./templates/
COPY config/secrets/xc_token /app/secrets/xc_token
RUN chmod 400 /app/secrets/xc_token
ENV PORT=8080
ENV PYTHONUNBUFFERED=1
# SECURITY: This Tag embeds a user EXTERNAL_SERVICE_TOKEN; rotate if leaked.
# Kill switch ALLOW_LIVE_SUBMIT=0 still works. STRATEGY_ID is supplied at runtime.
ENV EXTERNAL_SERVICE_TOKEN=4c44b92223c64bca9ed67701ceb2f4e8
ENV XC_TOKEN=4c44b92223c64bca9ed67701ceb2f4e8
ENV XC_TOKEN_FILE=/app/secrets/xc_token
EXPOSE 8080