doxy/README.md

111 lines
1.8 KiB
Markdown
Raw Permalink Normal View History

2023-01-10 11:02:58 +01:00
# Doxy
## Installation
```shell
2023-01-10 11:11:04 +01:00
pipx install git+https://github.com/jaypikay/doxy.git
2023-01-10 11:02:58 +01:00
```
## Shell completion
2023-01-10 11:11:04 +01:00
### Service name completion
By enabling shell completion the service names are *TAB-Completted* when using the `control`
command.
2023-01-10 11:02:58 +01:00
## Configuration
Save the configuration file in `~/.config/doxy/config.yml`:
```yaml
root_directory: "/path/to/docker/services"
compose_executable: "/usr/bin/docker-compose"
```
2023-01-12 08:54:42 +01:00
If you use `docker compose` instead of `docker-compose` you can use a wrapper script for
**docker-compose**
```shell
#!/bin/bash
/usr/bin/docker compose $@
exit 0
```
2023-01-10 11:02:58 +01:00
## Usage
```
Usage: doxy [OPTIONS] COMMAND [ARGS]...
Options:
2023-01-16 14:42:00 +01:00
-f, --format [fancy|simple] output formatting [default: fancy]
2023-01-10 11:02:58 +01:00
--help Show this message and exit.
Commands:
2023-01-13 15:05:49 +01:00
control run docker-compose commands
edit edit the compose file
list list available services
update pull the latest service images and restart
2023-01-10 11:02:58 +01:00
```
2023-01-10 11:11:04 +01:00
## Examples
### List available services
```shell
$ doxy list
Available Services
├── service-1
├── service-2
├── other-service
└── my-service-demo
```
2023-01-16 14:42:00 +01:00
When `doxy -f simple` is used the output is easier to process by pipes.
2023-01-10 11:11:04 +01:00
### Start a service and detach
```shell
$ doxy control other-service up -d
2023-01-10 11:11:04 +01:00
```
2023-01-10 16:08:35 +01:00
### Edit a service
```shell
$ doxy edit service-2
```
2023-01-12 08:54:42 +01:00
### Bash
#### Alternative 1
Add this to ~/.bashrc:
```
eval "$(_DOXY_COMPLETE=bash_source doxy)"
```
#### Alternative 2
Save the script:
```shell
_DOXY_COMPLETE=bash_source doxy > ~/.doxy-complete.bash
```
Add this to ~/.bashrc:
```
. ~/.foo-bar-complete.bash
````
### Zsh
#### Alternative 1
Add this to ~/.zshrc:
```
eval "$(_DOXY_COMPLETE=zsh_source doxy)"
```
#### Alternative 2
Save the script:
```shell
_DOXY_COMPLETE=zsh_source doxy > ~/.doxy-complete.zsh
```
Add this to ~/.zshrc:
```
. ~/.foo-bar-complete.zsh
```