Server Deploy / deploy (push) Successful in 5m8s
FREE_INSTANCE_REAP_AFTER is set only in docker-compose.site.yml, so a self-hosted deployment can never reap. Admin and server must carry the same value: one names the deletion date in warnings, the other acts on it. Records that admin now has a second control-plane write path, cloudprov, and that deletion lives in the control plane because that is where the knowledge of what an instance is made of belongs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
55 lines
1.5 KiB
Docker
55 lines
1.5 KiB
Docker
# Dependencies stage
|
|
FROM node:26-alpine AS deps
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package.json package-lock.json* ./
|
|
RUN npm install
|
|
|
|
# Build stage
|
|
FROM node:26-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=deps /app/node_modules ./node_modules
|
|
COPY . .
|
|
|
|
# Baked in at build time: NEXT_PUBLIC_* values are inlined into the client
|
|
# bundle. SITE_API is the browser-reachable URL of sitesvc, which serves both
|
|
# forms. It is effectively required: leave it empty and both forms report they
|
|
# are not connected rather than submitting anywhere. Must be an origin the
|
|
# browser can reach (not the internal sitesvc:8082) and be listed in sitesvc's
|
|
# SITE_ORIGIN for CORS.
|
|
ARG NEXT_PUBLIC_SITE_API=""
|
|
ARG NEXT_PUBLIC_CONTACT_EMAIL="support@hostxtra.co.uk"
|
|
# Browser-reachable admin URL; site/lib/submit.ts posts account signups here.
|
|
ARG NEXT_PUBLIC_ADMIN_API_URL=""
|
|
ENV NEXT_PUBLIC_SITE_API=$NEXT_PUBLIC_SITE_API
|
|
ENV NEXT_PUBLIC_CONTACT_EMAIL=$NEXT_PUBLIC_CONTACT_EMAIL
|
|
ENV NEXT_PUBLIC_ADMIN_API_URL=$NEXT_PUBLIC_ADMIN_API_URL
|
|
|
|
RUN npm run build
|
|
|
|
# Runtime stage
|
|
FROM node:26-alpine AS runner
|
|
|
|
WORKDIR /app
|
|
|
|
ENV NODE_ENV=production
|
|
ENV NEXT_TELEMETRY_DISABLED=1
|
|
|
|
RUN addgroup --system --gid 1001 nodejs && \
|
|
adduser --system --uid 1001 nextjs
|
|
|
|
COPY --from=builder /app/public ./public
|
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
|
|
|
USER nextjs
|
|
|
|
EXPOSE 3000
|
|
ENV PORT=3000
|
|
ENV HOSTNAME="0.0.0.0"
|
|
|
|
CMD ["node", "server.js"]
|