# Dev-mode Dockerfile for pastebin — all source baked in, k8s-ready. # Runs `next dev --turbopack` for fast refresh inside the container. # Context: monorepo root (..) # # All files are COPY'd into the image. No host bind mounts required. # For local development with live host edits, you can optionally # override with Docker volume mounts — but the image works standalone. FROM metabuilder/base-node-deps:latest # Config files COPY frontends/pastebin/package.json ./frontends/pastebin/ COPY frontends/pastebin/next.config.js ./frontends/pastebin/ COPY frontends/pastebin/tsconfig.json ./frontends/pastebin/ COPY frontends/pastebin/postcss.config.mjs ./frontends/pastebin/ # Shared source packages (baked in — no bind mount needed) COPY hooks/ ./hooks/ COPY icons/ ./icons/ COPY scss/ ./scss/ COPY components/ ./components/ COPY redux/ ./redux/ # Pastebin application source (baked in — no bind mount needed) COPY frontends/pastebin/src/ ./frontends/pastebin/src/ COPY frontends/pastebin/public/ ./frontends/pastebin/public/ # Copy self-hosted fonts into public/ — must be after COPY icons/ RUN mkdir -p /app/frontends/pastebin/public/fonts && \ cp /app/icons/material-symbols/material-symbols-outlined.woff2 \ /app/frontends/pastebin/public/fonts/ ENV PORT=3000 ENV HOSTNAME="0.0.0.0" ENV NODE_ENV=development ENV NEXT_PUBLIC_FLASK_BACKEND_URL=/pastebin-api ENV NEXT_TELEMETRY_DISABLED=1 WORKDIR /app/frontends/pastebin EXPOSE 3000 HEALTHCHECK --interval=20s --timeout=10s --start-period=120s --retries=5 \ CMD wget --quiet --tries=1 --spider http://127.0.0.1:3000/pastebin || exit 1 CMD ["npm", "run", "dev"]