diff --git a/Dockerfile b/Dockerfile index 155eb78..f08a1a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,23 +1,13 @@ FROM node:20-alpine AS builder - WORKDIR /app - COPY package*.json ./ RUN npm install --legacy-peer-deps - COPY . . RUN npm run build FROM node:20-alpine - WORKDIR /app -ENV NODE_ENV=production -ENV PORT=3000 - -COPY --from=builder /app/package*.json ./ -COPY --from=builder /app/.next ./.next -COPY --from=builder /app/public ./public -COPY --from=builder /app/node_modules ./node_modules - +COPY --from=builder /app/dist ./dist +RUN npm install -g serve EXPOSE 3000 -CMD ["npm", "start"] +CMD ["serve", "-s", "dist"] diff --git a/stack.yaml b/stack.yaml index f28df13..818d468 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,12 +1,10 @@ version: "3.9" services: - simple-travel-frontend: + simple-travel-front-admin: image: muhammadvadud/simple-travel-front-admin:latest ports: - "5263:3000" - env_file: - - .env deploy: replicas: 2 restart_policy: