fix(mana-credits): rewrite Dockerfile to use WORKDIR instead of cd

The previous version chained cd + bun install with || fallback, which
left CWD in services/mana-credits after the first attempt and caused the
fallback cd to fail. Use WORKDIR directives instead — each step starts
from a known absolute path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-11 16:30:34 +02:00
parent 12bbe29a47
commit c9a3c8c989

View file

@ -8,10 +8,12 @@ COPY services/mana-credits/package.json ./services/mana-credits/
COPY packages/shared-hono/package.json ./packages/shared-hono/
COPY packages/shared-types/package.json ./packages/shared-types/
# Install dependencies
RUN cd services/mana-credits && bun install --frozen-lockfile 2>/dev/null || cd services/mana-credits && bun install
# Install dependencies (workspace-aware install from root)
WORKDIR /app/services/mana-credits
RUN bun install
# Copy source (workspace deps + service)
WORKDIR /app
COPY packages/shared-hono ./packages/shared-hono
COPY packages/shared-types ./packages/shared-types
COPY services/mana-credits/src ./services/mana-credits/src