Skip to content

Instantly share code, notes, and snippets.

@alnutile
Created March 1, 2025 19:05
Show Gist options
  • Save alnutile/e659e492ec132a5fe5172206d0564a1a to your computer and use it in GitHub Desktop.
Save alnutile/e659e492ec132a5fe5172206d0564a1a to your computer and use it in GitHub Desktop.
Might be a better way to host lovable on coolfiy
# 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