Files
horizon-airdef/website/Dockerfile
T
Ludovic Marie fd154dcbba Website image: copy data/ so the build finds the roadmap
build.mjs reads website/data/roadmap.json since the hub (#1819), but the Dockerfile never
copied data/, so every site deploy since then failed and playhorizon.dev kept the old build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 17:13:06 +01:00

21 lines
755 B
Docker

# Railway builds this with the service's root directory set to `website`.
# Stage 1 renders dist/ from src/ and the README on main (no npm dependencies needed).
FROM node:22-alpine AS build
WORKDIR /site
COPY build.mjs ./
COPY src ./src
COPY docs ./docs
COPY data ./data
COPY public ./public
COPY LEGAL.md ./
ARG GITHUB_TOKEN
RUN node build.mjs
# Stage 2 serves it with Caddy on $PORT.
FROM caddy:2-alpine
COPY Caddyfile /etc/caddy/Caddyfile
COPY --from=build /site/dist /srv
ENV PORT=8080
# The Content-Security-Policy allows the page's inline script and style by the hashes the build wrote.
CMD ["sh", "-c", "CSP_SCRIPT=\"$(cat /srv/.csp-script)\" CSP_STYLE=\"$(cat /srv/.csp-style)\" exec caddy run --config /etc/caddy/Caddyfile --adapter caddyfile"]