initial project setup
Fastify + Prisma backend, React + Vite frontend, Docker deployment. Multi-board feedback platform with anonymous cookie auth, passkey upgrade path, ALTCHA spam protection, plugin system, and full privacy-first architecture.
This commit is contained in:
36
Dockerfile
Normal file
36
Dockerfile
Normal file
@@ -0,0 +1,36 @@
|
||||
FROM node:20-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json package-lock.json* ./
|
||||
COPY packages/api/package.json packages/api/
|
||||
COPY packages/web/package.json packages/web/
|
||||
|
||||
RUN npm install
|
||||
|
||||
COPY tsconfig.json ./
|
||||
COPY packages/api/ packages/api/
|
||||
COPY packages/web/ packages/web/
|
||||
COPY echoboard.plugins.ts ./
|
||||
|
||||
RUN npx prisma generate --schema=packages/api/prisma/schema.prisma
|
||||
RUN npm run build:web
|
||||
RUN npm run build:api
|
||||
|
||||
FROM node:20-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app/package.json ./
|
||||
COPY --from=builder /app/packages/api/package.json packages/api/
|
||||
COPY --from=builder /app/packages/api/dist packages/api/dist/
|
||||
COPY --from=builder /app/packages/api/prisma packages/api/prisma/
|
||||
COPY --from=builder /app/packages/api/node_modules packages/api/node_modules/
|
||||
COPY --from=builder /app/packages/web/dist packages/web/dist/
|
||||
COPY --from=builder /app/node_modules node_modules/
|
||||
COPY --from=builder /app/echoboard.plugins.ts ./
|
||||
|
||||
ENV NODE_ENV=production
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["sh", "-c", "npx prisma migrate deploy --schema=packages/api/prisma/schema.prisma && node packages/api/dist/index.js"]
|
||||
Reference in New Issue
Block a user