From 9194626bcd71603d291b13eb717cee086b71c0b9 Mon Sep 17 00:00:00 2001 From: Kwee Lung Sin Date: Tue, 8 Sep 2026 00:25:50 +0700 Subject: [PATCH 1/4] feat(override): Add bind mount overrides for docker volumes --- docs/02-setup/04-env-variables.md | 20 +++++++ docs/02-setup/05-overrides.md | 54 ++++++++++--------- overrides/compose.bind-mount-db-data.yaml | 14 +++++ overrides/compose.bind-mount-redis-queue.yaml | 14 +++++ overrides/compose.bind-mount-sites.yaml | 13 +++++ 5 files changed, 90 insertions(+), 25 deletions(-) create mode 100644 overrides/compose.bind-mount-db-data.yaml create mode 100644 overrides/compose.bind-mount-redis-queue.yaml create mode 100644 overrides/compose.bind-mount-sites.yaml diff --git a/docs/02-setup/04-env-variables.md b/docs/02-setup/04-env-variables.md index 069e323..dd00092 100644 --- a/docs/02-setup/04-env-variables.md +++ b/docs/02-setup/04-env-variables.md @@ -47,6 +47,26 @@ Then edit `.env` and set variables according to your needs. --- +## Volume Bind Mounts + +| Variable | Purpose | Default | When to Set | +| --------------------------- | -------------------------------------------------------------------------------------------- | ------- | -------------------------------------------------- | +| `SITES_DATA_LOCATION` | Host directory for the `sites` volume; must be an absolute path and already exist | - | Required for `compose.bind-mount-sites.yaml` | +| `DB_DATA_LOCATION` | Host directory for the `db-data` volume; must be an absolute path and already exist | - | Required for `compose.bind-mount-db-data.yaml` | +| `REDIS_QUEUE_DATA_LOCATION` | Host directory for the `redis-queue-data` volume; must be an absolute path and already exist | - | Required for `compose.bind-mount-redis-queue.yaml` | + +> Warning: with a bind mount, the data lives on the host, not inside the Docker volume. Removing the volume (for example with `docker compose down -v`) will **not** delete the data. To actually erase the data, delete the host directory manually with `rm -r `. + +**Example:** + +```bash +SITES_DATA_LOCATION=/srv/frappe/sites +DB_DATA_LOCATION=/srv/frappe/db-data +REDIS_QUEUE_DATA_LOCATION=/srv/frappe/redis-queue-data +``` + +--- + ## Reverse Proxy and SSL (HTTPS) Configuration ### Traefik (compose.proxy.yaml / compose.https.yaml) diff --git a/docs/02-setup/05-overrides.md b/docs/02-setup/05-overrides.md index 2cbd969..b6e909e 100644 --- a/docs/02-setup/05-overrides.md +++ b/docs/02-setup/05-overrides.md @@ -8,28 +8,32 @@ Overrides extend the base compose.yaml with additional services or modify existi docker compose -f compose.yaml -f overrides/compose.mariadb.yaml -f overrides/compose.redis.yaml config > compose.custom.yaml ``` -| Overrider | Purpose | Additional Info | -| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -| **Database** | | | -| compose.mariadb.yaml | Adds MariaDB database service | set `DB_PASSWORD` or default Password will be used | -| compose.mariadb-secrets.yaml | Adds MariaDB with password from a secret file instead of environment variable | Set `DB_PASSWORD_SECRETS_FILE` to the path of your secret file | -| compose.mariadb-shared.yaml | Makes MariaDB available on a shared network (mariadb-network) for other services | set `DB_PASSWORD` | -| compose.postgres.yaml | Uses PostgreSQL instead of MariaDB as the database | set `DB_PASSWORD` | -| **Proxy** | | | -| compose.noproxy.yaml | Exposes the application directly on port `:8080` without a reverse proxy | | -| compose.proxy.yaml | Uses Traefik as HTTP reverse proxy on port `:80` | You can change the published port by setting `HTTP_PUBLISH_PORT` | -| compose.https.yaml | Uses Traefik as HTTPS reverse proxy on Port `:443` with automatic HTTP-to-HTTPS redirect | `SITES_RULE` and `LETSENCRYPT_EMAIL` must be set. `HTTP_PUBLISH_PORT` and `HTTPS_PUBLISH_PORT` can be set. | -| compose.traefik.yaml | Runs a standalone Traefik proxy with dashboard (HTTP) on a shared `traefik-public` network | Use for multi-stack setups. Requires `TRAEFIK_DOMAIN` and `HASHED_PASSWORD`. | -| compose.traefik-ssl.yaml | Adds HTTPS and Let's Encrypt for the Traefik dashboard | Use with `compose.traefik.yaml`. Requires `EMAIL` and `TRAEFIK_DOMAIN`. Publishes `HTTPS_PUBLISH_PORT`. | -| compose.nginxproxy.yaml | Uses nginx-proxy as HTTP reverse proxy on port `:80` | Set `NGINX_PROXY_HOSTS`. Use with `compose.nginxproxy-ssl.yaml` for HTTPS. You can change the published port by setting `HTTP_PUBLISH_PORT` | -| compose.nginxproxy-ssl.yaml | Adds acme-companion for HTTPS on port `:443` with automatic certificates | Requires `compose.nginxproxy.yaml`. Set `NGINX_PROXY_HOSTS` and `LETSENCRYPT_EMAIL`. `HTTP_PUBLISH_PORT` and `HTTPS_PUBLISH_PORT` can be set. | -| **Redis** | | | -| compose.redis.yaml | Adds Redis service for caching and background job queuing | | -| **Services** | | | -| compose.migrator.yaml | Runs a dedicated migration container performing `bench --site all migrate` on all sites at every start | Control migration intent with `MIGRATE_SITES` - defaults to true | -| **TBD** | **The following overrides are available but lack documentation. If you use them and understand their purpose, please consider contributing to this documentation.** | | -| compose.backup-cron.yaml | | | -| compose.custom-domain-ssl.yaml | | | -| compose.custom-domain.yaml | | | -| compose.multi-bench-ssl.yaml | | | -| compose.multi-bench.yaml | | | +| Overrider | Purpose | Additional Info | +| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| **Database** | | | +| compose.mariadb.yaml | Adds MariaDB database service | set `DB_PASSWORD` or default Password will be used | +| compose.mariadb-secrets.yaml | Adds MariaDB with password from a secret file instead of environment variable | Set `DB_PASSWORD_SECRETS_FILE` to the path of your secret file | +| compose.mariadb-shared.yaml | Makes MariaDB available on a shared network (mariadb-network) for other services | set `DB_PASSWORD` | +| compose.postgres.yaml | Uses PostgreSQL instead of MariaDB as the database | set `DB_PASSWORD` | +| **Proxy** | | | +| compose.noproxy.yaml | Exposes the application directly on port `:8080` without a reverse proxy | | +| compose.proxy.yaml | Uses Traefik as HTTP reverse proxy on port `:80` | You can change the published port by setting `HTTP_PUBLISH_PORT` | +| compose.https.yaml | Uses Traefik as HTTPS reverse proxy on Port `:443` with automatic HTTP-to-HTTPS redirect | `SITES_RULE` and `LETSENCRYPT_EMAIL` must be set. `HTTP_PUBLISH_PORT` and `HTTPS_PUBLISH_PORT` can be set. | +| compose.traefik.yaml | Runs a standalone Traefik proxy with dashboard (HTTP) on a shared `traefik-public` network | Use for multi-stack setups. Requires `TRAEFIK_DOMAIN` and `HASHED_PASSWORD`. | +| compose.traefik-ssl.yaml | Adds HTTPS and Let's Encrypt for the Traefik dashboard | Use with `compose.traefik.yaml`. Requires `EMAIL` and `TRAEFIK_DOMAIN`. Publishes `HTTPS_PUBLISH_PORT`. | +| compose.nginxproxy.yaml | Uses nginx-proxy as HTTP reverse proxy on port `:80` | Set `NGINX_PROXY_HOSTS`. Use with `compose.nginxproxy-ssl.yaml` for HTTPS. You can change the published port by setting `HTTP_PUBLISH_PORT` | +| compose.nginxproxy-ssl.yaml | Adds acme-companion for HTTPS on port `:443` with automatic certificates | Requires `compose.nginxproxy.yaml`. Set `NGINX_PROXY_HOSTS` and `LETSENCRYPT_EMAIL`. `HTTP_PUBLISH_PORT` and `HTTPS_PUBLISH_PORT` can be set. | +| **Redis** | | | +| compose.redis.yaml | Adds Redis service for caching and background job queuing | | +| **Services** | | | +| compose.migrator.yaml | Runs a dedicated migration container performing `bench --site all migrate` on all sites at every start | Control migration intent with `MIGRATE_SITES` - defaults to true | +| **Volumes** | | | +| compose.bind-mount-sites.yaml | Bind mounts the `sites` volume to a host directory instead of a Docker-managed volume | Set `SITES_DATA_LOCATION`. The directory must exist before `docker compose up -d`. | +| compose.bind-mount-db-data.yaml | Bind mounts the `db-data` volume to a host directory instead of a Docker-managed volume | Use with `compose.mariadb.yaml` or `compose.postgres.yaml`. Set `DB_DATA_LOCATION`. The directory must exist before `docker compose up -d`. | +| compose.bind-mount-redis-queue.yaml | Bind mounts the `redis-queue-data` volume to a host directory instead of a Docker-managed volume | Use with `compose.redis.yaml`. Set `REDIS_QUEUE_DATA_LOCATION`. The directory must exist before `docker compose up -d`. | +| **TBD** | **The following overrides are available but lack documentation. If you use them and understand their purpose, please consider contributing to this documentation.** | | +| compose.backup-cron.yaml | | | +| compose.custom-domain-ssl.yaml | | | +| compose.custom-domain.yaml | | | +| compose.multi-bench-ssl.yaml | | | +| compose.multi-bench.yaml | | | diff --git a/overrides/compose.bind-mount-db-data.yaml b/overrides/compose.bind-mount-db-data.yaml new file mode 100644 index 0000000..198ac7b --- /dev/null +++ b/overrides/compose.bind-mount-db-data.yaml @@ -0,0 +1,14 @@ +# Bind mount the `db-data` volume to a host directory instead of letting Docker manage it. +# Use together with overrides/compose.mariadb.yaml or overrides/compose.postgres.yaml. +# +# NOTE: +# - `DB_DATA_LOCATION` (required): absolute path to the host directory to bind mount. +# - The directory must exist before running `docker compose up -d`, otherwise Docker fails +# when populating the volume. +volumes: + db-data: + driver: local + driver_opts: + type: none + o: bind + device: ${DB_DATA_LOCATION} diff --git a/overrides/compose.bind-mount-redis-queue.yaml b/overrides/compose.bind-mount-redis-queue.yaml new file mode 100644 index 0000000..b5a149f --- /dev/null +++ b/overrides/compose.bind-mount-redis-queue.yaml @@ -0,0 +1,14 @@ +# Bind mount the `redis-queue-data` volume to a host directory instead of letting Docker manage it. +# Use together with overrides/compose.redis.yaml. +# +# NOTE: +# - `REDIS_QUEUE_DATA_LOCATION` (required): absolute path to the host directory to bind mount. +# - The directory must exist before running `docker compose up -d`, otherwise Docker fails +# when populating the volume. +volumes: + redis-queue-data: + driver: local + driver_opts: + type: none + o: bind + device: ${REDIS_QUEUE_DATA_LOCATION} diff --git a/overrides/compose.bind-mount-sites.yaml b/overrides/compose.bind-mount-sites.yaml new file mode 100644 index 0000000..8a7c82c --- /dev/null +++ b/overrides/compose.bind-mount-sites.yaml @@ -0,0 +1,13 @@ +# Bind mount the `sites` volume to a host directory instead of letting Docker manage it. +# +# NOTE: +# - `SITES_DATA_LOCATION` (required): absolute path to the host directory to bind mount. +# - The directory must exist before running `docker compose up -d`, otherwise Docker fails +# when populating the volume. +volumes: + sites: + driver: local + driver_opts: + type: none + o: bind + device: ${SITES_DATA_LOCATION} From d2a336d44ef151e995164fd6587c2ced758ab7f7 Mon Sep 17 00:00:00 2001 From: Kwee Lung Sin Date: Tue, 8 Sep 2026 00:50:55 +0700 Subject: [PATCH 2/4] fix linter and document permission required by the respective container UID --- docs/02-setup/04-env-variables.md | 14 +++++++++++ docs/02-setup/05-overrides.md | 2 +- example.env | 6 +++++ overrides/compose.bind-mount-db-data.yaml | 7 ++++-- overrides/compose.bind-mount-redis-queue.yaml | 4 ++- overrides/compose.bind-mount-sites.yaml | 4 ++- tests/compose-configs.json | 25 +++++++++++++++++++ 7 files changed, 57 insertions(+), 5 deletions(-) diff --git a/docs/02-setup/04-env-variables.md b/docs/02-setup/04-env-variables.md index dd00092..7ca7430 100644 --- a/docs/02-setup/04-env-variables.md +++ b/docs/02-setup/04-env-variables.md @@ -55,10 +55,24 @@ Then edit `.env` and set variables according to your needs. | `DB_DATA_LOCATION` | Host directory for the `db-data` volume; must be an absolute path and already exist | - | Required for `compose.bind-mount-db-data.yaml` | | `REDIS_QUEUE_DATA_LOCATION` | Host directory for the `redis-queue-data` volume; must be an absolute path and already exist | - | Required for `compose.bind-mount-redis-queue.yaml` | +The host directory must exist before `docker compose up -d` and must be writable by the user the container runs as: + +| Directory | Owner | +| ------------------ | ------------------------------------------------- | +| `sites` | uid/gid `1000` (the `frappe` user of the image) | +| `db-data` | uid/gid `999` (the `mariadb` or `postgres` image) | +| `redis-queue-data` | uid/gid `999` (the `redis` image) | + > Warning: with a bind mount, the data lives on the host, not inside the Docker volume. Removing the volume (for example with `docker compose down -v`) will **not** delete the data. To actually erase the data, delete the host directory manually with `rm -r `. **Example:** +```bash +mkdir -p /srv/frappe/{sites,db-data,redis-queue-data} +chown 1000:1000 /srv/frappe/sites +chown 999:999 /srv/frappe/db-data /srv/frappe/redis-queue-data +``` + ```bash SITES_DATA_LOCATION=/srv/frappe/sites DB_DATA_LOCATION=/srv/frappe/db-data diff --git a/docs/02-setup/05-overrides.md b/docs/02-setup/05-overrides.md index b6e909e..05292b4 100644 --- a/docs/02-setup/05-overrides.md +++ b/docs/02-setup/05-overrides.md @@ -29,7 +29,7 @@ docker compose -f compose.yaml -f overrides/compose.mariadb.yaml -f overrides/co | compose.migrator.yaml | Runs a dedicated migration container performing `bench --site all migrate` on all sites at every start | Control migration intent with `MIGRATE_SITES` - defaults to true | | **Volumes** | | | | compose.bind-mount-sites.yaml | Bind mounts the `sites` volume to a host directory instead of a Docker-managed volume | Set `SITES_DATA_LOCATION`. The directory must exist before `docker compose up -d`. | -| compose.bind-mount-db-data.yaml | Bind mounts the `db-data` volume to a host directory instead of a Docker-managed volume | Use with `compose.mariadb.yaml` or `compose.postgres.yaml`. Set `DB_DATA_LOCATION`. The directory must exist before `docker compose up -d`. | +| compose.bind-mount-db-data.yaml | Bind mounts the `db-data` volume to a host directory instead of a Docker-managed volume | Use with a database override (mariadb, mariadb-shared, postgres). Set `DB_DATA_LOCATION`. Directory must exist before `docker compose up -d`. | | compose.bind-mount-redis-queue.yaml | Bind mounts the `redis-queue-data` volume to a host directory instead of a Docker-managed volume | Use with `compose.redis.yaml`. Set `REDIS_QUEUE_DATA_LOCATION`. The directory must exist before `docker compose up -d`. | | **TBD** | **The following overrides are available but lack documentation. If you use them and understand their purpose, please consider contributing to this documentation.** | | | compose.backup-cron.yaml | | | diff --git a/example.env b/example.env index 24b41b5..d2a820c 100644 --- a/example.env +++ b/example.env @@ -15,6 +15,12 @@ DB_PORT= REDIS_CACHE= REDIS_QUEUE= +# Only with the bind mount overrides. +# Absolute path to an existing host directory, owned by the uid/gid the service runs as (1000 for sites, 999 for db-data and redis-queue-data). +SITES_DATA_LOCATION= +DB_DATA_LOCATION= +REDIS_QUEUE_DATA_LOCATION= + # The number of threads per Gunicorn worker process for handling concurrent requests. GUNICORN_THREADS=4 diff --git a/overrides/compose.bind-mount-db-data.yaml b/overrides/compose.bind-mount-db-data.yaml index 198ac7b..a5aedc3 100644 --- a/overrides/compose.bind-mount-db-data.yaml +++ b/overrides/compose.bind-mount-db-data.yaml @@ -1,14 +1,17 @@ # Bind mount the `db-data` volume to a host directory instead of letting Docker manage it. -# Use together with overrides/compose.mariadb.yaml or overrides/compose.postgres.yaml. +# Use together with overrides/compose.mariadb.yaml, overrides/compose.mariadb-shared.yaml or +# overrides/compose.postgres.yaml. # # NOTE: # - `DB_DATA_LOCATION` (required): absolute path to the host directory to bind mount. # - The directory must exist before running `docker compose up -d`, otherwise Docker fails # when populating the volume. +# - The directory must be writable by the database user of the image: uid/gid 999 for both +# the `mariadb` and the `postgres` images, for example `chown -R 999:999 `. volumes: db-data: driver: local driver_opts: type: none o: bind - device: ${DB_DATA_LOCATION} + device: ${DB_DATA_LOCATION:?DB_DATA_LOCATION must be set to an existing absolute host path} diff --git a/overrides/compose.bind-mount-redis-queue.yaml b/overrides/compose.bind-mount-redis-queue.yaml index b5a149f..6049afd 100644 --- a/overrides/compose.bind-mount-redis-queue.yaml +++ b/overrides/compose.bind-mount-redis-queue.yaml @@ -5,10 +5,12 @@ # - `REDIS_QUEUE_DATA_LOCATION` (required): absolute path to the host directory to bind mount. # - The directory must exist before running `docker compose up -d`, otherwise Docker fails # when populating the volume. +# - The directory must be writable by the `redis` user of the image (uid/gid 999): +# `chown -R 999:999 `. volumes: redis-queue-data: driver: local driver_opts: type: none o: bind - device: ${REDIS_QUEUE_DATA_LOCATION} + device: ${REDIS_QUEUE_DATA_LOCATION:?REDIS_QUEUE_DATA_LOCATION must be set to an existing absolute host path} diff --git a/overrides/compose.bind-mount-sites.yaml b/overrides/compose.bind-mount-sites.yaml index 8a7c82c..f7d6115 100644 --- a/overrides/compose.bind-mount-sites.yaml +++ b/overrides/compose.bind-mount-sites.yaml @@ -4,10 +4,12 @@ # - `SITES_DATA_LOCATION` (required): absolute path to the host directory to bind mount. # - The directory must exist before running `docker compose up -d`, otherwise Docker fails # when populating the volume. +# - The directory must be writable by the `frappe` user of the image (uid/gid 1000): +# `chown -R 1000:1000 `. volumes: sites: driver: local driver_opts: type: none o: bind - device: ${SITES_DATA_LOCATION} + device: ${SITES_DATA_LOCATION:?SITES_DATA_LOCATION must be set to an existing absolute host path} diff --git a/tests/compose-configs.json b/tests/compose-configs.json index aff67ba..550220d 100644 --- a/tests/compose-configs.json +++ b/tests/compose-configs.json @@ -2,10 +2,13 @@ "environment": { "BASE_SITE": "site-one.localhost", "BENCH_NETWORK": "bench-network", + "DB_DATA_LOCATION": "/srv/frappe-bind-mounts/db-data", "DB_PASSWORD_SECRETS_FILE": "./test-db-password.txt", "EMAIL": "admin@example.com", "HASHED_PASSWORD": "not-a-real-password-hash", + "REDIS_QUEUE_DATA_LOCATION": "/srv/frappe-bind-mounts/redis-queue-data", "ROUTER": "site-one", + "SITES_DATA_LOCATION": "/srv/frappe-bind-mounts/sites", "TRAEFIK_DOMAIN": "traefik.example.com" }, "configurations": [ @@ -37,6 +40,28 @@ "overrides/compose.noproxy.yaml" ] }, + { + "name": "mariadb-bind-mounts", + "files": [ + "compose.yaml", + "overrides/compose.mariadb.yaml", + "overrides/compose.redis.yaml", + "overrides/compose.noproxy.yaml", + "overrides/compose.bind-mount-sites.yaml", + "overrides/compose.bind-mount-db-data.yaml", + "overrides/compose.bind-mount-redis-queue.yaml" + ] + }, + { + "name": "postgres-bind-mount-db-data", + "files": [ + "compose.yaml", + "overrides/compose.postgres.yaml", + "overrides/compose.redis.yaml", + "overrides/compose.noproxy.yaml", + "overrides/compose.bind-mount-db-data.yaml" + ] + }, { "name": "traefik-http", "files": [ From 66a778c03e91fb9c555e09ff9dd3f677b016d602 Mon Sep 17 00:00:00 2001 From: Kwee Lung Sin Date: Tue, 8 Sep 2026 22:18:31 +0700 Subject: [PATCH 3/4] docs(bind-mount): add documentation on the dedicated bind mount docs --- docs/09-concepts/02-docker-bind-mounts.md | 26 +++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/docs/09-concepts/02-docker-bind-mounts.md b/docs/09-concepts/02-docker-bind-mounts.md index 65b673a..addcc52 100644 --- a/docs/09-concepts/02-docker-bind-mounts.md +++ b/docs/09-concepts/02-docker-bind-mounts.md @@ -8,13 +8,14 @@ title: Docker Bind Mounts Bind mounts create a direct connection between a directory on your host machine and a directory inside a container. Changes in either location are immediately reflected in the other - perfect for development where you want to edit code on your host and see changes in the container. -## Bind Mount vs Named Volume vs Anonymous Volume +## Bind Mount vs Named Volume vs Named Bind-Mounted Volume vs Anonymous Volume -| Type | Syntax | Use Case | Persistence | -| -------------------- | ------------------------------ | -------------------------- | ---------------------------- | -| **Bind Mount** | `./local/path:/container/path` | Development, config files | On host filesystem | -| **Named Volume** | `volume_name:/container/path` | Production data, databases | Docker-managed | -| **Anonymous Volume** | `/container/path` | Temporary/cache data | Docker-managed, auto-deleted | +| Type | Syntax | Use Case | Persistence | +| ----------------------------- | ----------------------------------------------------------- | -------------------------------------------------------------------------------------- | ----------------------------------------------------- | +| **Bind Mount** | `./local/path:/container/path` | Development, config files | On host filesystem | +| **Named Volume** | `volume_name:/container/path` | Production data, databases | Docker-managed, removed by `docker compose down -v` | +| **Named Bind-Mounted Volume** | `volume_name:/container/path` + `driver_opts` on the volume | Production data that requires specific host filesystem functionality, e.g. NFS/SAN/ZFS | On host filesystem, survives `docker compose down -v` | +| **Anonymous Volume** | `/container/path` | Temporary/cache data | Docker-managed, auto-deleted | ## Bind Mount Examples @@ -39,8 +40,21 @@ services: volumes: - db_data:/var/lib/mysql # Managed by Docker, survives container deletion + # Named bind-mounted volume for production database that requires specific filesystem functionality + # on the host machine + db_bind_mounted: + volumes: + - db_data_bind_mounted:/var/lib/mysql + volumes: db_data: # Define named volume + + db_data_bind_mounted: # Define named bind-mounted volume + driver: local + driver_opts: + type: none + o: bind + device: /data/db # absolute host path, must already exist ``` ## Performance Optimization (macOS/Windows) From 2e29a092e0d2f9407e71479af737f4bb29dae3aa Mon Sep 17 00:00:00 2001 From: Kwee Lung Sin Date: Thu, 10 Sep 2026 02:09:54 +0700 Subject: [PATCH 4/4] docs(bind-mount): add note and link to the overrides docs --- docs/09-concepts/02-docker-bind-mounts.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/09-concepts/02-docker-bind-mounts.md b/docs/09-concepts/02-docker-bind-mounts.md index addcc52..efc5c06 100644 --- a/docs/09-concepts/02-docker-bind-mounts.md +++ b/docs/09-concepts/02-docker-bind-mounts.md @@ -17,6 +17,9 @@ Bind mounts create a direct connection between a directory on your host machine | **Named Bind-Mounted Volume** | `volume_name:/container/path` + `driver_opts` on the volume | Production data that requires specific host filesystem functionality, e.g. NFS/SAN/ZFS | On host filesystem, survives `docker compose down -v` | | **Anonymous Volume** | `/container/path` | Temporary/cache data | Docker-managed, auto-deleted | +**NOTE**: This repository ships Docker Compose override files that configure named bind-mounted volumes for production data. +See [overrides.md](../02-setup/05-overrides.md) for the full list and usage. + ## Bind Mount Examples ```yaml @@ -54,7 +57,7 @@ volumes: driver_opts: type: none o: bind - device: /data/db # absolute host path, must already exist + device: /data/db # must be the absolute host path and already exist ``` ## Performance Optimization (macOS/Windows)