@ecl-server/deployer
v1.0.0
Published
Instant proxy + site deployment via Docker/Traefik
Readme
deployer
Small CLI for creating Docker Compose based local or production-ish web stacks with Traefik routing.
deployer creates one shared Traefik proxy, then adds sites behind it. A site can have a frontend only, or a frontend plus a Payload CMS or WordPress backend. It writes project folders, generated docker-compose.yml files, starter app files, and tracks what it created in ~/.deploykit/state.json.
Commands support interactive and non-interactive use.
deployer proxy
Creates or replaces the Traefik proxy in ./proxy.
Args:
-y, --yes: use defaults for missing options and skip prompts.--force: replace the tracked proxy and remove the conflictingdeploykit-traefikcontainer without prompting.--dev: generate local development proxy config.--prod: generate production proxy config with HTTPS and no insecure dashboard.--port <port>: alias for--http-port.--http-port <port>: host HTTP port. Default:80.--https-port <port>: host HTTPS port for--prod. Default:443.--dashboard-port <port>: local dashboard port in dev mode. Default:8080.--email <email>: Let's Encrypt email. Required with--prodin non-interactive mode.
Examples:
deployer proxy
deployer proxy --yes --dev --port 8080
deployer proxy --yes --prod --email [email protected]
deployer proxy --force --yes --dev --http-port 8080 --dashboard-port 8081deployer site
Creates a site folder in the current directory and starts it behind the tracked proxy.
Args:
-y, --yes: use defaults for missing options and skip prompts.--domain <domain>: site domain, for exampleapp.localhostorexample.com.--admin-prefix <prefix>: admin subdomain prefix. Default:admin.--backend <type>:none,payloadcms, orwordpress. Default with--yes:none.--frontend <type>:nuxt,next,vue,react, orhtml. Default with--yes:nuxt.--overwrite: replace an existing tracked site or existing site directory without prompting.
Examples:
deployer site
deployer site --yes --domain app.localhost
deployer site --yes --domain blog.localhost --frontend nuxt --backend payloadcms
deployer site --yes --domain wp.localhost --frontend react --backend wordpress --admin-prefix cms
deployer site --yes --domain app.localhost --frontend next --backend none --overwritedeployer init
Runs proxy setup and site setup in one command. It accepts the proxy args and the site args.
Args:
- All
deployer proxyargs. - All
deployer siteargs.
Examples:
deployer init
deployer init --yes --dev --port 8080 --domain app.localhost --frontend nuxt
deployer init --yes --prod --email [email protected] --domain example.com --frontend next --backend payloadcmsdeployer list
Lists tracked proxy, frontend, backend, and database containers.
Args:
-v, --verbose: show image, ports, creation time, domains, directories, and slugs.
Examples:
deployer list
deployer ls
deployer list --verbosedeployer destroy <domain>
Stops containers, removes volumes, deletes the site directory, and removes the site from state.
Args:
<domain>: tracked site domain.-y, --yes: confirm deletion without prompting.
Examples:
deployer destroy app.localhost
deployer destroy app.localhost --yesdeployer destroy-proxy
Stops and removes the tracked Traefik proxy.
Args:
-y, --yes: confirm deletion without prompting.
Examples:
deployer destroy-proxy
deployer destroy-proxy --yesdeployer rebuild <domain>
Rebuilds and restarts a tracked site from its current docker-compose.yml. Use this after changing site files in production mode.
Args:
<domain>: tracked site domain or slug.
Examples:
deployer rebuild app.localhostdeployer rebuild-proxy
Recreates the tracked Traefik proxy from its current docker-compose.yml. Use this after changing proxy config while it is running.
Examples:
deployer rebuild-proxydeployer backup <domain>
Creates a single .tar.gz backup for a tracked site. The backup includes the site directory, frontend files, backend files, compose config, metadata, and the site's Docker database volume when the site has a backend.
The site is stopped while the backup copies volume data, then started again after the copy finishes.
Args:
<domain>: tracked site domain or slug.-o, --output <file>: optional backup archive path. Default:./<slug>-backup-<timestamp>.tar.gz.
Examples:
deployer backup app.localhost
deployer backup app.localhost --output ./backups/app.localhost.tar.gzdeployer restore <backup>
Restores a site from a backup archive, recreates its database volume, starts it with Docker Compose, and adds it back to state.
Args:
<backup>: backup archive created bydeployer backup.--dir <dir>: restore into this directory instead of./<domain>.--overwrite: replace an existing tracked site or directory.-y, --yes: confirm overwrite without prompting.
Examples:
deployer restore ./backups/app.localhost.tar.gz
deployer restore ./backups/app.localhost.tar.gz --overwrite --yes
deployer restore ./backups/app.localhost.tar.gz --dir restored-appdeployer doctor
Checks whether tracked state still matches directories and Docker containers in the case that either has been removed manually. Supports deleting leftover artifacts.
Args:
--fix: clean up broken entries without prompting.-y, --yes: alias for--fix.
Examples:
deployer doctor
deployer doctor --fix
deployer doctor --yes