Documentation
¶
Overview ¶
Package stack materialises the embedded compose stack into DRAGONRUN_HOME and drives `docker compose` against it.
The assets are embedded rather than read from the repo so the binary works anywhere, and re-extracted on every Up so an upgraded dragonrun cannot end up driving a stale compose file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComposeOut ¶
ComposeOut runs a subcommand and captures stdout, for machine-read output.
func Dir ¶
Dir is where the stack is extracted. Generated per-project files live alongside it under caddy/sites and pgweb/bookmarks.
func Extract ¶
Extract writes the embedded assets to disk, overwriting what is there. Only the files dragonrun owns are touched -- caddy/sites and pgweb/bookmarks live outside this tree precisely so they survive.
func ProjectName ¶
func ProjectName() string
ProjectName is the docker compose project this DRAGONRUN_HOME owns.
The compose file carries `name: dragonrun`, which means every instance on the machine would share containers AND volumes regardless of DRAGONRUN_HOME. A throwaway instance pointed at a scratch home would then quietly adopt the real stack's postgres volume, and its `down -v` would destroy real data. Deriving the name from the home path makes instances genuinely independent.
func RequireDocker ¶
func RequireDocker() error
func Running ¶
func Running() bool
Running reports whether the postgres container is up, which every provisioning command needs before it can do anything useful.
func SetDNSMode ¶
func SetDNSMode(mode string)
Types ¶
This section is empty.