diff --git a/README.md b/README.md index 6d3c46a..5044d15 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # ServerCtl - Services for Developers +This is a tool to start up servers on-demand for development. **It is not** a +tool for orchestrating container stacks or deploying sevices for production. +In many cases the default configuration might be directly insecure, and should +not be put online. For what it is designed for however, i.e. quickly spinning +up a ready-to-roll mongodb or openldap server, it does what it is supposed to. ## Todo @@ -79,3 +84,13 @@ $ ip addr show docker0 inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0 ... ``` + +### Can I configure the services? + +Use the `find` command with the `-E` or `--environment` option to find what you can override +on start: + +```shell +$ server find mariadb -E +$ MYSQL_ROOT_PASSWORD=foobar server start mariadb --instance uniqueid +``` diff --git a/src/Registry/ServiceRegistry.php b/src/Registry/ServiceRegistry.php index 389cb11..c760390 100644 --- a/src/Registry/ServiceRegistry.php +++ b/src/Registry/ServiceRegistry.php @@ -33,6 +33,7 @@ class ServiceRegistry if (!fnmatch("*.json", $itempath)) continue; $json = file_get_contents($itempath); $parsed = json_decode($json, true); + if (($parsed['$type']??null) != 'service') continue; $this->services[$itempath] = $parsed; } @@ -54,4 +55,4 @@ class ServiceRegistry return $this->services; } -} \ No newline at end of file +}