f1d25ecc79
- Add Dockerfile for multi-stage production build - Add Drizzle configuration and initial migration for PostgreSQL schema - Add project configuration files (.prettierrc, .prettierignore, .dockerignore) - Define core database tables: assets, memberships, site_settings
28 lines
481 B
Docker
28 lines
481 B
Docker
# ---- Build Stage ----
|
|
FROM node:22-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci --ignore-scripts
|
|
|
|
COPY . .
|
|
|
|
RUN npm run build
|
|
|
|
# ---- Production Stage ----
|
|
FROM node:22-alpine AS runner
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app/package.json /app/package-lock.json ./
|
|
COPY --from=builder /app/build ./build
|
|
COPY --from=builder /app/node_modules ./node_modules
|
|
|
|
ENV NODE_ENV=production
|
|
ENV PORT=3000
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["node", "build/index.js"]
|