Files
coolsoup/Dockerfile
2025-09-29 15:23:47 +02:00

33 lines
652 B
Docker

# Use Node.js LTS as base image
FROM node:20-alpine
# Set working directory
WORKDIR /app
# Install git and pnpm
RUN apk add --no-cache git
RUN npm install -g pnpm
# Clone the repository
RUN git clone https://git.raphaelforment.fr/BuboBubo/coolsoup.git .
# Install dependencies
RUN pnpm install
# Build the application
RUN pnpm build
# Use nginx to serve the built application
FROM nginx:alpine
# Copy built files from previous stage
COPY --from=0 /app/dist /usr/share/nginx/html
# Copy nginx configuration if needed (optional)
# COPY nginx.conf /etc/nginx/nginx.conf
# Expose port 80
EXPOSE 80
# Start nginx
CMD ["nginx", "-g", "daemon off;"]