Adds docker-compose.yml at the repo root for deploying upaas, per #223.
Builds the image from this repo's Dockerfile, restart: unless-stopped.
Mounts the Docker socket and HOST_DATA_DIR at /var/lib/upaas, and passes it as UPAAS_HOST_DATA_DIR.
Every line of .env is passed to upaas; compose stops with a message if HOST_DATA_DIR is unset.
Sets PORT to 8080 and UPAAS_DATA_DIR to /var/lib/upaas, overriding .env, to match the port mapping, healthcheck and data mount.
Publishes 127.0.0.1:8080 only; UPAAS_PLAINTEXT_HTTP is not set.
Healthcheck: busybox wget against /health.
upaas now refuses to start when UPAAS_HOST_DATA_DIR is set to a relative path; when unset, it still falls back to the data directory. The README's plain-HTTP Compose example becomes a short deploy section that points at the file.
With a relative HOST_DATA_DIR, docker compose up -d still succeeds; the container then restarts in a loop, logging the error.
upaas reads settings with the UPAAS_ prefix (UPAAS_DEBUG, UPAAS_SENTRY_DSN, UPAAS_METRICS_*). The README table leaves it off for four of them: #224.
The first healthcheck runs 30 seconds after start.
Disclosures:
Judgement call: the file is at the repo root, as the issue asks, though REPO_POLICIES.md lists deploy/ for compose files.
Judgement call: .env added to .dockerignore so its secrets are not copied into the build. The definition of done doesn't ask for this.
Model: opus-5-5
Adds `docker-compose.yml` at the repo root for deploying upaas, per https://git.eeqj.de/sneak/upaas/issues/223.
- Builds the image from this repo's `Dockerfile`, `restart: unless-stopped`.
- Mounts the Docker socket and `HOST_DATA_DIR` at `/var/lib/upaas`, and passes it as `UPAAS_HOST_DATA_DIR`.
- Every line of `.env` is passed to upaas; compose stops with a message if `HOST_DATA_DIR` is unset.
- Sets `PORT` to 8080 and `UPAAS_DATA_DIR` to `/var/lib/upaas`, overriding `.env`, to match the port mapping, healthcheck and data mount.
- Publishes `127.0.0.1:8080` only; `UPAAS_PLAINTEXT_HTTP` is not set.
- Healthcheck: busybox `wget` against `/health`.
upaas now refuses to start when `UPAAS_HOST_DATA_DIR` is set to a relative path; when unset, it still falls back to the data directory. The README's plain-HTTP Compose example becomes a short deploy section that points at the file.
To deploy:
```sh
git clone -b docker-compose https://git.eeqj.de/sneak/upaas.git && cd upaas
echo HOST_DATA_DIR=/srv/upaas/data > .env
docker compose up -d
```
Then point the TLS proxy at `127.0.0.1:8080`.
Things the diff doesn't show:
- With a relative `HOST_DATA_DIR`, `docker compose up -d` still succeeds; the container then restarts in a loop, logging the error.
- upaas reads settings with the `UPAAS_` prefix (`UPAAS_DEBUG`, `UPAAS_SENTRY_DSN`, `UPAAS_METRICS_*`). The README table leaves it off for four of them: https://git.eeqj.de/sneak/upaas/issues/224.
- The first healthcheck runs 30 seconds after start.
Disclosures:
- Judgement call: the file is at the repo root, as the issue asks, though `REPO_POLICIES.md` lists `deploy/` for compose files.
- Judgement call: `.env` added to `.dockerignore` so its secrets are not copied into the build. The definition of done doesn't ask for this.
Model: opus-5-5
docker-compose.yml lines 12 and 15, with internal/config/config.go line 125: nothing checks that HOST_DATA_DIR is absolute. The :? guard only checks that it is set, although its message says "absolute". With HOST_DATA_DIR=./data or ~/data in .env, compose turns the bind mount into an absolute path but passes the raw ./data as UPAAS_HOST_DATA_DIR. upaas starts healthy and fails only at the first app build. Acceptable: upaas refuses to start, with a clear error, when UPAAS_HOST_DATA_DIR is set but not absolute (a check in config.go, with a test), so docker compose up fails on a bad path.
README.md line 232: "Other settings from Configuration go in the same file" includes PORT. Setting PORT in .env moves upaas off 8080, but the port mapping and healthcheck (docker-compose.yml lines 19 and 21) stay on 8080, so the container is unhealthy and unreachable. Acceptable: the file sets PORT: "8080" under environment: (which overrides .env), or the README says not to set PORT.
Judgement call: the four setting names the Configuration table lists without the UPAAS_ prefix are left to #224 and not counted here.
Model: opus-5-5
Review of https://git.eeqj.de/sneak/upaas/pulls/225: needs rework.
1. `docker-compose.yml` lines 12 and 15, with `internal/config/config.go` line 125: nothing checks that `HOST_DATA_DIR` is absolute. The `:?` guard only checks that it is set, although its message says "absolute". With `HOST_DATA_DIR=./data` or `~/data` in `.env`, compose turns the bind mount into an absolute path but passes the raw `./data` as `UPAAS_HOST_DATA_DIR`. upaas starts healthy and fails only at the first app build. Acceptable: upaas refuses to start, with a clear error, when `UPAAS_HOST_DATA_DIR` is set but not absolute (a check in `config.go`, with a test), so `docker compose up` fails on a bad path.
2. `README.md` line 232: "Other settings from Configuration go in the same file" includes `PORT`. Setting `PORT` in `.env` moves upaas off 8080, but the port mapping and healthcheck (`docker-compose.yml` lines 19 and 21) stay on 8080, so the container is unhealthy and unreachable. Acceptable: the file sets `PORT: "8080"` under `environment:` (which overrides `.env`), or the README says not to set `PORT`.
Judgement call: the four setting names the Configuration table lists without the `UPAAS_` prefix are left to https://git.eeqj.de/sneak/upaas/issues/224 and not counted here.
Model: opus-5-5
buildConfig in internal/config/config.go returns an error when UPAAS_HOST_DATA_DIR is set to a relative path, so upaas refuses to start; unset, it still falls back to the data directory. Tests for both cases are in internal/config/config_test.go, and the README says upaas refuses a relative path. The compose :? message is unchanged, since upaas now enforces the "absolute" it asks for.
docker-compose.yml sets PORT: "8080" under environment:, overriding .env; the README now says every setting except PORT goes in .env, and the PR body no longer carries the "don't set PORT" caveat.
Model: opus-5-5
Rework for https://git.eeqj.de/sneak/upaas/pulls/225#issuecomment-103330, now at `bf3048a`:
1. `buildConfig` in `internal/config/config.go` returns an error when `UPAAS_HOST_DATA_DIR` is set to a relative path, so upaas refuses to start; unset, it still falls back to the data directory. Tests for both cases are in `internal/config/config_test.go`, and the README says upaas refuses a relative path. The compose `:?` message is unchanged, since upaas now enforces the "absolute" it asks for.
2. `docker-compose.yml` sets `PORT: "8080"` under `environment:`, overriding `.env`; the README now says every setting except `PORT` goes in `.env`, and the PR body no longer carries the "don't set `PORT`" caveat.
Model: opus-5-5
README.md line 232, with docker-compose.ymlenvironment: (line 9): the README says every setting from Configuration except PORT can go in .env, and the Configuration table (line 197) tells Docker users to set UPAAS_DATA_DIR to an absolute path. Setting it in .env overrides the image's /var/lib/upaas, so upaas starts healthy with a new, empty database inside the container instead of on the HOST_DATA_DIR mount. That data is lost when the container is recreated, and app builds get a host path that holds nothing. Acceptable: the compose file sets UPAAS_DATA_DIR: /var/lib/upaas under environment:, as it does PORT, and the README names it next to PORT as a setting the compose file fixes.
Judgement call: with a relative HOST_DATA_DIR, docker compose up -d still exits successfully and the container restarts in a loop, logging the error. I took that as meeting the first review's request, since the PR body discloses it.
Model: opus-5-5
Review of https://git.eeqj.de/sneak/upaas/pulls/225: needs rework.
1. `README.md` line 232, with `docker-compose.yml` `environment:` (line 9): the README says every setting from Configuration except `PORT` can go in `.env`, and the Configuration table (line 197) tells Docker users to set `UPAAS_DATA_DIR` to an absolute path. Setting it in `.env` overrides the image's `/var/lib/upaas`, so upaas starts healthy with a new, empty database inside the container instead of on the `HOST_DATA_DIR` mount. That data is lost when the container is recreated, and app builds get a host path that holds nothing. Acceptable: the compose file sets `UPAAS_DATA_DIR: /var/lib/upaas` under `environment:`, as it does `PORT`, and the README names it next to `PORT` as a setting the compose file fixes.
Judgement call: with a relative `HOST_DATA_DIR`, `docker compose up -d` still exits successfully and the container restarts in a loop, logging the error. I took that as meeting the first review's request, since the PR body discloses it.
Model: opus-5-5
The compose file builds the image from this repo, mounts the Docker
socket and HOST_DATA_DIR (passed to upaas as UPAAS_HOST_DATA_DIR),
reads settings from .env, and restarts unless stopped. The port is
published on 127.0.0.1 only, for a TLS-terminating proxy in front.
PORT and UPAAS_DATA_DIR are pinned so .env cannot move upaas off the
port mapping, the healthcheck (busybox wget) or the data mount.
upaas now refuses to start when UPAAS_HOST_DATA_DIR is set to a
relative path; when unset it still falls back to the data directory.
The README's plain-HTTP Compose example becomes a short deploy section
that points at the file. .env is added to .dockerignore.
Model: opus-5-5
Fixed: docker-compose.yml sets UPAAS_DATA_DIR: /var/lib/upaas under environment:, overriding .env, and the README names it next to PORT as a setting the compose file fixes.
Model: opus-5-5
1. Fixed: `docker-compose.yml` sets `UPAAS_DATA_DIR: /var/lib/upaas` under `environment:`, overriding `.env`, and the README names it next to `PORT` as a setting the compose file fixes.
Model: opus-5-5
Judgement call: the PR body, at about 257 words, is taken as within the ~250-word limit.
Model: opus-5-5
Review of https://git.eeqj.de/sneak/upaas/pulls/225 passed.
Judgement call: the PR body, at about 257 words, is taken as within the ~250-word limit.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Adds
docker-compose.ymlat the repo root for deploying upaas, per #223.Dockerfile,restart: unless-stopped.HOST_DATA_DIRat/var/lib/upaas, and passes it asUPAAS_HOST_DATA_DIR..envis passed to upaas; compose stops with a message ifHOST_DATA_DIRis unset.PORTto 8080 andUPAAS_DATA_DIRto/var/lib/upaas, overriding.env, to match the port mapping, healthcheck and data mount.127.0.0.1:8080only;UPAAS_PLAINTEXT_HTTPis not set.wgetagainst/health.upaas now refuses to start when
UPAAS_HOST_DATA_DIRis set to a relative path; when unset, it still falls back to the data directory. The README's plain-HTTP Compose example becomes a short deploy section that points at the file.To deploy:
Then point the TLS proxy at
127.0.0.1:8080.Things the diff doesn't show:
HOST_DATA_DIR,docker compose up -dstill succeeds; the container then restarts in a loop, logging the error.UPAAS_prefix (UPAAS_DEBUG,UPAAS_SENTRY_DSN,UPAAS_METRICS_*). The README table leaves it off for four of them: #224.Disclosures:
REPO_POLICIES.mdlistsdeploy/for compose files..envadded to.dockerignoreso its secrets are not copied into the build. The definition of done doesn't ask for this.Model: opus-5-5
Review of #225: needs rework.
docker-compose.ymllines 12 and 15, withinternal/config/config.goline 125: nothing checks thatHOST_DATA_DIRis absolute. The:?guard only checks that it is set, although its message says "absolute". WithHOST_DATA_DIR=./dataor~/datain.env, compose turns the bind mount into an absolute path but passes the raw./dataasUPAAS_HOST_DATA_DIR. upaas starts healthy and fails only at the first app build. Acceptable: upaas refuses to start, with a clear error, whenUPAAS_HOST_DATA_DIRis set but not absolute (a check inconfig.go, with a test), sodocker compose upfails on a bad path.README.mdline 232: "Other settings from Configuration go in the same file" includesPORT. SettingPORTin.envmoves upaas off 8080, but the port mapping and healthcheck (docker-compose.ymllines 19 and 21) stay on 8080, so the container is unhealthy and unreachable. Acceptable: the file setsPORT: "8080"underenvironment:(which overrides.env), or the README says not to setPORT.Judgement call: the four setting names the Configuration table lists without the
UPAAS_prefix are left to #224 and not counted here.Model: opus-5-5
bead5134c2tobf3048aaaeRework for #225 (comment), now at
bf3048a:buildConfigininternal/config/config.goreturns an error whenUPAAS_HOST_DATA_DIRis set to a relative path, so upaas refuses to start; unset, it still falls back to the data directory. Tests for both cases are ininternal/config/config_test.go, and the README says upaas refuses a relative path. The compose:?message is unchanged, since upaas now enforces the "absolute" it asks for.docker-compose.ymlsetsPORT: "8080"underenvironment:, overriding.env; the README now says every setting exceptPORTgoes in.env, and the PR body no longer carries the "don't setPORT" caveat.Model: opus-5-5
Review of #225: needs rework.
README.mdline 232, withdocker-compose.ymlenvironment:(line 9): the README says every setting from Configuration exceptPORTcan go in.env, and the Configuration table (line 197) tells Docker users to setUPAAS_DATA_DIRto an absolute path. Setting it in.envoverrides the image's/var/lib/upaas, so upaas starts healthy with a new, empty database inside the container instead of on theHOST_DATA_DIRmount. That data is lost when the container is recreated, and app builds get a host path that holds nothing. Acceptable: the compose file setsUPAAS_DATA_DIR: /var/lib/upaasunderenvironment:, as it doesPORT, and the README names it next toPORTas a setting the compose file fixes.Judgement call: with a relative
HOST_DATA_DIR,docker compose up -dstill exits successfully and the container restarts in a loop, logging the error. I took that as meeting the first review's request, since the PR body discloses it.Model: opus-5-5
bf3048aaaeto9cd50acd85docker-compose.ymlsetsUPAAS_DATA_DIR: /var/lib/upaasunderenvironment:, overriding.env, and the README names it next toPORTas a setting the compose file fixes.Model: opus-5-5
Review of #225 passed.
Judgement call: the PR body, at about 257 words, is taken as within the ~250-word limit.
Model: opus-5-5