]> git.p6c8.net - jirafeau_project.git/commitdiff
changed method name and added doc for docker compose
authorBlackstareye <>
Mon, 17 Feb 2025 15:39:00 +0000 (16:39 +0100)
committerBlackstareye <>
Mon, 17 Feb 2025 15:39:00 +0000 (16:39 +0100)
docker/README.md
docker/docker_config.php

index 0ee1a9621d2c29f77d0eba868f22514d164a31d0..cf70ec83025738d9730d3987a1081738723187b8 100644 (file)
@@ -20,6 +20,41 @@ cd Jirafeau
 docker build -t your/jirafeau:latest .
 ```
 
 docker build -t your/jirafeau:latest .
 ```
 
+## Docker Compose
+
+You can use the `docker-compose.yaml` from [here](../docker-compose.yaml)
+
+### Custom Theme
+
+1. copy the theme data from the running container
+
+    ```sh
+    docker compose cp web:/www/media jirafeau_media
+    ```
+
+2. mount the theme data
+
+    ```yaml
+    #....
+    volumes:
+        - ./jirafeau_media/your_theme:/www/media/your_theme
+    ```
+
+3. set the environment variable
+
+    ```yaml
+    # ....
+    environment:
+    STYLE: 'your_theme'
+    DARK_STYLE: 'your_theme'
+    ```
+
+4. run the compose file
+
+    ```sh
+    docker compose up -d
+    ```
+
 ## Security
 
 You may be interested in running Jirafeau on port 80:
 ## Security
 
 You may be interested in running Jirafeau on port 80:
@@ -36,6 +71,7 @@ Jirafeau's docker image accepts some options through environment variables to ea
 More details about options in `lib/config.original.php`.
 
 Available options:
 More details about options in `lib/config.original.php`.
 
 Available options:
+
 - `ADMIN_PASSWORD`: setup a specific admin password. If not set, a random password will be generated.
 - `ADMIN_IP`: set one or more ip allowed to access admin interface (separated by comma).
 - `LANG`: choose the language for jirafeau (default auto).
 - `ADMIN_PASSWORD`: setup a specific admin password. If not set, a random password will be generated.
 - `ADMIN_IP`: set one or more ip allowed to access admin interface (separated by comma).
 - `LANG`: choose the language for jirafeau (default auto).
index b33cf85ba20a7a578bac72a4a01cbff8a9954a49..6037ec6434c17337d19c033b205d69f904e191c2 100644 (file)
@@ -91,7 +91,7 @@ function env_2_cfg_string_array(&$cfg, $config_name)
     return true;
 }
 
     return true;
 }
 
-function env_2_cfg_string_array_key_value(&$cfg, $config_name)
+function env_2_cfg_array_from_json(&$cfg, $config_name)
 {
     $env_name = strtoupper($config_name);
     $env_string = getenv($env_name);
 {
     $env_name = strtoupper($config_name);
     $env_string = getenv($env_name);
@@ -201,7 +201,7 @@ function run_setup(&$cfg)
     env_2_cfg_string_array($cfg, 'upload_ip_nopassword');
     env_2_cfg_string_array($cfg, 'proxy_ip');
     // this is a key value based value
     env_2_cfg_string_array($cfg, 'upload_ip_nopassword');
     env_2_cfg_string_array($cfg, 'proxy_ip');
     // this is a key value based value
-    env_2_cfg_string_array_key_value($cfg, 'availabilities');
+    env_2_cfg_array_from_json($cfg, 'availabilities');
     env_2_cfg_bool($cfg, 'store_uploader_ip');
     env_2_cfg_string($cfg, 'download_password_requirement');
     env_2_cfg_int($cfg, 'download_password_gen_len');
     env_2_cfg_bool($cfg, 'store_uploader_ip');
     env_2_cfg_string($cfg, 'download_password_requirement');
     env_2_cfg_int($cfg, 'download_password_gen_len');

patrick-canterino.de