From: Blackstareye <> Date: Mon, 17 Feb 2025 15:39:00 +0000 (+0100) Subject: changed method name and added doc for docker compose X-Git-Url: https://git.p6c8.net/jirafeau_project.git/commitdiff_plain/b269224a37d80a40ef609bf5a8e4ed2e8ab2838d?ds=inline;hp=-c changed method name and added doc for docker compose --- b269224a37d80a40ef609bf5a8e4ed2e8ab2838d diff --git a/docker/README.md b/docker/README.md index 0ee1a96..cf70ec8 100644 --- a/docker/README.md +++ b/docker/README.md @@ -20,6 +20,41 @@ cd Jirafeau 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: @@ -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: + - `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). diff --git a/docker/docker_config.php b/docker/docker_config.php index b33cf85..6037ec6 100644 --- a/docker/docker_config.php +++ b/docker/docker_config.php @@ -91,7 +91,7 @@ function env_2_cfg_string_array(&$cfg, $config_name) 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); @@ -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_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');