fix: add disk cleanup to CI and reduce Docker layers
Build & Deploy / build-and-push (backend) (push) Successful in 7m34s
Build & Deploy / build-and-push (discord-gateway) (push) Failing after 8m19s
Build & Deploy / build-and-push (proxy) (push) Failing after 1m12s
Build & Deploy / build-and-push (backend) (push) Successful in 7m34s
Build & Deploy / build-and-push (discord-gateway) (push) Failing after 8m19s
Build & Deploy / build-and-push (proxy) (push) Failing after 1m12s
Runner runs out of disk space during discord-gateway build. Add docker system prune before build and combine Dockerfile layers to reduce disk usage. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
540a71f983
commit
7bebb23c1d
@@ -27,11 +27,12 @@ COPY packages/shared ./packages/shared
|
||||
COPY services/discord-gateway ./services/discord-gateway
|
||||
COPY services/discord-gateway/drizzle ./drizzle
|
||||
|
||||
# Build
|
||||
# Build (combined to reduce layers)
|
||||
RUN --mount=type=cache,id=pnpm-store,target=/root/.local/share/pnpm/store \
|
||||
pnpm --filter './packages/shared' run build
|
||||
RUN --mount=type=cache,id=pnpm-store,target=/root/.local/share/pnpm/store \
|
||||
pnpm --filter './services/discord-gateway' run build
|
||||
pnpm --filter './packages/shared' run build \
|
||||
&& pnpm --filter './services/discord-gateway' run build \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Create production-only deployment (no devDeps)
|
||||
RUN pnpm deploy --legacy --filter '@bete/discord-gateway' /tmp/deploy \
|
||||
|
||||
Reference in New Issue
Block a user