Spaces:
Sleeping
Sleeping
File size: 491 Bytes
a432b46 0ceeacd a432b46 285d2af a432b46 285d2af a432b46 0ceeacd a432b46 0ceeacd a432b46 285d2af a432b46 285d2af a432b46 0b49cb3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# Build stage
FROM node:20-alpine as build
WORKDIR /app
# Copy package files and install dependencies
COPY package.json package-lock.json ./
RUN npm ci
# Copy all files and build the project
COPY . .
RUN npm run build
# Serve stage
FROM node:20-alpine as serve
WORKDIR /app
# Install serve globally
RUN npm install -g serve
# Copy built files from previous stage
COPY --from=build /app/dist ./dist
# Expose port and start server
EXPOSE 7860
CMD ["serve", "-s", "dist", "-l", "7860"] |