mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-28 03:00:29 -04:00
* migrate to bun * added envvars to drizzle * upgrade bun devcontainer feature to a valid one * added bun, docker not working * updated envvars, updated to bunder and esnext modules * fixed build, reinstated otel * feat: optimized multi-stage docker images * add coerce for boolean envvar * feat: add docker-compose configuration for local LLM services and remove legacy Dockerfile and entrypoint script * feat: add docker-compose files for local and production environments, and implement GitHub Actions for Docker image build and publish * refactor: remove unused generateStaticParams function from various API routes and maintain dynamic rendering * cleanup * upgraded bun * updated ci * fixed build --------- Co-authored-by: Aditya Tripathi <aditya@climactic.co>
28 lines
966 B
Docker
28 lines
966 B
Docker
# ========================================
|
|
# Dependencies Stage: Install Dependencies
|
|
# ========================================
|
|
FROM oven/bun:alpine AS deps
|
|
WORKDIR /app
|
|
|
|
# Copy only package files needed for migrations
|
|
COPY package.json bun.lock turbo.json ./
|
|
COPY apps/sim/package.json ./apps/sim/db/
|
|
|
|
# Install minimal dependencies in one layer
|
|
RUN bun install --omit dev --ignore-scripts && \
|
|
bun install --omit dev --ignore-scripts drizzle-kit drizzle-orm postgres next-runtime-env
|
|
|
|
# ========================================
|
|
# Runner Stage: Production Environment
|
|
# ========================================
|
|
FROM oven/bun:alpine AS runner
|
|
WORKDIR /app
|
|
|
|
# Copy only the necessary files from deps
|
|
COPY --from=deps /app/node_modules ./node_modules
|
|
COPY apps/sim/drizzle.config.ts ./apps/sim/drizzle.config.ts
|
|
COPY apps/sim/db ./apps/sim/db
|
|
COPY apps/sim/package.json ./apps/sim/package.json
|
|
COPY apps/sim/lib/env.ts ./apps/sim/lib/env.ts
|
|
|
|
WORKDIR /app/apps/sim |