Improved readme

This commit is contained in:
Chris 2022-10-12 01:20:15 +02:00
parent 0506b1826e
commit a9066e81c2
2 changed files with 17 additions and 1 deletions

View File

@ -1,5 +1,10 @@
# ServerCtl - Services for Developers # 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 ## Todo
@ -79,3 +84,13 @@ $ ip addr show docker0
inet 172.17.0.1/16 brd 172.17.255.255 scope global 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
```

View File

@ -33,6 +33,7 @@ class ServiceRegistry
if (!fnmatch("*.json", $itempath)) continue; if (!fnmatch("*.json", $itempath)) continue;
$json = file_get_contents($itempath); $json = file_get_contents($itempath);
$parsed = json_decode($json, true); $parsed = json_decode($json, true);
if (($parsed['$type']??null) != 'service') continue;
$this->services[$itempath] = $parsed; $this->services[$itempath] = $parsed;
} }