Changing Dockerfile
Some checks failed
Music Collection CI Workflow / test (./frontend) (push) Successful in 19s
Music Collection CI Workflow / test (./backend) (push) Successful in 22s
Music Collection CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/msuic-collection-backend, ./backend) (push) Successful in 49s
Music Collection CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/music-collection-frontend, ./frontend) (push) Failing after 45s
Music Collection CI Workflow / deploy (push) Has been skipped
Some checks failed
Music Collection CI Workflow / test (./frontend) (push) Successful in 19s
Music Collection CI Workflow / test (./backend) (push) Successful in 22s
Music Collection CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/msuic-collection-backend, ./backend) (push) Successful in 49s
Music Collection CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/music-collection-frontend, ./frontend) (push) Failing after 45s
Music Collection CI Workflow / deploy (push) Has been skipped
This commit is contained in:
parent
816a813857
commit
3b09eb4230
@ -1,27 +1,13 @@
|
||||
FROM node:18-alpine as base
|
||||
RUN apk add --no-cache g++ make py3-pip libc6-compat
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
EXPOSE 3000
|
||||
|
||||
FROM base as builder
|
||||
# Build Stage
|
||||
FROM node:23-alpine AS build
|
||||
WORKDIR /app
|
||||
COPY ./package*.json ./
|
||||
RUN npm install
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
FROM base as production
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV=production
|
||||
RUN npm ci
|
||||
|
||||
RUN addgroup -g 1001 -S nodejs
|
||||
RUN adduser -S nextjs -u 1001
|
||||
USER nextjs
|
||||
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/.next ./.next
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
COPY --from=builder /app/package.json ./package.json
|
||||
COPY --from=builder /app/public ./public
|
||||
|
||||
CMD npm start
|
||||
# Production Stage
|
||||
FROM nginx:stable-alpine AS production
|
||||
COPY --from=build /app/build /usr/share/nginx/html
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user