mirror of
https://github.com/crocofied/CoreControl.git
synced 2025-12-18 07:56:57 +00:00
v0.0.3 dev->main
v0.0.3
This commit is contained in:
commit
460c9103f7
13
Dockerfile
13
Dockerfile
@ -4,32 +4,37 @@ FROM node:20-alpine AS builder
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json package-lock.json* ./
|
||||
|
||||
COPY ./prisma ./prisma
|
||||
|
||||
RUN npm install
|
||||
RUN npx prisma generate
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm run build
|
||||
|
||||
# Production Stage
|
||||
FROM node:20-alpine AS production
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV production
|
||||
|
||||
# Install production dependencies INCLUDING prisma
|
||||
COPY package.json package-lock.json* ./
|
||||
RUN npm install --production
|
||||
RUN npm install --production --ignore-scripts
|
||||
|
||||
# Copy needed Prisma files
|
||||
COPY --from=builder /app/node_modules/.prisma /app/node_modules/.prisma
|
||||
COPY --from=builder /app/node_modules/@prisma /app/node_modules/@prisma
|
||||
COPY --from=builder /app/prisma ./prisma
|
||||
|
||||
# Copy built application
|
||||
COPY --from=builder /app/.next ./.next
|
||||
COPY --from=builder /app/public ./public
|
||||
COPY --from=builder /app/package.json ./package.json
|
||||
COPY --from=builder /app/next.config.js* ./
|
||||
|
||||
EXPOSE 3000
|
||||
CMD ["npm", "start"]
|
||||
|
||||
# Run migrations first, then start app
|
||||
CMD ["sh", "-c", "npx prisma migrate deploy && npm start"]
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "corecontrol",
|
||||
"version": "0.0.2",
|
||||
"version": "0.0.3",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev --turbopack",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user