From 7258625eda3ff2e4b1f18b7cb99dc6498a49c51d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com>
Date: Wed, 31 Aug 2022 14:44:02 +0200
Subject: [PATCH] DOC: added docs on how to add further configuration

---
 README_SETUP.md                               | 31 ++++++++++++++-----
 .../conf/ext/server.conf.d/50-example.conf    |  2 ++
 compose/docker-compose.yml                    |  8 +++--
 3 files changed, 32 insertions(+), 9 deletions(-)
 create mode 100644 caosdb-server/conf/ext/server.conf.d/50-example.conf

diff --git a/README_SETUP.md b/README_SETUP.md
index 2b7f05e..824ab74 100644
--- a/README_SETUP.md
+++ b/README_SETUP.md
@@ -18,16 +18,21 @@ container:
 sudo usermod -aG docker $USER
 ```
 
+It is recommended that you clone this repository such that you have the
+example configuration files at hand.
+
 ## Start CaosDB ##
 Once you have docker installed, you only need two configuration files: One
 for the reverse proxy envoy `envoy.yml` and one that defines the docker containers that
-you want to use and how they can interact `docker-compose.yml`. You can copy the 
+you want to use and how they can interact `docker-compose.yml`. If you did not
+clone this repository before, you can copy the
 `compose` folder of this repository to your computer and then run
 
 ```sh
 docker-compose -f compose/docker-compose.yml up
 ```
 
+This will download the images that are used which may take a couple of minutes.
 Once the logs read
 
 ```
@@ -62,6 +67,14 @@ The buildkit setting allows the usage of some special features in the `Dockerfil
 
 The image will be named `caosdb`.
 
+### Versions of CaosDB components
+If you want to build an image with specific versions of the various CaosDB
+components, you can do so by using `--build-arg` options.
+For example `--build-arg MYSQLBACKEND=v4.0.0` will change the version of the
+sql backend.
+
+The following arguments are available: `MYSQLBACKEND SERVER WEBUI PYLIB ADVANCEDUSERTOOLS`.
+
 ## SSL Certificates
 If you want to use SSL certificates (and in production use, you definitely should)
 you need to uncomment the respective sections in `envoy.yml` and `docker-compose.yml`.
@@ -77,17 +90,21 @@ to how to configure this correctly.
 ## Configuration
 
 ### The CaosDB server
+You can include alternative configuration settings for the CaosDB server.
+Please see the [server documentation](https://docs.indiscale.com/caosdb-server/administration/configuration.html).
 
-TODO: Short reference as to where to specify server config; remainder in docs.indiscale.com
+It is recommended to add settings in files in the `server.conf.d` folder. E.g.
+`caosdb-server/conf/ext/server.conf.d/50-example.conf`
 
-### "extroot"
+Uncomment the corresponding section in the `docker-compose.yml`
 
-TODO: Explain the meaning of the commented "path/to/other" section
+### Including large data folders
+Often users do not want to copy all files into CaosDB but instead want to make
+whole filesystems available to the CaosDB server. This can be achieved by mounting
+the corresponding filesystem into the container. You can do this by uncommenting
+the volume section that bind mounts some path (that you must set) to `.../extroot`.
 
-### Versions of CaosDB components
 
-TODO: Do we even want to explain this? If yes, explain how to set the variables
-to use, e.g., the dev branch.
 
 ### Bind IP
 If you want your server to be accessible from other computers, you need to change
diff --git a/caosdb-server/conf/ext/server.conf.d/50-example.conf b/caosdb-server/conf/ext/server.conf.d/50-example.conf
new file mode 100644
index 0000000..db6aa3b
--- /dev/null
+++ b/caosdb-server/conf/ext/server.conf.d/50-example.conf
@@ -0,0 +1,2 @@
+
+#CONTEXT_ROOT=/caosdb
diff --git a/compose/docker-compose.yml b/compose/docker-compose.yml
index ffe9bb9..88e9ef1 100644
--- a/compose/docker-compose.yml
+++ b/compose/docker-compose.yml
@@ -42,8 +42,12 @@ services:
         target: /opt/caosdb/mnt/caosroot
       # - type: bind
       #   read_only: true
-      #   source: "/path/to/other"
-      #   target: /opt/caosdb/mnt/other
+      #   source: $PWD/caosdb-server/
+      #   target: /opt/caosdb/mnt/caosdb-server
+      # - type: bind
+      #   read_only: true
+      #   source: /path/to/external/root/
+      #   target: /opt/caosdb/mnt/extroot
 
   envoy:
     image: envoyproxy/envoy:v1.21-latest
-- 
GitLab