All checks were successful
Release / Scraper / Test (push) Successful in 10s
Release / UI / Build (push) Successful in 26s
Release / v2 / Build ui-v2 (push) Successful in 17s
Release / Scraper / Docker (push) Successful in 47s
Release / UI / Docker (push) Successful in 56s
CI / Scraper / Lint (pull_request) Successful in 7s
CI / Scraper / Test (pull_request) Successful in 8s
CI / UI / Build (pull_request) Successful in 16s
CI / Scraper / Docker Push (pull_request) Has been skipped
CI / UI / Docker Push (pull_request) Has been skipped
Release / v2 / Docker / ui-v2 (push) Successful in 56s
Release / v2 / Test backend (push) Successful in 4m35s
iOS CI / Build (pull_request) Successful in 4m28s
Release / v2 / Docker / backend (push) Successful in 1m29s
Release / v2 / Docker / runner (push) Successful in 1m39s
iOS CI / Test (pull_request) Successful in 9m51s
- backend/: Go API server and runner binaries with PocketBase + MinIO storage - ui-v2/: SvelteKit frontend rewrite - docker-compose-new.yml: compose file for the v2 stack - .gitea/workflows/release-v2.yaml: CI/CD for backend, runner, and ui-v2 Docker Hub images - scripts/pb-init.sh: migrate from wget to curl, add superuser bootstrap for fresh installs - .env.example: document DOCKER_BUILDKIT=1 for Colima users
40 lines
1.3 KiB
Docker
40 lines
1.3 KiB
Docker
# syntax=docker/dockerfile:1
|
|
FROM node:22-alpine AS builder
|
|
WORKDIR /app
|
|
|
|
# Install dependencies in a separate layer so it is cached as long as
|
|
# package-lock.json does not change. The npm cache mount persists the
|
|
# ~/.npm cache across builds so packages are not re-downloaded.
|
|
COPY package.json package-lock.json ./
|
|
RUN --mount=type=cache,target=/root/.npm \
|
|
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 server-side dependencies into build/ — no npm install
|
|
# needed at runtime. We do need package.json (for "type": "module") so Node
|
|
# resolves the ESM output correctly when there is no parent package.json.
|
|
FROM node:22-alpine
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app/build ./build
|
|
COPY --from=builder /app/package.json ./package.json
|
|
|
|
ENV NODE_ENV=production
|
|
ENV PORT=3000
|
|
ENV HOST=0.0.0.0
|
|
|
|
EXPOSE $PORT
|
|
CMD ["node", "build"]
|