Each folder gets a .env.example listing every homeserver, admin panel and web client setting with its default (empty means the default). Compose reads .env for ports, registry and the PostgreSQL password, and passes it to the containers through env_file; the compose files keep only the database driver, connection string and internal addresses. .env is git-ignored. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
57 lines
2.2 KiB
Markdown
57 lines
2.2 KiB
Markdown
# Docker: one container per component
|
|
|
|
The homeserver (`warp`), the admin panel (`warp-admin`) and the web client
|
|
(`warp-web`) as separate images, built from `Dockerfile`,
|
|
`apps/admin/Dockerfile` and `apps/web/Dockerfile`.
|
|
|
|
| File | Database | Images |
|
|
| --- | --- | --- |
|
|
| `docker-compose.sqlite.yml` | SQLite, in the `warp-data` volume | built here |
|
|
| `docker-compose.pocketbase.yml` | PocketBase, embedded in the homeserver, in `warp-data` | built here |
|
|
| `docker-compose.postgresql.yml` | PostgreSQL 17, its own container | built here |
|
|
| `docker-compose.*.prod.yml` | as above | pulled, never built |
|
|
|
|
```sh
|
|
cd Docker
|
|
cp .env.example .env # then edit it
|
|
docker compose -f docker-compose.sqlite.yml up -d --build
|
|
docker compose -f docker-compose.sqlite.yml exec warp warp create-account --username admin --admin
|
|
```
|
|
|
|
Homeserver on `:8008`, admin panel on `:8009`, web client on `:8080`
|
|
(`WARP_PORT`, `WARP_ADMIN_PORT`, `WARP_WEB_PORT` in `.env` move them). Put a
|
|
TLS-terminating reverse proxy in front before exposing them; see
|
|
[docs/deployment.md](../docs/deployment.md).
|
|
|
|
PocketBase is a database driver inside the homeserver, not a separate
|
|
server, so the PocketBase files have no PocketBase container.
|
|
|
|
## Prod files
|
|
|
|
The `.prod.yml` files pull `$WARP_REGISTRY/warp`, `warp-admin` and
|
|
`warp-web` at tag `$WARP_VERSION` (defaults `ghcr.io/dariuszjaniak` and
|
|
`latest`). Push the images there first:
|
|
|
|
```sh
|
|
docker compose -f docker-compose.sqlite.yml build
|
|
for i in warp warp-admin warp-web; do
|
|
docker tag $i:latest $WARP_REGISTRY/$i:$WARP_VERSION
|
|
docker push $WARP_REGISTRY/$i:$WARP_VERSION
|
|
done
|
|
```
|
|
|
|
`docker-compose.postgresql.prod.yml` refuses to start without
|
|
`WARP_POSTGRES_PASSWORD`.
|
|
|
|
## Settings
|
|
|
|
Every setting is in `.env`, copied from [`.env.example`](.env.example),
|
|
which lists them all with their defaults; an empty value means the
|
|
default. Compose reads it for the ports, the registry and the PostgreSQL
|
|
password, and passes all of it to the homeserver, the admin panel and the
|
|
web client. `.env` is not committed.
|
|
|
|
The compose files set only what makes each one what it is: the database
|
|
driver and connection string, and the address the admin panel and web
|
|
client reach the homeserver on.
|