Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions deploy/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ REFRAIN_IPV4=REPLACE-with-a-free-lan-ip
# Host path for the memory root — a git repo of markdown, the only
# irreplaceable data in this stack. Back it up.
REFRAIN_DATA=REPLACE-with-a-host-path

# Only needed when this compose file has been copied away from the repo,
# so the default `context: ..` no longer points at the repo root — see
# "Unraid / Compose Manager" in README.md. Leave unset otherwise.
#REFRAIN_SRC=/path/to/refrain/checkout
19 changes: 18 additions & 1 deletion deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,24 @@ The reference compose file assumes a pre-existing macvlan network named
IP. If that isn't your pattern, replace the `networks` block with a
bridge network and publish port 8092.

On Unraid, add these labels to the service for a WebUI link and shell:
## Unraid / Compose Manager

Compose Manager does not run the stack from a checkout — it requires the
compose file to live in its own `projects/<name>/docker-compose.yml`. The
default `context: ..` then resolves to the projects directory instead of
the repo root, and `docker compose up -d` fails to build with no obvious
clue why. Point `REFRAIN_SRC` at the checkout so the build context stays
correct wherever the compose file was pasted:

```
REFRAIN_SRC=/mnt/user/appdata/refrain/src
```

The checkout has to be reachable from the Docker host, so keep it on a
share rather than inside the compose project directory (Unraid's flash
device is FAT-formatted and a poor place for source).

Add these labels to the service for a WebUI link and shell:

```yaml
labels:
Expand Down
7 changes: 6 additions & 1 deletion deploy/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@
services:
refrain:
build:
context: ..
# Defaults to the repo root, so `docker compose up -d --build` from
# this directory just works. Override REFRAIN_SRC when the compose
# file is copied somewhere else and `..` no longer means the repo —
# notably Unraid's Compose Manager, which requires the file to live
# in its own projects/<name>/ directory (see README).
context: ${REFRAIN_SRC:-..}
dockerfile: deploy/Dockerfile
container_name: refrain
restart: unless-stopped
Expand Down