Add root Dockerfile for Dokploy deployment

This commit is contained in:
2026-01-28 16:36:19 +00:00
parent bc454e6fdc
commit a8212e8f1d

29
Dockerfile Normal file
View File

@@ -0,0 +1,29 @@
FROM oven/bun:1 as builder
WORKDIR /app
# Copy the entire repo
COPY . .
# Install dependencies for API
WORKDIR /app/apps/api
RUN bun install --frozen-lockfile
# Production image
FROM oven/bun:1-slim
WORKDIR /app
# Copy from builder
COPY --from=builder /app/apps/api/node_modules ./node_modules
COPY --from=builder /app/apps/api/package.json ./
COPY --from=builder /app/apps/api/src ./src
COPY --from=builder /app/apps/api/drizzle.config.ts ./
# Set environment
ENV NODE_ENV=production
ENV PORT=3001
EXPOSE 3001
CMD ["sh", "-c", "bun run db:push && bun run start"]