diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..11e3759 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,33 @@ +# 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;"] \ No newline at end of file