fix(docker): make runner images actually resolvable + standalone layout

- api/worker: overlay package node_modules onto root (dotenv etc.), copy
  @fleetforge/shared at the workspace path the pnpm symlink expects
- web: standalone output nests under apps/web (monorepo outputFileTracingRoot);
  run server.js from WORKDIR /app/apps/web with static/public at that level
- deploy.sh: mount nginx config via named volume ff-nginx-conf (host path /
  cfg does not exist on the host inside the deployer)
This commit is contained in:
Pepe44DEV
2026-09-06 22:59:02 +00:00
parent 12d257faff
commit f311abad6f
4 changed files with 14 additions and 8 deletions
+4 -3
View File
@@ -19,11 +19,12 @@ RUN pnpm --filter @fleetforge/api build
FROM node:20-alpine AS runner
WORKDIR /app
RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 fleetforge
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/apps/api/node_modules ./node_modules
COPY --from=builder /app/apps/api/dist ./dist
COPY --from=builder /app/apps/api/package.json ./
COPY --from=builder /app/packages/shared/dist ../packages/shared/dist
COPY --from=builder /app/packages/shared/package.json ../packages/shared/
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/packages/shared ./packages/shared
RUN mkdir -p node_modules/@fleetforge/shared && cp -r packages/shared/dist node_modules/@fleetforge/shared/dist && cp packages/shared/package.json node_modules/@fleetforge/shared/package.json
USER fleetforge
EXPOSE 3000
CMD ["node", "dist/index.js"]