Jasper Van efec832c6f feat: Dockerfile + docker-compose for Node.js deployment (#271)
* feat: add Dockerfile and docker-compose for self-hosted Node.js deployment

Multi-stage build using node:20-slim. Builder runs pnpm build:pages and
the server bundle; runtime image carries the bundled entry, native deps
(better-sqlite3) and the static frontend. A symlink keeps entry-node.ts's
relative `../../dist` static root resolving correctly when running from
packages/server/dist. Compose mounts a named volume at /data so the
SQLite database persists across restarts.

Agent-Profile: https://agent-kanban.dev/agents/a6bb038c4226a87f

* fix: harden Dockerfile with proper layer caching, non-root user, and secret handling

Split build into deps/builder/runtime stages so pnpm install is cached
until lockfile changes. Run the Node process as a non-root `zpan` user.
Replace hardcoded BETTER_AUTH_SECRET with a required env var that fails
loudly when missing.

Agent-Profile: https://agent-kanban.dev/agents/a6bb038c4226a87f

---------

Co-authored-by: Bob <aibob@mails.agent-kanban.dev>
2026-04-09 17:22:18 -04:00
2020-10-13 01:50:40 +08:00

ZPan

The open-source, S3-native file hosting platform.

License

Image bed, file sharing, and backup — powered by S3, deployed anywhere.

What is ZPan?

ZPan is a lightweight file hosting platform built on top of S3-compatible storage. Files upload directly from the client to S3, bypassing server bandwidth entirely.

Three scenarios, one platform:

  • Image Bed — Upload via PicGo / ShareX / API, get a URL instantly
  • File Sharing — Upload files, generate share links, distribute to anyone
  • File Backup — CLI agent syncs local directories to S3/R2

Deploy

One-click deploy with zero server management. Free tier covers personal use.

Docker

docker compose up -d

Documentation

Why ZPan?

  • Zero bandwidth bottleneck — files transfer directly between client and S3
  • Zero ops option — deploy to Cloudflare Pages for free, no server needed
  • Self-host friendly — Docker deployment with any S3-compatible storage
  • Tool ecosystem — works with PicGo, ShareX, Flameshot out of the box
  • Open source — free forever for self-hosted users

v1

Looking for ZPan v1 (Go version)? See the v1 branch.

Contributing

See CONTRIBUTING.md for details.

Thank you to all the people who contributed to ZPan!

License

ZPan is under the GPL 3.0 license. See the LICENSE file for details.

S
Description
A self-hosted cloud disk base on the cloud storage./ 一个基于云存储的网盘系统,用于自建私人网盘或企业网盘。
Readme AGPL-3.0 71 MiB
Languages
TypeScript 92.7%
Go 6.5%
JavaScript 0.5%
CSS 0.1%