deploy: clarify container path = where your code reads/writes
Make the volume mapping explicit: the right-hand mount path is where the app writes. WORKDIR is /app, so code writing to ./cache lands in /app/cache (this mount); same for /app/logs and /app/config. Removes ambiguity about which side of the volume line the code targets. Verified: mkdocs build --strict clean. Signed-off-by: disqualifier <dev@disqualifier.me>
This commit is contained in:
+6
-2
@@ -155,8 +155,12 @@ volumes:
|
||||
The deploy layer injects `MOUNTS_DIR` and auto-creates the dir — but you
|
||||
**uncomment** the line and pick the container path (`/app/data` here), since
|
||||
that's app-specific and can't be auto-mounted.
|
||||
7. Named volume with a **bare name** — ephemeral, auto-namespaced per service at
|
||||
deploy time so it can't collide.
|
||||
7. Named volume mounted at **`/app/cache`** — ephemeral scratch. The **right-hand
|
||||
path is where your code writes**: `WORKDIR` is `/app`, so if your app writes to
|
||||
`./cache` (or `/app/cache`), that's this mount. Same rule for logs (`/app/logs`)
|
||||
and config (`/app/config`) — match the container path to where your code reads
|
||||
and writes. The volume name is a bare name, auto-namespaced per service at deploy
|
||||
so it can't collide.
|
||||
8. Declare bare (`cache`, not `myapp_cache`). Deploy auto-prefixes it.
|
||||
|
||||
!!! tip "Three tiers of storage"
|
||||
|
||||
Reference in New Issue
Block a user