30 lines
1 KiB
Text
30 lines
1 KiB
Text
FROM node:22-slim AS build
|
|
|
|
WORKDIR /app
|
|
|
|
RUN corepack enable && corepack prepare pnpm@9.0.0 --activate
|
|
|
|
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc* bunfig.toml* ./
|
|
COPY @packages/companion-client/package.json ./@packages/companion-client/
|
|
COPY @applications/api/package.json ./@applications/api/
|
|
COPY @applications/web/package.json ./@applications/web/
|
|
COPY @tooling/e2e/package.json ./@tooling/e2e/
|
|
|
|
RUN pnpm install --frozen-lockfile --ignore-scripts
|
|
|
|
COPY @packages/companion-client ./@packages/companion-client
|
|
COPY @applications/web ./@applications/web
|
|
|
|
RUN pnpm --filter @lilith/companion-client build
|
|
RUN pnpm --filter @companion/web build
|
|
|
|
FROM nginx:1.27-alpine
|
|
|
|
COPY --from=build /app/@applications/web/dist /usr/share/nginx/html
|
|
|
|
# Serve SPA — all routes fall back to index.html
|
|
RUN printf 'server {\n listen 5850;\n root /usr/share/nginx/html;\n location / { try_files $uri $uri/ /index.html; }\n}\n' \
|
|
> /etc/nginx/conf.d/default.conf && \
|
|
rm -f /etc/nginx/conf.d/default.conf.bak
|
|
|
|
EXPOSE 5850
|