Summary
packaging/docker/Dockerfile.den does not copy or build the packages/email package, but den-api depends on @openwork/email at runtime. This causes the Cloud Build step to fail with a missing module error.
Steps to Reproduce
- Clone the repo
- Run
gcloud builds submit (or docker build) using packaging/docker/Dockerfile.den
- Build fails during
pnpm --dir /app/ee/apps/den-api run build
Fix
Add the following to Dockerfile.den (after the packages/types lines):
COPY packages/email/package.json /app/packages/email/package.json
And after the COPY packages/types line:
COPY packages/email /app/packages/email
And add a build step before den-db:
RUN pnpm --dir /app/packages/email run build
Environment
- Cloud Run (Google Cloud)
- Docker build via Cloud Build
Summary
packaging/docker/Dockerfile.dendoes not copy or build thepackages/emailpackage, butden-apidepends on@openwork/emailat runtime. This causes the Cloud Build step to fail with a missing module error.Steps to Reproduce
gcloud builds submit(ordocker build) usingpackaging/docker/Dockerfile.denpnpm --dir /app/ee/apps/den-api run buildFix
Add the following to
Dockerfile.den(after thepackages/typeslines):COPY packages/email/package.json /app/packages/email/package.jsonAnd after the
COPY packages/typesline:COPY packages/email /app/packages/emailAnd add a build step before
den-db:RUN pnpm --dir /app/packages/email run buildEnvironment