Files
horizon-airdef/website/Dockerfile
T
Ludovic Marie a13e6b40ce Website: a documentation section for the whole project, replacing the server page
/docs has a left navigation and eleven pages written for players first, then
hosters, then contributors: what Horizon is, install, settings, multiplayer,
logs and bug reports, hosting (the launcher's Servers page and the command
line), modpacks, mods and data packs, performance, contributing and the FAQ.
/server redirects to /docs/hosting. The build checks every link between the
pages and every image.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 16:24:23 +02:00

20 lines
738 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 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"]