added rough mainnet implementation and added backup contact for email
This commit is contained in:
41
Dockerfile
Normal file
41
Dockerfile
Normal file
@@ -0,0 +1,41 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
# 1) Install dependencies
|
||||
FROM --platform=linux/amd64 node:20-alpine AS deps
|
||||
WORKDIR /app
|
||||
ENV CI=true
|
||||
# Install system deps commonly needed by Next.js
|
||||
RUN apk add --no-cache libc6-compat
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci --legacy-peer-deps --no-audit --no-fund
|
||||
|
||||
# 2) Build the app
|
||||
FROM --platform=linux/amd64 node:20-alpine AS builder
|
||||
WORKDIR /app
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
# Allow passing public env vars at build time
|
||||
ARG NEXT_PUBLIC_NTFY_URL
|
||||
ARG NEXT_PUBLIC_SCHEDY_URL
|
||||
ENV NEXT_PUBLIC_NTFY_URL=${NEXT_PUBLIC_NTFY_URL:-/ntfy}
|
||||
ENV NEXT_PUBLIC_SCHEDY_URL=${NEXT_PUBLIC_SCHEDY_URL:-/schedy}
|
||||
RUN npm run build
|
||||
|
||||
# 3) Run with standalone output
|
||||
FROM --platform=linux/amd64 node:20-alpine AS runner
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
# Create non-root user
|
||||
RUN adduser -D nextjs
|
||||
# Copy the minimal standalone output
|
||||
COPY --from=builder /app/public ./public
|
||||
COPY --from=builder /app/.next/standalone ./
|
||||
COPY --from=builder /app/.next/static ./.next/static
|
||||
COPY --from=builder /app/.next/BUILD_ID ./.next/BUILD_ID
|
||||
# Expose and run
|
||||
EXPOSE 3000
|
||||
ENV PORT=3000 HOST=0.0.0.0
|
||||
USER nextjs
|
||||
CMD ["node", "server.js"]
|
||||
Reference in New Issue
Block a user