Some checks failed
CI / Scraper / Lint (push) Failing after 6s
CI / Scraper / Lint (pull_request) Failing after 6s
CI / Scraper / Test (push) Successful in 16s
CI / Scraper / Test (pull_request) Successful in 9s
CI / Scraper / Docker Push (push) Has been skipped
CI / Scraper / Docker Push (pull_request) Has been skipped
CI / UI / Build (push) Successful in 28s
CI / UI / Build (pull_request) Successful in 22s
CI / UI / Docker Push (pull_request) Has been skipped
CI / UI / Docker Push (push) Successful in 36s
iOS CI / Build (pull_request) Successful in 1m41s
iOS CI / Test (pull_request) Successful in 4m7s
- Go scraper: Version/Commit vars in main.go, injected via -ldflags; Server struct + New() updated; GET /health and new GET /api/version expose them - UI Dockerfile: ARG BUILD_VERSION/BUILD_COMMIT → ENV PUBLIC_BUILD_VERSION/PUBLIC_BUILD_COMMIT for SvelteKit - Footer: shows version+short commit when not 'dev' (text-zinc-800, subtle) - docker-compose: args blocks for scraper and ui build sections pass $GIT_TAG/$GIT_COMMIT
33 lines
866 B
Docker
33 lines
866 B
Docker
FROM node:22-alpine AS builder
|
|
WORKDIR /app
|
|
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci
|
|
|
|
COPY . .
|
|
|
|
# Build-time version info — injected by docker-compose or CI via --build-arg.
|
|
ARG BUILD_VERSION=dev
|
|
ARG BUILD_COMMIT=unknown
|
|
|
|
# Expose as PUBLIC_ env vars so SvelteKit's $env/dynamic/public can read them.
|
|
ENV PUBLIC_BUILD_VERSION=$BUILD_VERSION
|
|
ENV PUBLIC_BUILD_COMMIT=$BUILD_COMMIT
|
|
|
|
RUN npm run build
|
|
|
|
# ── Runtime image ──────────────────────────────────────────────────────────────
|
|
# adapter-node bundles all dependencies into build/ — no npm install needed.
|
|
FROM node:22-alpine
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app/build ./build
|
|
|
|
ENV NODE_ENV=production
|
|
ENV PORT=3000
|
|
ENV HOST=0.0.0.0
|
|
|
|
EXPOSE $PORT
|
|
CMD ["node", "build"]
|
|
|