# Build stage FROM node:20 AS builder RUN npm install -g pnpm WORKDIR /app RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* RUN git clone https://github.com/NitroRCr/AIaW.git . && \ git checkout -f $(git describe --tags $(git rev-list --tags --max-count=1)) RUN pnpm install RUN pnpm build -m pwa # Serve stage - using Python for simplicity FROM python:3.11-slim RUN useradd -m -u 1000 user USER user WORKDIR /home/user COPY --from=builder --chown=user:user /app/dist/pwa ./app EXPOSE 7860 # Serve the PWA CMD ["python", "-m", "http.server", "7860", "--directory", "app"]