You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
478 B
Docker
22 lines
478 B
Docker
# Use official Bun image with Alpine for smaller size
|
|
FROM oven/bun:1.1-alpine as base
|
|
WORKDIR /app
|
|
|
|
# Install dependencies first (better layer caching)
|
|
COPY package.json bun.lock ./
|
|
RUN bun install
|
|
|
|
# Copy only necessary files
|
|
COPY src/ ./src/
|
|
COPY index.ts ./
|
|
|
|
# Health check
|
|
# HEALTHCHECK --interval=30s --timeout=3s \
|
|
# CMD curl -f http://localhost:3007/health || exit 1
|
|
|
|
# Server runs on port 3007 by default
|
|
EXPOSE 3007
|
|
|
|
# Start the server
|
|
CMD ["bun", "run", "index.ts"]
|