17 lines
660 B
Docker
17 lines
660 B
Docker
FROM node-pnpm-base:24.18.1 AS frontend-build
|
|
WORKDIR /app
|
|
COPY frontend/package.json frontend/pnpm-lock.yaml ./
|
|
RUN pnpm install --frozen-lockfile
|
|
COPY frontend/ ./
|
|
RUN pnpm typecheck && pnpm build
|
|
|
|
FROM nginx-base:alpine
|
|
COPY ./default.conf /etc/nginx/conf.d/default.conf.template
|
|
COPY ./scripts/nginx-entrypoint.sh /usr/local/bin/model-platform-entrypoint.sh
|
|
RUN sed -i 's/\r$//' /usr/local/bin/model-platform-entrypoint.sh \
|
|
&& chmod +x /usr/local/bin/model-platform-entrypoint.sh
|
|
COPY --from=frontend-build /app/build/client /usr/share/nginx/html
|
|
EXPOSE 80
|
|
ENTRYPOINT ["/usr/local/bin/model-platform-entrypoint.sh"]
|
|
CMD ["nginx", "-g", "daemon off;"]
|