Production deploy setup + finish AppForge rebrand
- Backend now serves the built frontend (dist) + SPA fallback for single-service deploy - Schema applied idempotently on boot (ensureSchema) + working db:push script - Add Dockerfile + .dockerignore + start script - Footer credit removed; default app name -> AppForge; docs/package.json de-attributed Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
1a8b8ee5a0
commit
fd72540b6a
+26
@@ -0,0 +1,26 @@
|
||||
# AppForge — single-service production image
|
||||
# Builds the Vite frontend and runs the Express backend, which serves both the
|
||||
# API (/api), uploaded files (/storage), and the built frontend (SPA).
|
||||
|
||||
FROM node:20-bookworm-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# System deps occasionally needed by build tooling
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install dependencies (full install — tsx/vite are needed for build & runtime)
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
|
||||
# Copy source and build the frontend
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV PORT=3000
|
||||
EXPOSE 3000
|
||||
|
||||
# The server applies the DB schema on boot (idempotent) and serves everything
|
||||
CMD ["npm", "run", "start"]
|
||||
Reference in New Issue
Block a user