From d20f0fcf8860242f785bdb1de32c958887cdc349 Mon Sep 17 00:00:00 2001 From: throwaway Date: Sat, 17 Feb 2024 14:51:05 -0800 Subject: [PATCH 1/2] fix numeric values being set as string --- docker/gen_config.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker/gen_config.php b/docker/gen_config.php index b7e036e..b1cb1e6 100644 --- a/docker/gen_config.php +++ b/docker/gen_config.php @@ -25,6 +25,9 @@ function type_to_string($n) { return $n ? 'true' : 'false'; } if ($type === "string") { + if(is_numeric($n)) { + return $n; + } return "\"$n\""; } if ($type === "array") { From 2e4a14cf167a909f087032d39745e1fd118b078a Mon Sep 17 00:00:00 2001 From: throwaway Date: Sat, 17 Feb 2024 15:10:52 -0800 Subject: [PATCH 2/2] fix instances passed through env --- README.md | 2 ++ docker/gen_config.php | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ea93811..5c5d056 100644 --- a/README.md +++ b/README.md @@ -177,6 +177,8 @@ any environment variables prefixed with `FOURGET_` will be added to the generate the entrypoint will automatically set the `CAPTCHA_DATASET` value for you based on directory names and number of files in each +to set `INSTANCES` pass a comma separated string of urls (FOURGET_INSTANCES = "https://4get.ca,https://domain.tld") + ``` version: "3.7" diff --git a/docker/gen_config.php b/docker/gen_config.php index b1cb1e6..dff39cb 100644 --- a/docker/gen_config.php +++ b/docker/gen_config.php @@ -52,7 +52,7 @@ function detect_captcha_dirs() { } -$special_keys = ["CAPTCHA_DATASET"]; +$special_keys = ["CAPTCHA_DATASET", "INSTANCES"]; $output = "