Have Docker create a missing volume host path (closes #235)
Check / check (pull_request) Skipped
Check / check (pull_request) Skipped
Docker refused to bind-mount a host path that did not exist, so an app's first deploy failed until someone ran mkdir on the host. buildMounts now sets BindOptions.CreateMountpoint on every bind mount, so the Docker daemon creates a missing host path when the container starts and leaves an existing one alone. upaas itself cannot create it: it runs in a container and does not see the host's filesystem. The README gains a Volume mounts section saying so. Model: opus-5-5
This commit is contained in:
@@ -271,6 +271,13 @@ names Dockerfile frontend 1.3 or later, such as `docker/dockerfile:1`.
|
||||
Session secrets are automatically generated on first startup and persisted to
|
||||
`$UPAAS_DATA_DIR/session.key`.
|
||||
|
||||
### Volume mounts
|
||||
|
||||
An app's volume mounts are bind mounts of host paths. When a host path does not
|
||||
exist yet, upaas has Docker create it as an empty directory, owned by root, when
|
||||
the app's container starts; there is no need to create it first. An existing
|
||||
host path is left as it is. This needs Docker Engine 23.0 or later.
|
||||
|
||||
## License
|
||||
|
||||
WTFPL
|
||||
|
||||
Reference in New Issue
Block a user