This commit is contained in:
yiling
2026-06-02 14:57:03 +08:00
parent be29c21564
commit 35b0081e23
15 changed files with 378 additions and 74 deletions
+6 -4
View File
@@ -10,6 +10,8 @@ COPY --parents packages/*/package.json ./
# Install dependencies (including devDependencies for build tools)
RUN bun install --frozen-lockfile
RUN ls -la packages/transcode/node_modules
# Copy source code
COPY . .
@@ -29,13 +31,13 @@ COPY --from=mwader/static-ffmpeg:8.1 /ffprobe /usr/local/bin/
RUN apt-get update && apt-get install -y ripgrep bubblewrap socat && rm -rf /var/lib/apt/lists/*
# Copy sharp/img from builder (they are native and already installed)
COPY --from=builder /app/node_modules/sharp ./node_modules/sharp
COPY --from=builder /app/node_modules/@img ./node_modules/@img
# COPY --from=builder /app/packages/transcode/node_modules/sharp ./node_modules/sharp
# COPY --from=builder /app/packages/transcode/node_modules/@img ./node_modules/@img
# Manually install temporalio packages and prisma
# These need native bindings or CLI access in the runner environment
RUN bun add @temporalio/activity @temporalio/client @temporalio/worker @temporalio/workflow && \
bun add --dev --omit peer prisma
bun add --dev --omit peer prisma sharp
# Copy build artifacts and prisma config
COPY --from=builder /app/dist ./
@@ -47,4 +49,4 @@ EXPOSE 3000
# Default command: run migrations and start API server
# Can be overridden to run workers: bun worker-cli.js [domain]
CMD ["sh", "-c", "bun prisma migrate deploy && bun index.js serve"]
CMD ["sh", "-c", "bun prisma migrate deploy && bun api/src/index.js serve"]