mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
docs: the storage seed example lives in the wiki now
Admin-Storage pointed at the README's Storage section for the seed file example and the compose mount line. That section is gone, so the link went nowhere and the example existed in no copy at all - the wiki page described storage-config.json without ever showing one. Both are on the page now. The commented mount in docker-compose.yml pointed at the same removed section.
This commit is contained in:
+1
-1
@@ -53,7 +53,7 @@ services:
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
- ./uploads:/app/uploads
|
||||
# - ./storage-config.json:/app/data/storage-config.json:ro # optional seed-once storage provisioning (README → Storage)
|
||||
# - ./storage-config.json:/app/data/storage-config.json:ro # optional seed-once storage provisioning (wiki: Admin-Storage)
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-qO-", "http://localhost:3000/api/health"]
|
||||
|
||||
+23
-2
@@ -143,8 +143,29 @@ For scripted deployments, place a `storage-config.json` in the data directory
|
||||
(in Docker: mount it at `/app/data/storage-config.json`). It is imported
|
||||
exactly once — on the first boot that has no stored storage configuration —
|
||||
then ignored (a log line says so). An invalid file aborts boot with the exact
|
||||
validation error. Example and the compose mount line: see the
|
||||
[README Storage section](https://github.com/liketrek/TREK#storage).
|
||||
validation error.
|
||||
|
||||
```jsonc
|
||||
// storage-config.json - secrets may be plaintext (encrypted on import)
|
||||
// or already-encrypted enc:v1: values.
|
||||
{
|
||||
"backends": [
|
||||
{ "name": "off-site", "type": "s3", "options": {
|
||||
"endpoint": "https://s3.example.com", "bucket": "trek",
|
||||
"accessKeyId": "...", "secretAccessKey": "..." } },
|
||||
{ "name": "backups-mirror", "type": "mirror", "options": {
|
||||
"primary": "backups-local", "replicas": ["off-site"] } }
|
||||
],
|
||||
"categories": { "backups": "backups-mirror" }
|
||||
}
|
||||
```
|
||||
|
||||
The panel presents this exact setup as **Mirror targets** on `backups-local`.
|
||||
|
||||
```yaml
|
||||
# docker-compose: add under the trek service's volumes
|
||||
- ./storage-config.json:/app/data/storage-config.json:ro
|
||||
```
|
||||
|
||||
To reset storage configuration (or re-import a seed file): stop the server,
|
||||
`sqlite3 data/travel.db "DELETE FROM app_settings WHERE key LIKE 'storage.%';"`,
|
||||
|
||||
Reference in New Issue
Block a user