mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-09 15:07:55 -05:00
* feat: implement native ARM64 Docker builds with CDN support - Replace QEMU emulation with native ARM64/AMD64 runners (linux-arm64-8-core, linux-x64-8-core) - Fix manifest creation with proper error handling and image existence checks - Add CDN video support with getVideoUrl function and Video component - Update all docs MDX files to use Video component instead of raw video tags - Update GitHub Actions workflow to use architecture-specific builds - Remove QEMU setup to eliminate emulation timeout issues - Maintain multi-arch Docker image support through manifests * Update .github/workflows/build.yml Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
65 lines
1.6 KiB
Docker
65 lines
1.6 KiB
Docker
# ========================================
|
|
# Base Stage: Alpine Linux with Bun
|
|
# ========================================
|
|
FROM oven/bun:alpine AS base
|
|
|
|
# ========================================
|
|
# Dependencies Stage: Install Dependencies
|
|
# ========================================
|
|
FROM base AS deps
|
|
RUN apk add --no-cache libc6-compat
|
|
WORKDIR /app
|
|
|
|
# Install turbo globally
|
|
RUN bun install -g turbo
|
|
|
|
COPY package.json bun.lock ./
|
|
RUN mkdir -p apps
|
|
COPY apps/sim/package.json ./apps/sim/package.json
|
|
|
|
RUN bun install --omit dev --ignore-scripts
|
|
|
|
# ========================================
|
|
# Builder Stage: Build the Application
|
|
# ========================================
|
|
FROM base AS builder
|
|
WORKDIR /app
|
|
|
|
# Install turbo globally in builder stage
|
|
RUN bun install -g turbo
|
|
|
|
COPY --from=deps /app/node_modules ./node_modules
|
|
COPY . .
|
|
|
|
# Installing with full context to prevent missing dependencies error
|
|
RUN bun install --omit dev --ignore-scripts
|
|
|
|
# Required for standalone nextjs build
|
|
WORKDIR /app/apps/sim
|
|
RUN bun install sharp
|
|
|
|
ENV NEXT_TELEMETRY_DISABLED=1 \
|
|
VERCEL_TELEMETRY_DISABLED=1 \
|
|
DOCKER_BUILD=1
|
|
|
|
WORKDIR /app
|
|
RUN bun run build
|
|
|
|
# ========================================
|
|
# Runner Stage: Run the actual app
|
|
# ========================================
|
|
|
|
FROM base AS runner
|
|
WORKDIR /app
|
|
|
|
ENV NODE_ENV=production
|
|
|
|
COPY --from=builder /app/apps/sim/public ./apps/sim/public
|
|
COPY --from=builder /app/apps/sim/.next/standalone ./
|
|
COPY --from=builder /app/apps/sim/.next/static ./apps/sim/.next/static
|
|
|
|
EXPOSE 3000
|
|
ENV PORT=3000 \
|
|
HOSTNAME="0.0.0.0"
|
|
|
|
CMD ["bun", "apps/sim/server.js"] |