Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changeset/floppy-roses-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
37 changes: 25 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,39 @@ WORKDIR /app
# Copy package files
COPY package*.json ./

# Install dependencies (skip postinstall scripts like husky)
RUN npm ci --omit=dev --ignore-scripts
# Install ALL dependencies (including dev dependencies for TypeScript build)
RUN npm ci --ignore-scripts

# Copy source code
COPY . .

# Build the static site
# Build the TypeScript server
RUN npm run build

# Use nginx to serve static files
FROM nginx:alpine
# Production stage
FROM node:20-alpine

# Set working directory
WORKDIR /app

# Copy package files
COPY package*.json ./

# Install only production dependencies
RUN npm ci --omit=dev --ignore-scripts

# Copy built site from builder stage
COPY --from=builder /app/build /usr/share/nginx/html
# Copy built files from builder
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/server/public ./server/public
COPY --from=builder /app/static ./static
COPY --from=builder /app/registry ./registry

# Copy custom nginx configuration
COPY nginx.conf /etc/nginx/nginx.conf
# Set environment variables
ENV NODE_ENV=production
ENV PORT=8080

# Expose port 8080 (Fly.io default)
# Expose port
EXPOSE 8080

# Start nginx
CMD ["nginx", "-g", "daemon off;"]
# Start the server
CMD ["node", "dist/index.js"]
107 changes: 0 additions & 107 deletions nginx.conf

This file was deleted.

Loading