No description
- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| bin | ||
| README.md | ||
dctl
A thin wrapper around docker compose for self-hosted stacks: acts on groups
of services, reloads nginx automatically, and can temporarily expose an
internal port.
Installation
tpm install dctl
Usage
Run it from a directory containing a compose file.
dctl up # up everything
dctl up nextcloud # up nextcloud and nextcloud-* (db, redis, cron...)
dctl down immich gitea # down several groups at once
dctl restart nginx # down then up
dctl pull # pull the images
dctl reload # nginx -s reload
dctl expose gitea 3000 # forward 127.0.0.1:3000 to gitea:3000
dctl expose gitea 8080:3000 # same, on another host port
A service name given on the command line matches the service itself and every
service prefixed with name-, so dctl up nextcloud also brings up
nextcloud-db and nextcloud-redis. With no name, all services are selected.
expose starts a throwaway alpine/socat container on the service's network
to reach a container port that isn't published. It stays in the foreground
until Ctrl-C.
Notes
- The service list comes from
docker compose config --services, soinclude, profiles and overrides are taken into account. - If the project has an
nginxservice, it is reloaded afterup,down,restartandpull— except when nginx itself has just been downed.