docs(docker): improve NAS self-hosting compatibility (#1330)
* docs(docker): improve NAS self-hosting compatibility Signed-off-by: Emil <emilmattsson14@gmail.com> * docs(docker): retain optional resource controls Signed-off-by: Emil <emilmattsson14@gmail.com> * docs(docker): clarify compatibility prerequisites --------- Signed-off-by: Emil <emilmattsson14@gmail.com>
This commit is contained in:
@@ -67,6 +67,67 @@ curl http://localhost:3000/api/health
|
||||
|
||||
---
|
||||
|
||||
## Synology DSM and Xpenology
|
||||
|
||||
Use a **Container Manager Project**, not the single-container wizard. The
|
||||
project path is the working directory for every relative path in the Compose
|
||||
file. Create that directory first and put all of these files in it before
|
||||
deploying the project:
|
||||
|
||||
```text
|
||||
docker-compose.yml
|
||||
.env
|
||||
docker/
|
||||
cron.Dockerfile
|
||||
crontab.self-hosted
|
||||
```
|
||||
|
||||
Uploading only `docker-compose.yml` is not enough: the cron service is built
|
||||
from `docker/cron.Dockerfile` and bind-mounts
|
||||
`docker/crontab.self-hosted`. Keep `.env` readable only by the administrator
|
||||
and Container Manager because it contains the Supabase service-role key.
|
||||
|
||||
Container Manager ships its own Compose build, and supported keys vary by DSM
|
||||
release. Accounted's base Compose file avoids the optional `cpus` and
|
||||
`healthcheck.start_interval` keys for compatibility. Set a CPU limit through
|
||||
Container Manager's resource controls or a local override if needed. When
|
||||
updating an existing deployment that relied on the previous two-CPU cap,
|
||||
reapply that limit in the host controls before restarting the project.
|
||||
|
||||
If you run Docker Compose 2.20.2 or newer against Docker Engine 25.0 or newer,
|
||||
the optional resource overlay restores the previous two-CPU cap and faster
|
||||
startup health checks while keeping the base file compatible. Download the
|
||||
overlay from the same Accounted tag or full commit as the base Compose file:
|
||||
|
||||
```bash
|
||||
ACCOUNTED_REF=replace-with-the-same-tag-or-full-commit
|
||||
curl -fsSLo docker-compose.resources.yml \
|
||||
"https://raw.githubusercontent.com/erp-mafia/accounted/${ACCOUNTED_REF}/docker-compose.resources.yml"
|
||||
docker compose -f docker-compose.yml -f docker-compose.resources.yml up -d
|
||||
```
|
||||
|
||||
Compose only applies the files named in each invocation. Keep the resource
|
||||
overlay in every later `up` command, after any other overlay. For example:
|
||||
|
||||
```bash
|
||||
# HTTPS with Caddy
|
||||
docker compose -f docker-compose.yml -f docker-compose.caddy.yml -f docker-compose.resources.yml up -d
|
||||
|
||||
# Local image build
|
||||
docker compose -f docker-compose.yml -f docker-compose.build.yml -f docker-compose.resources.yml up --build -d
|
||||
```
|
||||
|
||||
Do not use this overlay if Container Manager rejects either key or the Docker
|
||||
Engine is older than 25.0. The memory and PID limits remain active in the base
|
||||
file either way.
|
||||
|
||||
Accounted itself does not use PostgreSQL port 5432 and does not need a database
|
||||
data folder when connected to Supabase Cloud. If Supabase is also running on
|
||||
the NAS, follow the [fully self-hosted notes](SELF-HOSTING.md#synology-dsm-and-xpenology-notes)
|
||||
for its separate project, bind mounts, ports, and JWKS configuration.
|
||||
|
||||
---
|
||||
|
||||
## Enable HTTPS (recommended)
|
||||
|
||||
Ship a Caddy reverse proxy alongside the app: it auto-provisions Let's Encrypt certificates and renews them forever.
|
||||
|
||||
Reference in New Issue
Block a user