Files
Docwell/Docker-AIO
tajniak81andClaude Opus 5.5 f7a2ded680
CI / go (Media) (push) Successful in 13m22s
CI / go (Server) (push) Failing after 24m20s
CI / go (Web-App) (push) Successful in 14m3s
CI / frontend (push) Failing after 9m19s
CI / mobile (push) Failing after 6m19s
CI / docker (push) Successful in 20m37s
CI / desktop (ubuntu-latest) (push) Successful in 1h9m43s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
Give the all-in-one setup every storage shape, from source and baked in
Docker-AIO now has one compose file per storage shape for each way of
getting the image, each with an .env template of the same name:
- From source: docker-compose.yml (now with .env.example),
  docker-compose.s3.yml, docker-compose.seaweedfs.yml and
  docker-compose.seaweedfs.split.yml. The SeaweedFS ones run it in
  containers beside the plain image, as the prod files did before.
- Production: docker-compose.prod.seaweedfs*.yml now run one container
  from new images with SeaweedFS built in. Dockerfile.seaweedfs runs
  `weed server -s3`; Dockerfile.seaweedfs.split runs master, volume,
  filer, S3 gateway and admin UI as separate processes, and seeds
  PocketBase's key into the filer's IAM store so the admin UI cannot
  displace it.

SeaweedFS listens on the container's loopback (volume server on 8081,
as docwell-server has 8080); only the split image's admin UI is
published, on loopback by default. start.sh now also watches the
processes a wrapper started, so the container restarts as a whole when
any SeaweedFS role stops. The release workflow publishes the two new
images, docwell-seaweedfs and docwell-seaweedfs-split.

Existing SeaweedFS installs keep their data: every file uses the
`weed server -dir` layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 19:29:46 +01:00
..

Docwell: all-in-one

PocketBase, docwell-server and docwell-web in one container, behind one port. For small self-hosted installs; for separate, individually scalable services see ../Docker.

Each shape of storage has one self-contained compose file per way of getting the image, and an .env template of the same name (docker-compose.s3.yml takes .env.s3.example, docker-compose.prod.seaweedfs.yml takes .env.prod.seaweedfs.example, and so on):

Uploaded files live in From source (up -d --build) Production (pull) Image
the pb_data volume docker-compose.yml docker-compose.prod.yml Dockerfile
an S3 bucket that already exists elsewhere (AWS S3, MinIO, another SeaweedFS...) docker-compose.s3.yml docker-compose.prod.s3.yml Dockerfile
SeaweedFS, one weed server -s3 process docker-compose.seaweedfs.yml: in a container beside this one docker-compose.prod.seaweedfs.yml: built into the image Dockerfile / Dockerfile.seaweedfs
SeaweedFS, one process per role, plus its admin UI docker-compose.seaweedfs.split.yml: in containers beside this one docker-compose.prod.seaweedfs.split.yml: built into the image Dockerfile / Dockerfile.seaweedfs.split
cp .env.prod.example .env      # then edit: passwords, DOCWELL_WEB_URL
docker compose -f docker-compose.prod.yml pull
docker compose -f docker-compose.prod.yml up -d

From source, from this directory:

cp .env.example .env           # then edit
docker compose up -d --build

docker-compose.yml also runs without a .env: PB_ADMIN_PASSWORD=... docker compose up -d pulls the released image with every other setting at its default.

Open DOCWELL_WEB_URL (http://localhost:3000); the admin panel is at /admin/. The first account that signs up becomes the instance admin.

SeaweedFS: beside the container or inside it

The from-source SeaweedFS files keep the Docwell image unchanged and run SeaweedFS in containers of their own beside it, plus a one-shot seaweedfs-init that creates the bucket (PocketBase never creates one). Adding or dropping the object store needs no rebuild, and a SeaweedFS upgrade is a change of SEAWEED_IMAGE.

The production SeaweedFS files go the other way and build it into the image: one service, one container.

  • Dockerfile.seaweedfs (image docwell-seaweedfs) copies the weed binary from the official image, pinned by the SEAWEED_VERSION build arg, and start-seaweedfs.sh runs weed server -s3 and creates the bucket before handing over to start.sh. Volumes: PB_DATA, SERVER_DATA, SEAWEED_DATA.
  • Dockerfile.seaweedfs.split (image docwell-seaweedfs-split) runs master, volume, filer, S3 gateway and the admin UI as separate processes from start-seaweedfs-split.sh, which also seeds the bucket and PocketBase's identity. Volumes: the three above plus SEAWEED_ADMIN_DATA. What survives of "split" in one container is per-role metrics ports and the admin UI; what does not is restarting or spreading the roles one by one.

Inside, every SeaweedFS role listens on the container's loopback, the volume server on 8081 because 8080 is docwell-server. Nothing of SeaweedFS is published except the split image's admin UI, on loopback by default. start.sh watches the SeaweedFS processes with its own three, so the container exits and restarts as a whole if any of them stops. The cost of baking it in: a new SeaweedFS means a new image. The release workflow publishes both images next to docwell, so pull works as it does for docker-compose.prod.yml; on a host with this checkout, docker compose -f docker-compose.prod.seaweedfs.yml build builds it instead, and push sends it to AIO_IMAGE.

Switching between any of the SeaweedFS files needs no migration: master, volume and filer share one data mount (/data in the side containers, /seaweed/data in the baked-in images) in exactly the layout weed server -dir writes.

Identities in the split files

SeaweedFS reads credentials from, in descending priority, an -s3.config file, the filer's IAM store, then AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY, and a higher source replaces a lower one. The single-process files use the environment variables, so nothing else may write identities there: the first user added in a panel would displace PocketBase's key. The split files seed PocketBase's identity into the filer's store instead, the same store the admin UI writes, and refuse to start the gateway if it is not there. Rotating DOCWELL_S3_SECRET in .env and restarting updates that identity in place.

Set SEAWEED_ADMIN_PASSWORD: weed admin serves the panel with no login when it is empty, and a panel that can mint bucket credentials is the bucket. The split files and image refuse to start without it.

How it differs from Docker/

  • One port. docwell-web proxies /api, /collab and /admin to docwell-server inside the container, so only DOCWELL_WEB_URL needs setting. PocketBase listens on the container's loopback; it has no published port.
  • The superuser follows .env. The start script runs pocketbase superuser upsert on every boot, so a new PB_ADMIN_PASSWORD is applied by restarting.
  • PocketBase binary. The image downloads the PocketBase release itself (PB_VERSION in the Dockerfile) rather than using tajniak81/pocketbase-docker-root, because that image is amd64-only and the all-in-one image is published for amd64 and arm64.
  • Data lives in /pb_data (database, uploads, backups) and /data (search index) in the container, plus /seaweed/data (and /seaweed/admin) in the SeaweedFS images.

PB_ENCRYPTION_KEY (exactly 32 characters, openssl rand -hex 16) turns on PocketBase's settings encryption. Set it before the first start and keep a copy.

File storage

The DOCWELL_S3_* variables are written into PocketBase by docwell-server on every start, and while they are set they win over the admin panel's Storage screen. Only uploaded files move to the bucket; the database and PocketBase's backups stay in pb_data. The details of each storage option, and how to copy the files of an existing install into a bucket (PocketBase does not move them for you), are in ../Docker/README.md; they apply here unchanged, with docwell-aio_pb_data as the volume name and /pb_data/storage as the source path.

Back up SEAWEED_DATA together with PB_DATA: once S3 is on, the attachments live there.