Configure Docker Compose through .env for Arcane

docker-compose.yml now reads every host-specific value (paths, user,
port, network, time zone) from .env with the previous values as
defaults. .env.example documents them; .env stays out of Git.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cdnutterandClaude Opus 5.5 committed 2026-09-30 10:09:59 -07:00
1 parent 428935dc58
commit 90f5d88903
5 files changed
+88 -30

No files matched your search

+21 -13
View File
@@ -198,21 +198,29 @@ playlink is built so that no user data is ever lost, even if it crashes or loses
## Quick start (Docker / Unraid)
```yaml
services:
playlink:
build: . # or your published image
container_name: playlink
user: "99:100" # owner of your music files (Unraid nobody:users)
ports: ["7480:7480"]
environment:
- PLAYLINK_ALLOWED_ROOTS=/data
volumes:
- /mnt/user/appdata/playlink:/config
- /mnt/user/Sapphire/Media/Music:/data/Music # ONE mount containing both libraries
restart: unless-stopped
`docker-compose.yml` takes every host-specific value from a `.env` file next to it, so the compose file itself never needs editing. That
suits [Arcane](https://github.com/ofkm/arcane): point a project's Git Sync at this repository and set the values in Arcane's `.env` editor;
Arcane builds the image from the `Dockerfile`. With plain Compose:
```sh
cp .env.example .env # then edit it
docker compose up -d --build
```
The main settings (all listed with defaults in `.env.example`):
| Variable | Default | Meaning |
|---|---|---|
| `PLAYLINK_DATA_PATH` | `/mnt/user/Sapphire` | Host folder containing **both** libraries, mounted at `/data`. |
| `PLAYLINK_CONFIG_PATH` | `/mnt/user/Aqua/playlink` | Host folder for the database and backups, mounted at `/config`. |
| `PUID` / `PGID` | `99` / `100` | User and group that own your music (Unraid `nobody:users`). |
| `PLAYLINK_PORT` | `7480` | Host port of the web UI. |
| `PLAYLINK_NETWORK` | `chromanet` | Existing Docker network to join. |
| `TZ` | `America/Los_Angeles` | Time zone for logs and backup schedules. |
| `PLAYLINK_SECURE_COOKIES` | `false` | `true` behind HTTPS. |
`.env` is ignored by Git, so your settings stay local while the repository syncs.
Then open `http://<server>:7480`, create your account, and add a pair:
- Master: `/data/Music/Albums`