# Development only. Not for production use.
FROM node:24-slim

RUN corepack enable && corepack install -g pnpm@11.10.0

COPY <<'EOF' /usr/local/bin/web-entrypoint.sh
#!/bin/sh
set -eu
corepack pnpm install --frozen-lockfile --store-dir /src/node_modules/.pnpm-store
exec corepack pnpm exec vite dev --host 0.0.0.0
EOF
RUN chmod +x /usr/local/bin/web-entrypoint.sh

WORKDIR /src

EXPOSE 5174

ENTRYPOINT ["/usr/local/bin/web-entrypoint.sh"]
