From ddbb6157ca43711c9f48c6f35adf0a5437c6b549 Mon Sep 17 00:00:00 2001
From: Bastien Abadie <bastien@nextcairn.com>
Date: Mon, 25 May 2020 14:04:31 +0200
Subject: [PATCH] Replace local_settings.py by config.yml in README.md

---
 README.md | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/README.md b/README.md
index a82045aaf9..7239ce9d90 100644
--- a/README.md
+++ b/README.md
@@ -28,9 +28,12 @@ arkindex/manage.py migrate
 arkindex/manage.py createsuperuser
 ```
 
-### Local settings
+### Local configuration
 
-For development purposes, you can customize the Arkindex settings in `arkindex/project/local_settings.py`. This file is not tracked by Git; if it exists, any setting set in this file will override any setting from `settings.py`. This is useful for debugging and setting your instance to be convenient for you. Those settings are ignored when deploying to a server.
+For development purposes, you can customize the Arkindex settings by adding a YAML file as `arkindex/config.yml`. This file is not tracked by Git; if it exists, any configuration directive set in this file will be used for exposed settings from `settings.py`. You can view the full list of settings [on the wiki](https://wiki.vpn/en/arkindex/deploy/configuration).
+
+
+Another mean to customize your Arkindex instance is to add a Python file in `arkindex/project/local_settings.py`. Here you are not limited to exposed settings, and can customize any setting, or even load Python dependencies at boot time. This is not recommended, as your customization may not be available to real-world Arkindex instances.
 
 ### ImageMagick setup
 
@@ -52,19 +55,20 @@ http://ark.localhost:8000/api/v1/oauth/providers/gitlab/callback/
 https://ark.localhost/api/v1/oauth/providers/gitlab/callback/
 ```
 
-Once the application is created, GitLab will provide you with an application ID and a secret. Use the `local_settings.py` file to set them:
+Once the application is created, GitLab will provide you with an application ID and a secret. Use the `arkindex/config.yaml` file to set them:
 
-```
-GITLAB_APP_ID = "24cacf5004bf68ae9daad19a5bba391d85ad1cb0b31366e89aec86fad0ab16cb"
-GITLAB_APP_SECRET = "9d96d9d5b1addd7e7e6119a23b1e5b5f68545312bfecb21d1cdc6af22b8628b8"
+```yaml
+gitlab:
+  app_id: 24cacf5004bf68ae9daad19a5bba391d85ad1cb0b31366e89aec86fad0ab16cb
+  app_secret: 9d96d9d5b1addd7e7e6119a23b1e5b5f68545312bfecb21d1cdc6af22b8628b8
 ```
 
 ### Local image server
 
-Arkindex splits up image URLs in their image server and the image path. For example, a IIIF server at `http://iiif.irht.cnrs.fr/iiif/` and an image at `/Paris/JJ042/1.jpg` would be represented as an ImageServer instance holding one Image. Since Arkindex has a local IIIF server for image uploads and thumbnails, a special instance of ImageServer is required to point to this local server. In local developement, this server should be available at `https://ark.localhost/iiif`. You will therefore need to create an ImageServer via the Django admin or the Django shell with this URL. To set the local server ID, you can use the `LOCAL_IMAGESERVER_ID` environment variable or set a custom setting in `local_settings.py`:
+Arkindex splits up image URLs in their image server and the image path. For example, a IIIF server at `http://iiif.irht.cnrs.fr/iiif/` and an image at `/Paris/JJ042/1.jpg` would be represented as an ImageServer instance holding one Image. Since Arkindex has a local IIIF server for image uploads and thumbnails, a special instance of ImageServer is required to point to this local server. In local developement, this server should be available at `https://ark.localhost/iiif`. You will therefore need to create an ImageServer via the Django admin or the Django shell with this URL. To set the local server ID, you can add a custom setting in `arkindex/config.yml`:
 
-```
-LOCAL_IMAGESERVER_ID = 999
+```yaml
+local_imageserver_id: 999
 ```
 
 Here is how to quickly create the ImageServer using the shell:
-- 
GitLab