Compare commits

..

No commits in common. "1c691cd54f9a3095e426467781b504ed7e25c632" and "9cd4c8211811734e897d66b9d60c9288e7dcc4a6" have entirely different histories.

5 changed files with 10 additions and 18 deletions

View file

@ -506,7 +506,7 @@ e2e/ Playwright tests
## 13. Deployment (podman compose, with or without the panel)
`compose.yaml` (repo root) runs the `app` service: the Node server, which
also serves the built static client, on port 8080 (`PORT`) with its data in the
also serves the built static client, on port 8080 with its data in the
`oweme-data` volume. It works with **zero configuration**: VAPID keys are
generated on first start and stored in the volume (`vapid.json`, mode 600),
and the push contact defaults to `https://<site domain>`.
@ -514,11 +514,11 @@ and the push contact defaults to `https://<site domain>`.
Every setting is an optional environment variable, written in `compose.yaml`
as `${VAR:-default}` so it is visible and documented in one place:
`MAX_PHOTO_BYTES`, `MAX_EVENT_BYTES`, `MAX_GROUP_BYTES`,
`GROUP_CREATE_PER_HOUR`, `PORT`, `VAPID_SUBJECT`, `VAPID_PUBLIC_KEY` /
`GROUP_CREATE_PER_HOUR`, `VAPID_SUBJECT`, `VAPID_PUBLIC_KEY` /
`VAPID_PRIVATE_KEY` (pin keys), `PUSH_DISABLED`.
- **With the panel** (the main target): the panel clones the repo, finds
`compose.yaml` at the root, routes the app's domain to `app:$PORT` through
`compose.yaml` at the root, routes the app's domain to `app:8080` through
its own Caddy (HTTPS) and passes the Environment tab's variables to
compose for `${VAR}` interpolation. "Pass to every container" must stay
off until the panel's injection override stops clashing with variables the

View file

@ -2,8 +2,7 @@
# overridden with an environment variable (in the panel's Environment tab,
# or in a .env file next to this file).
#
# With the panel: point the app's domain at service `app`, port $PORT
# (8080 unless you set PORT).
# With the panel: point the app's domain at service `app`, port 8080.
# The panel's Caddy provides HTTPS.
# Standalone (no panel): set DOMAIN and run
# podman compose --profile standalone up -d --build
@ -35,21 +34,19 @@ services:
VAPID_PRIVATE_KEY: ${VAPID_PRIVATE_KEY:-}
# 1 = turn push notifications off.
PUSH_DISABLED: ${PUSH_DISABLED:-0}
# Port the app listens on inside the container. If you change it,
# point the panel's domain at the new port too.
PORT: ${PORT:-8080}
# Fixed for the container; no need to change these.
HOST: 0.0.0.0
PORT: "8080"
DATA_DIR: /data
STATIC_DIR: /app/web
TRUST_PROXY: "1"
volumes:
- oweme-data:/data
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:${PORT:-8080}/api/health"]
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:8080/api/health"]
interval: 30s
timeout: 5s
# No ports: the panel publishes $PORT for its routes; standalone, only
# No ports: the panel publishes 8080 for its routes; standalone, only
# Caddy reaches the app.
caddy:
@ -61,8 +58,6 @@ services:
environment:
# Public hostname for standalone HTTPS (needs a DNS record).
DOMAIN: ${DOMAIN:-localhost}
# Where Caddy finds the app (same as the app's PORT).
APP_PORT: ${PORT:-8080}
ports:
# Rootless Podman can't bind ports below 1024 by default; see
# deploy/README.md "Ports".

View file

@ -3,7 +3,7 @@
# Security headers (CSP etc.) are set by the app itself.
{$DOMAIN} {
encode zstd gzip
reverse_proxy app:{$APP_PORT:8080} {
reverse_proxy app:8080 {
# Server-Sent Events: don't buffer
flush_interval -1
}

View file

@ -25,6 +25,5 @@ COPY --from=build /src/apps/web/dist ./web
RUN mkdir -p /data && chown node:node /data
USER node
VOLUME /data
# Default port; compose sets PORT (see compose.yaml).
EXPOSE 8080
CMD ["node", "--disable-warning=ExperimentalWarning", "server/main.ts"]

View file

@ -1,7 +1,7 @@
# Deploying OweMe
`compose.yaml` (repo root) runs the **app** container: the Node server plus
the built web client, listening on port 8080 (or `PORT`), with its data in the
the built web client, listening on port 8080, with its data in the
`oweme-data` volume. It needs **no configuration**: push keys are generated
on first start and kept in the volume. Every setting is an optional
environment variable, listed with its default in `compose.yaml`.
@ -13,8 +13,7 @@ container enabled with the `standalone` profile.
1. **New app → Git repository**: this repo, branch `main`. The panel finds
`compose.yaml` in the repository root.
2. **Domain**: point it at service **`app`**, port **`8080`** (or the
`PORT` you set in the Environment tab). The panel
2. **Domain**: point it at service **`app`**, port **`8080`**. The panel
publishes the port on 127.0.0.1 and its Caddy serves HTTPS.
3. **Environment** (optional): any variable from `compose.yaml`, for example
`MAX_PHOTO_BYTES=5242880` or `VAPID_SUBJECT=mailto:you@example.com`.
@ -73,7 +72,6 @@ standalone deploy.
| `VAPID_SUBJECT` | `https://<site domain>` | Contact sent to push services |
| `VAPID_PUBLIC_KEY` / `VAPID_PRIVATE_KEY` | generated | Pin push keys (set both); otherwise kept in the volume as `vapid.json` |
| `PUSH_DISABLED` | `0` | `1` turns push notifications off |
| `PORT` | `8080` | Port the app listens on inside the container (the panel's domain must target it) |
| `DOMAIN` | `localhost` | Standalone only: Caddy's site address and certificate |
| `BIND_ADDR` | `0.0.0.0` | Standalone only: address Caddy's ports are published on |
| `HTTP_PORT` / `HTTPS_PORT` | `80` / `443` | Standalone only: host ports for Caddy |