mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
feat(bun): upgrade to bun, reduce docker image size by 95%, upgrade docs & ci (#371)
* 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>
This commit is contained in:
co-authored by
Aditya Tripathi
parent
e57d3f79a1
commit
717e17d02a
@@ -0,0 +1,28 @@
|
||||
# ========================================
|
||||
# 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
|
||||
Reference in New Issue
Block a user