fix: update docker/server and e2e-fallback for ElysiaJS migration

- docker/server/Dockerfile: replace .next/standalone + .next/static COPY
  with dist/ bundle (matching docker/backend/Dockerfile)
- docker/server/entrypoint.sh: apps/backend/server.js → dist/server.mjs
- e2e-fallback-tests.yaml: next start → node dist/server.mjs with BACKEND_PORT

Co-Authored-By: mantra <[email protected]>
This commit is contained in:
Devin AI
2026-06-22 17:32:59 +00:00
co-authored by mantra
parent dc0477f848
commit dc481cdbf0
3 changed files with 7 additions and 11 deletions
+5 -9
View File
@@ -49,13 +49,10 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
# copy over the rest of the code for the build
COPY --from=pruner /app/out/full/ .
# docs are currently required for the NextJS backend build, but won't exist in the final image
# Docs are required for backend OpenAPI/codegen
COPY docs ./docs
# https://nextjs.org/docs/pages/api-reference/next-config-js/output
ENV NEXT_CONFIG_OUTPUT=standalone
# Build the backend NextJS app
# Build the backend and dashboard
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm turbo run docker-build --filter=@hexclave/backend... --filter=@hexclave/dashboard...
# Build the self-host seed script
@@ -74,12 +71,11 @@ RUN apt-get update && \
apt-get install -y openssl socat && \
rm -rf /var/lib/apt/lists
# Copy built backend
COPY --from=builder --chown=node:node /app/apps/backend/.next/standalone ./
COPY --from=builder --chown=node:node /app/apps/backend/.next/static ./apps/backend/.next/static
COPY --from=builder --chown=node:node /app/apps/backend/prisma ./apps/backend/prisma
# Copy the bundled Elysia backend (tsdown output) plus runtime deps
COPY --from=builder --chown=node:node /app/apps/backend/dist ./apps/backend/dist
COPY --from=builder --chown=node:node /app/apps/backend/prisma ./apps/backend/prisma
COPY --from=builder --chown=node:node /app/apps/backend/node_modules ./apps/backend/node_modules
COPY --from=builder --chown=node:node /app/apps/backend/package.json ./apps/backend/package.json
# Copy built dashboard
COPY --from=builder --chown=node:node /app/apps/dashboard/.next/standalone ./
+1 -1
View File
@@ -253,7 +253,7 @@ fi
echo "Starting backend on port $BACKEND_PORT..."
cd "$WORK_DIR"
PORT=$BACKEND_PORT HOSTNAME=0.0.0.0 node apps/backend/server.js &
PORT=$BACKEND_PORT HOSTNAME=0.0.0.0 node apps/backend/dist/server.mjs &
echo "Starting dashboard on port $DASHBOARD_PORT..."
PORT=$DASHBOARD_PORT HOSTNAME=0.0.0.0 node apps/dashboard/server.js &