mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-08 22:48:14 -05:00
improvement(code-structure): move db into separate package (#1364)
* improvement(code-structure): move db into separate package * make db separate package * remake bun lock * update imports to not maintain two separate ones * fix CI for tests by adding dummy url * vercel build fix attempt * update bun lock * regenerate bun lock * fix mocks * remove db commands from apps/sim package json
This commit is contained in:
committed by
GitHub
parent
325a666a8b
commit
9de7a00373
@@ -6,11 +6,11 @@ WORKDIR /app
|
||||
|
||||
# Copy only package files needed for migrations
|
||||
COPY package.json bun.lock turbo.json ./
|
||||
COPY apps/sim/package.json ./apps/sim/db/
|
||||
COPY packages/db/package.json ./packages/db/package.json
|
||||
|
||||
# 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 zod @t3-oss/env-nextjs
|
||||
bun install --omit dev --ignore-scripts drizzle-kit drizzle-orm postgres
|
||||
|
||||
# ========================================
|
||||
# Runner Stage: Production Environment
|
||||
@@ -20,9 +20,7 @@ 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
|
||||
COPY packages/db/drizzle.config.ts ./packages/db/drizzle.config.ts
|
||||
COPY packages/db ./packages/db
|
||||
|
||||
WORKDIR /app/apps/sim
|
||||
WORKDIR /app/packages/db
|
||||
@@ -36,8 +36,9 @@ WORKDIR /app
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
# Copy the entire sim app since socket-server has dependencies on other modules
|
||||
# Copy the sim app and the shared db package needed by socket-server
|
||||
COPY --from=builder /app/apps/sim ./apps/sim
|
||||
COPY --from=builder /app/packages/db ./packages/db
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
COPY --from=builder /app/package.json ./package.json
|
||||
|
||||
|
||||
Reference in New Issue
Block a user