From f44d3bc05e27e48b676bee213462ee464d705f40 Mon Sep 17 00:00:00 2001 From: Niklas Herder Date: Thu, 2 Apr 2026 15:49:03 +0200 Subject: [PATCH] docs: clean up named volume examples in docker-compose and quick-start docs (#161) Improve the Docker Compose documentation for named volumes and persistence section for clarity and consistency. Fix indentation in quick-start.md that broke MkDocs tabbed content rendering. --- docs/configuration/docker-compose.md | 43 ++++++++++++++-------------- docs/getting-started/quick-start.md | 16 +++++------ 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/docs/configuration/docker-compose.md b/docs/configuration/docker-compose.md index bb074dbf1e..b4055c21c7 100644 --- a/docs/configuration/docker-compose.md +++ b/docs/configuration/docker-compose.md @@ -11,16 +11,9 @@ services: ports: - "4566:4566" volumes: - # Local directory bind mount (default) - ./data:/app/data - - # OR named volume (optional): - # - floci-data:/app/data - ./init/start.d:/etc/floci/init/start.d:ro - ./init/stop.d:/etc/floci/init/stop.d:ro - -#volumes: -# floci-data: ``` ## Full Setup (with ElastiCache and RDS) @@ -36,17 +29,10 @@ services: - "6379-6399:6379-6399" # ElastiCache / Redis proxy ports - "7001-7099:7001-7099" # RDS / PostgreSQL + MySQL proxy ports volumes: - # Local directory bind mount (default) - - ./data:/app/data - - # OR named volume (optional): - # - floci-data:/app/data - /var/run/docker.sock:/var/run/docker.sock # required for Lambda, ElastiCache, RDS + - ./data:/app/data environment: FLOCI_SERVICES_DOCKER_NETWORK: my-project_default # (1) - -#volumes: -# floci-data: ``` 1. Set this to the Docker network name that your compose project creates (usually `_default`). Floci uses it to attach spawned Lambda / ElastiCache / RDS containers to the same network. @@ -82,19 +68,34 @@ services: ports: - "4566:4566" volumes: - # Local directory bind mount (default) - ./data:/app/data - - # OR named volume (optional): - # - floci-data:/app/data + environment: + FLOCI_STORAGE_MODE: persistent + FLOCI_STORAGE_PERSISTENT_PATH: /app/data +``` + +### Using Named Volumes + +Instead of bind-mounting a local directory, you can use Docker named volumes to keep your project directory clean: + +```yaml +services: + floci: + image: hectorvent/floci:latest + ports: + - "4566:4566" + volumes: + - floci-data:/app/data environment: FLOCI_STORAGE_MODE: persistent FLOCI_STORAGE_PERSISTENT_PATH: /app/data -#volumes: -# floci-data: +volumes: + floci-data: ``` +Named volumes are managed entirely by Docker and won't create files in your repository. This works with both the JVM and native images. + ## Environment Variables Reference All `application.yml` options can be overridden via environment variables using the `FLOCI_` prefix with underscores replacing dots and dashes: diff --git a/docs/getting-started/quick-start.md b/docs/getting-started/quick-start.md index 845ce90023..3d298a8c2f 100644 --- a/docs/getting-started/quick-start.md +++ b/docs/getting-started/quick-start.md @@ -17,12 +17,12 @@ This guide gets Floci running and verifies that AWS CLI commands work against it volumes: # Local directory bind mount (default) - ./data:/app/data - + # OR named volume (optional): # - floci-data:/app/data - -# volumes: -# floci-data: + + # volumes: + # floci-data: ``` ```bash @@ -42,12 +42,12 @@ This guide gets Floci running and verifies that AWS CLI commands work against it volumes: # Local directory bind mount (default) - ./data:/app/data - + # OR named volume (optional): # - floci-data:/app/data - -# volumes: -# floci-data: + + # volumes: + # floci-data: ``` ```bash