closest ive gotten to getting it up & running

This commit is contained in:
2026-01-13 15:44:40 -06:00
parent 055e3a0cba
commit c4d78428e6
2 changed files with 18 additions and 39 deletions

View File

@@ -1,34 +1,18 @@
# syntax=docker/dockerfile:1
FROM oven/bun:alpine AS base
# Install dependencies only when needed
FROM base AS deps
# Builder stage - do everything here
FROM base AS builder
RUN apk add --no-cache libc6-compat
WORKDIR /app
# Copy root package files
COPY package.json turbo.json ./
COPY bun.lockb* ./
COPY apps/next/package.json ./apps/next/package.json
COPY packages/backend/package.json ./packages/backend/package.json
COPY tools/*/package.json ./tools/
# Install dependencies
RUN bun install --frozen-lockfile
# Builder stage
FROM base AS builder
WORKDIR /app
# Copy dependencies
COPY --from=deps /app/node_modules ./node_modules
COPY --from=deps /app/apps/next/node_modules ./apps/next/node_modules
COPY --from=deps /app/packages/backend/node_modules ./packages/backend/node_modules
# Copy source code
# Copy all source code first
COPY . .
# Build
# Install dependencies (this will create proper workspace structure)
RUN bun install
# Build the Next.js app
ENV NEXT_TELEMETRY_DISABLED=1
ENV SKIP_ENV_VALIDATION=1
RUN bun run build --filter=@gib/next
@@ -49,9 +33,7 @@ COPY --from=builder --chown=nextjs:nodejs /app/apps/next/.next/static ./apps/nex
COPY --from=builder --chown=nextjs:nodejs /app/apps/next/public ./apps/next/public
USER nextjs
EXPOSE 3000
ENV PORT=3000
ENV HOSTNAME="0.0.0.0"