mirror of
https://github.com/pnpm/pnpm.git
synced 2026-07-17 11:12:25 -04:00
Adds container tooling for self-hosting pnpr:
- pnpr/Dockerfile: multi-stage build (context = monorepo root, since
pnpr depends on pacquet-* workspace crates) producing a slim runtime
image with a /-/ping HEALTHCHECK.
- pnpr/docker/entrypoint.sh: maps PNPR_* env vars to CLI flags so a PaaS
can configure the server without editing files.
- pnpr/docker/config.yaml: production config that proxies npm and
persists state under PNPR_STORAGE via ${VAR:-default} substitution.
- pnpr/docker-compose.yml: local/PaaS compose with a /data volume.
- pnpr/DEPLOY.md: deployment guide including a step-by-step Coolify walkthrough.
29 lines
757 B
YAML
29 lines
757 B
YAML
# Build context is the monorepo root because pnpr depends on pacquet-*
|
|
# crates from the shared Cargo workspace. Run from the pnpr/ directory:
|
|
#
|
|
# docker compose up --build
|
|
#
|
|
# Or point a PaaS (e.g. Coolify) at this file. See DEPLOY.md.
|
|
|
|
services:
|
|
pnpr:
|
|
build:
|
|
context: ..
|
|
dockerfile: pnpr/Dockerfile
|
|
image: pnpr:local
|
|
restart: unless-stopped
|
|
ports:
|
|
- "4873:4873"
|
|
environment:
|
|
# The URL clients use to reach this server. Set it to your public
|
|
# domain in production so proxied tarball URLs are rewritten
|
|
# correctly.
|
|
PNPR_PUBLIC_URL: ${PNPR_PUBLIC_URL:-http://localhost:4873}
|
|
PNPR_LOG_LEVEL: info
|
|
PNPR_LOG_FORMAT: json
|
|
volumes:
|
|
- pnpr-data:/data
|
|
|
|
volumes:
|
|
pnpr-data:
|