2022-09-27 10:29:56 +00:00
|
|
|
# ServerCtl - Services for Developers
|
|
|
|
|
|
|
|
|
2022-09-27 10:47:30 +00:00
|
|
|
## Todo
|
2022-09-27 10:29:56 +00:00
|
|
|
|
2022-09-27 10:47:30 +00:00
|
|
|
- [ ] Add a --temporary option to start to remove volume after stop
|
2022-09-27 10:29:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
Say you need a Mongodb instance for something. Try this:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ serverctl start mongo
|
|
|
|
Started mongo<default>
|
|
|
|
Mongo client: 27017
|
|
|
|
$
|
|
|
|
```
|
|
|
|
|
|
|
|
What just happened? Well, the `start` command pulled and started a new container
|
|
|
|
from the latest docker image using sensible defaults from the service registry.
|
|
|
|
|
|
|
|
Let's start another one:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ serverctl start mongo --instance other --portoffset 1
|
|
|
|
Started mongo<other>
|
|
|
|
Mongo client: 27018
|
|
|
|
$
|
|
|
|
```
|
|
|
|
|
|
|
|
Check it out!
|
|
|
|
|
|
|
|
```
|
|
|
|
$ serverctl status
|
|
|
|
Service Instance Ports
|
|
|
|
mongo default 27017
|
|
|
|
other 27018
|
|
|
|
$ serverctl stop mongo --all
|
|
|
|
Stopped mongo<default>
|
|
|
|
Stopped mongo<other>
|
|
|
|
$
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## FAQ
|
|
|
|
|
|
|
|
### Where is the data stored?
|
|
|
|
|
|
|
|
* Data goes in `$HOME/.var/serverctl`
|
|
|
|
|