fix: require absolute path for HOST_DATA_DIR in docker-compose example
Relative paths (e.g. ./data) don't work because docker-compose may not run on the same machine as µPaaS. Remove the default and require the user to set HOST_DATA_DIR to an absolute host path.
This commit is contained in:
parent
c9fe4f4bf1
commit
96d23d2cf7
16
README.md
16
README.md
@ -187,9 +187,9 @@ services:
|
|||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
- ${HOST_DATA_DIR:-./data}:/var/lib/upaas
|
- ${HOST_DATA_DIR}:/var/lib/upaas
|
||||||
environment:
|
environment:
|
||||||
- UPAAS_HOST_DATA_DIR=${HOST_DATA_DIR:-./data}
|
- UPAAS_HOST_DATA_DIR=${HOST_DATA_DIR}
|
||||||
# Optional: uncomment to enable debug logging
|
# Optional: uncomment to enable debug logging
|
||||||
# - DEBUG=true
|
# - DEBUG=true
|
||||||
# Optional: Sentry error reporting
|
# Optional: Sentry error reporting
|
||||||
@ -199,8 +199,16 @@ services:
|
|||||||
# - METRICS_PASSWORD=secret
|
# - METRICS_PASSWORD=secret
|
||||||
```
|
```
|
||||||
|
|
||||||
**Important**: When running µPaaS inside a container, set `UPAAS_HOST_DATA_DIR` to the host path
|
**Important**: Set `HOST_DATA_DIR` to an **absolute path** on the Docker host before running
|
||||||
that maps to `UPAAS_DATA_DIR`. This is required for Docker bind mounts during builds to work correctly.
|
`docker compose up`. Relative paths will not work because docker-compose may not run on the same
|
||||||
|
machine as µPaaS. This value is used both for the bind mount and passed to µPaaS as
|
||||||
|
`UPAAS_HOST_DATA_DIR` so it can create correct bind mounts during builds.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
```bash
|
||||||
|
export HOST_DATA_DIR=/srv/upaas-data
|
||||||
|
docker compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
Session secrets are automatically generated on first startup and persisted to `$UPAAS_DATA_DIR/session.key`.
|
Session secrets are automatically generated on first startup and persisted to `$UPAAS_DATA_DIR/session.key`.
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user