Configuration and storage
The root .env is Compose interpolation input, generated privately (0600) by
configure. Do not commit it or paste rendered Compose config into issue reports.
The helper accepts literal values without quoting, whitespace, expansion or shell
syntax; it does not source .env. Paths are absolute or repository-relative,
without spaces or parent traversal. The starter intentionally limits IPv4 and a
single HTTPS hostname/port; advanced proxy topologies are future work.
| Key | Meaning |
|---|---|
COMPOSE_PROJECT_NAME | Local Compose resource namespace; default melodee. Never change it to recover missing data. |
MELODEE_HOSTNAME | Lowercase DNS hostname; used for origin, TLS, WebAuthn and CLI network alias. |
MELODEE_BIND_IP | Host interface for HTTPS; default 127.0.0.1. |
MELODEE_DB_PASSWORD | Generated 64-character lowercase hex secret; URL-safe for the API database URL. |
MELODEE_LIBRARY_PATH | Host path mounted at /media/library. |
MELODEE_INBOUND_PATH | Host path mounted at /media/inbound. |
MELODEE_TLS_PATH | Host path containing fullchain and key; read-only in proxy. |
MELODEE_CLI_PATH | Private host workspace mounted at /workspace only for the CLI. |
MELODEE_*_IMAGE | Six immutable references matching versions.lock.json. No latest. |
Named volumes postgres-data and api-data persist independently of container
replacement. PostgreSQL's data directory is /var/lib/postgresql/data for the
proposed PostgreSQL 17 image; API state uses /var/lib/melodee. These are not
substitutes for backing up every registered Storage Volume and protected object.
The API owns storage identity, marker files and registration; do not delete or
recreate markers. Mount real NAS paths on the host first, verify mount identity
and fail closed if absent. create_host_path: false prevents Docker creating
missing bind directories; it does not detect a mounted filesystem disappearing
behind an existing mountpoint. A host mount-identity guard is still required.
configure creates local defaults for library, inbound, TLS and CLI. Repoint
.env at the mounted NAS and prepare ownership before preflight. Preflight checks
existence and write access, not filesystem identity; a mount that disappears
behind an existing directory remains undetected.
The edge caps request bodies at 1 MiB by default and at a provisional 16 MiB on
/api/; share routes keep the default. The API-specific bound must be replaced
with the validated upload/artwork limits during D-06.
The edge overwrites X-Forwarded-For with the direct client address and is the
sole trusted proxy. The API must be configured to trust that edge for client-IP,
secure-cookie and rate-limit decisions. The exact API setting is part of the
component contract and is not invented here; verify it during D-06 before
exposing the installation beyond loopback.
The starter's preflight requires the library and inbound directories to be writable by the operator; a read-only library is not supported until the selected API contract confirms that it is sufficient. The container UID/GID may differ from the operator's, so verify ownership separately.
The API runs non-root. Verify the actual published image UID/GID and grant only
necessary directory permissions; do not run chmod -R 777 or blindly chown a
music collection. Keep inbound and library separate, and preserve stable container
paths across upgrades. Additional Storage Volumes need a reviewed Compose
extension and API registration. An example is described in design/ARCHITECTURE.md;
no external PostgreSQL or arbitrary override is supported by this starter helper.
Optional providers
Copy config/api.env.example to config/api.env, mode 0600, and set only the
provider keys required. Exact SMTP and Google settings are in the API repo.
Google identity linking additionally depends on the Auth UI image's public build
configuration. Do not assume setting an API variable enables all browser flows.
The helper allowlists provider variables and rejects test-credential or core
runtime overrides. SMTP should use TLS; no insecure SMTP profile is recommended.
Telegram and DecentDB configuration remain integration work; no additional daemon
is assumed for the reference-data artifact.
The current upstream API accepts secret-bearing environment variables rather than a file-secret contract. These are visible to root and Docker administrators; protect access to the Docker socket, host and backups. Future work should support real secret sources without making plaintext credentials available to browsers.