Files
Jyotisha/deploy/railway-web.Dockerfile
T
Jesse_Chen d35828e76d
Independent Staging Quality Gate / validate (push) Successful in 9m18s
Independent Staging Quality Gate / publish (push) Has been cancelled
fix(consult): read the live skill tree instead of a hash-pinned snapshot
Manual SKILL.md updates were blocked by registry sha256 and a byte-equal versions/ gate. Consult now loads the operator-maintained tree; rectification and personal-report stay hashed.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 10:25:55 +08:00

55 lines
2.0 KiB
Docker

FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/library/node:22-alpine AS build
WORKDIR /app/frontend
COPY frontend/package.json frontend/package-lock.json ./
RUN npm ci
COPY frontend/src ./src
COPY frontend/public ./public
COPY frontend/next.config.ts frontend/postcss.config.mjs frontend/tsconfig.json ./
COPY frontend/scripts ./scripts
COPY frontend/db ./db
COPY frontend/supabase/migrations ./supabase/migrations
ARG NEXT_DEPLOYMENT_ID
ARG NEXT_PUBLIC_SUPABASE_URL
ARG NEXT_PUBLIC_SUPABASE_ANON_KEY
ENV NEXT_DEPLOYMENT_ID=${NEXT_DEPLOYMENT_ID} \
NEXT_PUBLIC_SUPABASE_URL=${NEXT_PUBLIC_SUPABASE_URL} \
NEXT_PUBLIC_SUPABASE_ANON_KEY=${NEXT_PUBLIC_SUPABASE_ANON_KEY}
COPY SKILL.md /app/SKILL.md
COPY assets /app/assets
COPY references /app/references
COPY scripts /app/scripts
COPY skills /app/skills
RUN npm run build
# File tracing pulls skills/ into the standalone bundle with symlinks resolved into
# real directories, which then collides with the explicit COPY in the final stage.
RUN rm -rf /app/frontend/.next/standalone/skills
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/library/node:22-alpine
WORKDIR /app/frontend
COPY --from=build /app/frontend/.next/standalone /app
COPY --from=build /app/frontend/.next/static /app/frontend/.next/static
COPY --from=build /app/frontend/public /app/frontend/public
COPY --from=build /app/frontend/db /app/frontend/db
COPY --from=build /app/frontend/supabase/migrations /app/frontend/supabase/migrations
# Live consult skill entries are git-tracked relative symlinks into /app.
COPY --from=build /app/SKILL.md /app/SKILL.md
COPY --from=build /app/assets /app/assets
COPY --from=build /app/references /app/references
COPY --from=build /app/scripts /app/scripts
COPY --from=build /app/skills /app/skills
ARG NEXT_PUBLIC_SUPABASE_URL
ARG NEXT_PUBLIC_SUPABASE_ANON_KEY
ENV NEXT_PUBLIC_SUPABASE_URL=${NEXT_PUBLIC_SUPABASE_URL} \
NEXT_PUBLIC_SUPABASE_ANON_KEY=${NEXT_PUBLIC_SUPABASE_ANON_KEY}
ENV NODE_ENV=production \
HOSTNAME=0.0.0.0 \
JYOTISHA_PROJECT_ROOT=/app
CMD ["node", "server.js"]