PenPrint ships with a multi-stage Dockerfile that produces a lean, production-ready image. The build process separates development dependencies, production dependencies, and the compiled output so the final image stays small and contains only what’s needed to run the app.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/howtodo1/printer-web/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, make sure you have the following:- Docker installed and running on your machine
- The PenPrint repository cloned locally
Build and run
Build the Docker image
Run the following command from the Docker executes four stages during the build. See How the multi-stage build works below for a breakdown of each stage.
printer-web directory, where the Dockerfile lives:Run the container
Start PenPrint and bind it to port 3000 on your host:The app is now available at http://localhost:3000.
How the multi-stage build works
The Dockerfile uses four named stages to keep the final image as small as possible:| Stage | Base image | Purpose |
|---|---|---|
development-dependencies-env | node:20-alpine | Installs all dependencies (including devDependencies) needed to compile the app |
production-dependencies-env | node:20-alpine | Installs only production dependencies (npm ci --omit=dev) |
build-env | node:20-alpine | Runs react-router build to compile the SSR bundle |
| Final (unnamed) | node:20-alpine | Copies the compiled output and production node_modules, then starts the server |
build/ directory, production node_modules, and the Node.js runtime. The app starts with:
react-router-serve listens on port 3000 by default.
The “Send to me!” feature uses Supabase to store and share your SVG artwork with the maintainer. The Supabase URL and anon key are embedded directly in the source code — this is intentional, as the anon key is a publishable key designed to be exposed on the client. No additional environment variables or secrets are required to enable this feature.
Docker Compose example
For a more convenient local or server setup, use Docker Compose:docker-compose.yml in the printer-web directory, then run:
Next steps
Environment & build requirements
Learn about the Node.js version requirement, npm scripts, and static assets that must be present at runtime.
Back to home
Return to the PenPrint documentation home page.