diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 27d382e..0000000 --- a/Dockerfile +++ /dev/null @@ -1,57 +0,0 @@ -# Stage 1: Install dependencies and build -FROM oven/bun:1 AS builder - -WORKDIR /app - -# Install git for submodule handling -RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* - -# Copy package files first for better caching -COPY package.json bun.lock* ./ -COPY prisma ./prisma/ - -# Install dependencies -RUN bun install --frozen-lockfile - -# Copy the rest of the application -COPY . . - -# Initialize git submodules if .gitmodules exists -RUN if [ -f .gitmodules ]; then \ - git init && \ - git submodule update --init --recursive; \ - fi - -# Generate Prisma client -RUN bunx prisma generate - -# Build the application -ENV NEXT_TELEMETRY_DISABLED=1 -ENV NODE_ENV=production -RUN bun run build - -# Stage 2: Production image -FROM oven/bun:1-slim AS runner - -WORKDIR /app - -ENV NODE_ENV=production -ENV NEXT_TELEMETRY_DISABLED=1 - -# Create non-root user -RUN addgroup --system --gid 1001 nodejs && \ - adduser --system --uid 1001 nextjs - -# Copy built assets -COPY --from=builder /app/public ./public -COPY --from=builder /app/.next/standalone ./ -COPY --from=builder /app/.next/static ./.next/static - -USER nextjs - -EXPOSE 3009 - -ENV PORT=3009 -ENV HOSTNAME="0.0.0.0" - -CMD ["bun", "start"]