diff --git a/backend/Dockerfile b/backend/Dockerfile index 7fd4ea2..af64bb2 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,28 +1,20 @@ FROM node:20-alpine AS base WORKDIR /app -# Install dependencies -FROM base AS install +# Install Bun RUN npm install -g bun -COPY package.json ./ + +# Install dependencies +COPY package.json bun.lockb* ./ RUN bun install -# Build -FROM base AS build -COPY --from=install /app/node_modules ./node_modules +# Copy source code COPY . . -RUN bun build - -# Production -FROM base AS release -RUN npm install -g bun -COPY --from=install /app/node_modules ./node_modules -COPY --from=build /app/dist ./dist -COPY package.json . ENV NODE_ENV=production ENV PORT=3001 EXPOSE 3001 -CMD ["bun", "run", "start"] +# Run directly from TypeScript source (Bun can execute TypeScript directly) +CMD ["bun", "run", "src/index.ts"]