Initial commit: Edu Helper (Docker, React, Express, Prisma)
Made-with: Cursor
This commit is contained in:
+29
@@ -0,0 +1,29 @@
|
||||
FROM node:22-alpine AS frontend-build
|
||||
WORKDIR /app/frontend
|
||||
COPY frontend/package.json frontend/package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY frontend/ ./
|
||||
RUN npm run build
|
||||
|
||||
FROM node:22-alpine AS backend-build
|
||||
WORKDIR /app/backend
|
||||
COPY backend/package.json backend/package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY backend/ ./
|
||||
RUN npx prisma generate
|
||||
RUN npm run build
|
||||
|
||||
FROM node:22-alpine
|
||||
RUN apk add --no-cache openssl libc6-compat
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
COPY --from=backend-build /app/backend/dist ./dist
|
||||
COPY --from=backend-build /app/backend/node_modules ./node_modules
|
||||
COPY --from=backend-build /app/backend/prisma ./prisma
|
||||
COPY --from=backend-build /app/backend/package.json ./package.json
|
||||
COPY --from=frontend-build /app/frontend/dist ./public
|
||||
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
||||
RUN chmod +x /docker-entrypoint.sh
|
||||
EXPOSE 3000
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
CMD ["node", "dist/index.js"]
|
||||
Reference in New Issue
Block a user