No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-29 18:39:49 +02:00
bin dctl can now do port forwarding 2026-08-28 12:01:03 +02:00
README.md add readme 2026-08-29 18:39:49 +02:00

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, so include, profiles and overrides are taken into account.
  • If the project has an nginx service, it is reloaded after up, down, restart and pull — except when nginx itself has just been downed.