Created
March 1, 2025 19:05
-
-
Save alnutile/e659e492ec132a5fe5172206d0564a1a to your computer and use it in GitHub Desktop.
Might be a better way to host lovable on coolfiy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build stage | |
FROM node:20-alpine as builder | |
WORKDIR /app | |
# Copy package files | |
COPY package*.json ./ | |
COPY bun.lockb ./ | |
# Install dependencies | |
RUN npm ci | |
# Copy source files | |
COPY . . | |
# Build the application | |
RUN npm run build | |
# Production stage | |
FROM node:20-alpine | |
WORKDIR /app | |
# Install serve to run the application | |
RUN npm install -g serve | |
# Copy built assets from builder stage | |
COPY --from=builder /app/dist ./dist | |
# Expose port 3000 | |
EXPOSE 3000 | |
# Start the application | |
CMD ["serve", "-s", "dist", "-l", "3000"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment