pipx install git+https://github.com/jaypikay/doxy.gitBy enabling shell completion the service names are TAB-Completted when using the control
command.
Save the configuration file in ~/.config/doxy/config.yml:
root_directory: "/path/to/docker/services"
compose_executable: "/usr/bin/docker-compose"If you use docker compose instead of docker-compose you can use a wrapper script for
docker-compose
#!/bin/bash
/usr/bin/docker compose $@
exit 0Usage: doxy [OPTIONS] COMMAND [ARGS]...
Options:
-f, --format [fancy|simple] output formatting [default: fancy]
--help Show this message and exit.
Commands:
control run docker-compose commands
edit edit the compose file
list list available services
update pull the latest service images and restart
$ doxy list
Available Services
├── service-1
├── service-2
├── other-service
└── my-service-demoWhen doxy -f simple is used the output is easier to process by pipes.
$ doxy control other-service up -d$ doxy edit service-2Add this to ~/.bashrc:
eval "$(_DOXY_COMPLETE=bash_source doxy)"
Save the script:
_DOXY_COMPLETE=bash_source doxy > ~/.doxy-complete.bashAdd this to ~/.bashrc:
. ~/.foo-bar-complete.bash
Add this to ~/.zshrc:
eval "$(_DOXY_COMPLETE=zsh_source doxy)"
Save the script:
_DOXY_COMPLETE=zsh_source doxy > ~/.doxy-complete.zshAdd this to ~/.zshrc:
. ~/.foo-bar-complete.zsh