├── docs ├── index.md ├── assets │ ├── dokku.png │ ├── git.png │ ├── docker.png │ ├── extend.png │ ├── slack-logo.png │ ├── team │ │ ├── flink.jpg │ │ ├── u2mejc.jpg │ │ ├── progrium.jpg │ │ ├── flink-hidden.jpg │ │ ├── josegonzalez.jpg │ │ ├── morrisjobke.jpg │ │ ├── michaelshobbs.jpg │ │ ├── progrium-hidden.jpg │ │ ├── u2mejc-hidden.jpg │ │ ├── josegonzalez-hidden.jpg │ │ ├── michaelshobbs-hidden.jpg │ │ └── morrisjobke-hidden.jpg │ ├── gplaypattern.png │ ├── favicons │ │ ├── favicon.ico │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── favicon-96x96.png │ │ ├── mstile-70x70.png │ │ ├── apple-touch-icon.png │ │ ├── mstile-144x144.png │ │ ├── mstile-150x150.png │ │ ├── mstile-310x150.png │ │ ├── mstile-310x310.png │ │ ├── android-chrome-36x36.png │ │ ├── android-chrome-48x48.png │ │ ├── android-chrome-72x72.png │ │ ├── android-chrome-96x96.png │ │ ├── android-chrome-144x144.png │ │ ├── android-chrome-192x192.png │ │ ├── apple-touch-icon-57x57.png │ │ ├── apple-touch-icon-60x60.png │ │ ├── apple-touch-icon-72x72.png │ │ ├── apple-touch-icon-76x76.png │ │ ├── apple-touch-icon-114x114.png │ │ ├── apple-touch-icon-120x120.png │ │ ├── apple-touch-icon-144x144.png │ │ ├── apple-touch-icon-152x152.png │ │ ├── apple-touch-icon-180x180.png │ │ ├── apple-touch-icon-precomposed.png │ │ └── browserconfig.xml │ └── versions.json └── appendices │ ├── 0.9.0-migration-guide.md │ ├── 0.10.0-migration-guide.md │ ├── 0.8.0-migration-guide.md │ └── 0.7.0-migration-guide.md ├── plugins ├── 20_events │ ├── report │ ├── update │ ├── post-create │ ├── post-delete │ ├── post-deploy │ ├── post-stop │ ├── pre-delete │ ├── pre-deploy │ ├── pre-restore │ ├── pre-start │ ├── receive-app │ ├── tags-create │ ├── uninstall │ ├── user-auth │ ├── check-deploy │ ├── core-post-deploy │ ├── dependencies │ ├── deploy-source │ ├── docker-args-run │ ├── git-post-pull │ ├── git-pre-pull │ ├── network-get-port │ ├── nginx-hostname │ ├── nginx-pre-reload │ ├── post-app-clone │ ├── post-app-rename │ ├── post-extract │ ├── pre-enable-vhost │ ├── pre-receive-app │ ├── proxy-disable │ ├── proxy-enable │ ├── receive-branch │ ├── scheduler-deploy │ ├── scheduler-run │ ├── scheduler-stop │ ├── tags-destroy │ ├── docker-args-build │ ├── docker-args-deploy │ ├── network-build-config │ ├── network-clear-config │ ├── network-compute-ports │ ├── network-config-exists │ ├── network-get-ipaddr │ ├── network-get-listeners │ ├── network-get-property │ ├── network-write-ipaddr │ ├── network-write-port │ ├── post-build-buildpack │ ├── post-build-dockerfile │ ├── post-certs-remove │ ├── post-certs-update │ ├── post-config-update │ ├── post-domains-update │ ├── pre-build-buildpack │ ├── pre-build-dockerfile │ ├── pre-disable-vhost │ ├── pre-release-buildpack │ ├── proxy-build-config │ ├── proxy-clear-config │ ├── scheduler-tags-create │ ├── deployed-app-image-repo │ ├── deployed-app-image-tag │ ├── deployed-app-repository │ ├── post-proxy-ports-update │ ├── post-release-buildpack │ ├── post-release-dockerfile │ ├── pre-release-dockerfile │ ├── retire-container-failed │ ├── scheduler-docker-cleanup │ ├── scheduler-tags-destroy │ ├── plugin.toml │ ├── hook │ ├── subcommands │ │ ├── off │ │ ├── on │ │ ├── default │ │ └── list │ └── commands ├── certs │ ├── subcommands │ │ ├── update │ │ ├── report │ │ ├── info │ │ ├── default │ │ └── remove │ ├── plugin.toml │ ├── report │ └── commands ├── 00_dokku-standard │ ├── subcommands │ │ ├── url │ │ ├── deploy │ │ ├── urls │ │ ├── version │ │ ├── cleanup │ │ ├── run │ │ └── trace │ ├── docker-args-run │ ├── docker-args-deploy │ ├── plugin.toml │ ├── pre-deploy │ ├── post-deploy │ └── docker-args-build ├── config │ ├── docker-args-run │ ├── .gitignore │ ├── vendor │ │ └── github.com │ │ │ ├── joho │ │ │ └── godotenv │ │ │ │ ├── .gitignore │ │ │ │ ├── fixtures │ │ │ │ ├── invalid1.env │ │ │ │ ├── exported.env │ │ │ │ ├── equals.env │ │ │ │ ├── plain.env │ │ │ │ └── quoted.env │ │ │ │ ├── .travis.yml │ │ │ │ └── autoload │ │ │ │ └── autoload.go │ │ │ └── ryanuber │ │ │ └── columnize │ │ │ └── .travis.yml │ ├── plugin.toml │ ├── glide.yaml │ ├── glide.lock │ ├── src │ │ └── subcommands │ │ │ ├── keys │ │ │ └── keys.go │ │ │ ├── bundle │ │ │ └── bundle.go │ │ │ ├── get │ │ │ └── get.go │ │ │ ├── unset │ │ │ └── unset.go │ │ │ ├── set │ │ │ └── set.go │ │ │ └── export │ │ │ └── export.go │ ├── docker-args-deploy │ └── Makefile ├── shell │ ├── inputrc │ ├── plugin.toml │ └── commands ├── docker-options │ ├── docker-args-build │ ├── docker-args-run │ ├── plugin.toml │ ├── report │ └── subcommands │ │ ├── report │ │ ├── default │ │ ├── add │ │ └── remove ├── nginx-vhosts │ ├── subcommands │ │ ├── error-logs │ │ ├── default │ │ ├── access-logs │ │ └── build-config │ ├── plugin.toml │ ├── post-delete │ ├── commands │ ├── post-proxy-ports-update │ ├── proxy-enable │ ├── proxy-disable │ ├── pre-enable-vhost │ ├── pre-disable-vhost │ ├── post-domains-update │ ├── post-certs-remove │ ├── proxy-build-config │ ├── proxy-clear-config │ └── templates │ │ ├── 500-error.html │ │ ├── 400-error.html │ │ └── 404-error.html ├── repo │ ├── .gitignore │ ├── src │ │ ├── glide.yaml │ │ ├── vendor │ │ │ └── github.com │ │ │ │ └── ryanuber │ │ │ │ └── columnize │ │ │ │ └── .travis.yml │ │ ├── glide.lock │ │ └── subcommands │ │ │ └── gc │ │ │ └── gc.go │ ├── plugin.toml │ └── Makefile ├── common │ ├── vendor │ │ └── github.com │ │ │ ├── codeskyblue │ │ │ └── go-sh │ │ │ │ ├── testdata │ │ │ │ ├── executable │ │ │ │ ├── hello.txt │ │ │ │ └── linkfile │ │ │ │ ├── example │ │ │ │ ├── less │ │ │ │ │ └── less.go │ │ │ │ ├── tail │ │ │ │ │ └── tailf.go │ │ │ │ └── timeout │ │ │ │ │ └── timeout.go │ │ │ │ ├── example_test.go │ │ │ │ └── wercker.yml │ │ │ └── codegangsta │ │ │ └── inject │ │ │ ├── .gitignore │ │ │ └── update_readme.sh │ ├── glide.yaml │ ├── plugin.toml │ └── glide.lock ├── network │ ├── vendor │ │ └── github.com │ │ │ ├── codeskyblue │ │ │ └── go-sh │ │ │ │ ├── testdata │ │ │ │ ├── executable │ │ │ │ ├── hello.txt │ │ │ │ └── linkfile │ │ │ │ ├── example │ │ │ │ ├── less │ │ │ │ │ └── less.go │ │ │ │ ├── tail │ │ │ │ │ └── tailf.go │ │ │ │ └── timeout │ │ │ │ │ └── timeout.go │ │ │ │ ├── example_test.go │ │ │ │ └── wercker.yml │ │ │ ├── codegangsta │ │ │ └── inject │ │ │ │ ├── .gitignore │ │ │ │ └── update_readme.sh │ │ │ └── ryanuber │ │ │ └── columnize │ │ │ └── .travis.yml │ ├── src │ │ ├── glide.yaml │ │ ├── vendor │ │ │ └── github.com │ │ │ │ └── ryanuber │ │ │ │ └── columnize │ │ │ │ └── .travis.yml │ │ ├── glide.lock │ │ ├── subcommands │ │ │ ├── rebuild │ │ │ │ └── rebuild.go │ │ │ ├── rebuildall │ │ │ │ └── rebuildall.go │ │ │ ├── set │ │ │ │ └── set.go │ │ │ └── report │ │ │ │ └── report.go │ │ └── triggers │ │ │ ├── report │ │ │ └── report.go │ │ │ ├── network-build-config │ │ │ └── network-build-config.go │ │ │ ├── post-delete │ │ │ └── post-delete.go │ │ │ ├── post-create │ │ │ └── post-create.go │ │ │ ├── network-get-listeners │ │ │ └── network-get-listeners.go │ │ │ ├── network-config-exists │ │ │ └── network-config-exists.go │ │ │ ├── network-get-ipaddr │ │ │ └── network-get-ipaddr.go │ │ │ ├── network-get-property │ │ │ └── network-get-property.go │ │ │ └── network-get-port │ │ │ └── network-get-port.go │ ├── plugin.toml │ ├── glide.yaml │ ├── .gitignore │ └── network_test.go ├── git │ ├── plugin.toml │ ├── receive-app │ ├── report │ ├── subcommands │ │ ├── report │ │ ├── default │ │ └── initialize │ ├── post-delete │ ├── deploy-source │ └── commands ├── ps │ ├── plugin.toml │ ├── report │ ├── subcommands │ │ ├── report │ │ ├── stop │ │ ├── start │ │ ├── restart │ │ ├── scale │ │ ├── rebuild │ │ ├── restart-policy │ │ └── default │ ├── app-restart │ ├── post-stop │ ├── pre-deploy │ ├── core-post-deploy │ ├── post-create │ └── install ├── tar │ ├── plugin.toml │ ├── receive-app │ ├── subcommands │ │ ├── in │ │ ├── from │ │ └── default │ ├── commands │ ├── deploy-source │ └── internal-functions ├── apps │ ├── plugin.toml │ ├── report │ ├── subcommands │ │ ├── list │ │ ├── report │ │ ├── default │ │ ├── create │ │ ├── exists │ │ ├── destroy │ │ ├── lock │ │ └── unlock │ ├── commands │ ├── post-delete │ └── pre-delete ├── checks │ ├── plugin.toml │ ├── report │ ├── subcommands │ │ └── report │ └── commands ├── enter │ ├── plugin.toml │ └── commands ├── logs │ ├── plugin.toml │ └── commands ├── plugin │ ├── plugin.toml │ ├── subcommands │ │ ├── list │ │ ├── default │ │ ├── install-dependencies │ │ ├── enable │ │ ├── update │ │ ├── disable │ │ ├── uninstall │ │ └── install │ └── internal-functions ├── proxy │ ├── plugin.toml │ ├── report │ ├── subcommands │ │ ├── report │ │ ├── ports │ │ ├── ports-add │ │ ├── ports-set │ │ ├── ports-clear │ │ ├── set │ │ ├── default │ │ ├── ports-remove │ │ ├── enable │ │ └── disable │ ├── commands │ └── proxy.go ├── tags │ ├── plugin.toml │ └── subcommands │ │ ├── default │ │ ├── deploy │ │ └── create ├── domains │ ├── plugin.toml │ ├── report │ ├── subcommands │ │ ├── report │ │ ├── setup │ │ ├── enable │ │ ├── disable │ │ ├── add-global │ │ ├── set-global │ │ ├── remove-global │ │ ├── add │ │ ├── set │ │ ├── remove │ │ ├── clear │ │ └── default │ ├── install │ └── commands ├── ssh-keys │ ├── plugin.toml │ ├── subcommands │ │ ├── default │ │ ├── list │ │ └── remove │ ├── commands │ └── user-auth ├── storage │ ├── plugin.toml │ ├── install │ ├── report │ ├── subcommands │ │ ├── list │ │ ├── report │ │ ├── default │ │ ├── mount │ │ └── unmount │ ├── commands │ └── functions ├── build-env │ └── plugin.toml └── scheduler-docker-local │ ├── plugin.toml │ ├── report │ ├── subcommands │ ├── report │ └── default │ ├── commands │ ├── post-create │ ├── install │ ├── scheduler-tags-destroy │ └── pre-restore ├── tests ├── apps │ ├── go │ │ ├── .godir │ │ ├── CHECKS │ │ ├── Procfile │ │ ├── check_deploy │ │ └── web.go │ ├── static │ │ ├── .static │ │ ├── CHECKS │ │ ├── index.html │ │ ├── .env │ │ └── check_deploy │ ├── gitsubmodules │ │ ├── CHECKS │ │ ├── Procfile │ │ ├── pre-commit │ │ ├── check_deploy │ │ └── package.json │ ├── go-fail-predeploy │ │ ├── .godir │ │ ├── CHECKS │ │ ├── Procfile │ │ ├── check_deploy │ │ ├── Dockerfile │ │ ├── web.go │ │ └── app.json │ ├── ruby │ │ ├── CHECKS │ │ ├── Procfile │ │ ├── web.rb │ │ ├── .env │ │ ├── Gemfile │ │ ├── check_deploy │ │ └── Gemfile.lock │ ├── clojure │ │ ├── Procfile │ │ ├── check_deploy │ │ ├── README.md │ │ ├── project.clj │ │ └── src │ │ │ └── sample │ │ │ └── app.clj │ ├── config │ │ ├── Procfile │ │ ├── DOKKU_SCALE │ │ ├── package.json │ │ ├── post-deploy │ │ ├── check_deploy │ │ └── web.js │ ├── go-fail-postdeploy │ │ ├── .godir │ │ ├── CHECKS │ │ ├── Procfile │ │ ├── check_deploy │ │ ├── Dockerfile │ │ ├── web.go │ │ └── app.json │ ├── java │ │ ├── CHECKS │ │ ├── Procfile │ │ ├── check_deploy │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── HelloWorld.java │ ├── multi │ │ ├── .npmrc │ │ ├── Procfile │ │ ├── CHECKS │ │ ├── requirements.txt │ │ ├── .bowerrc │ │ ├── .gitignore │ │ ├── check_deploy │ │ ├── Gemfile │ │ ├── .buildpacks │ │ ├── static │ │ │ └── styles │ │ │ │ └── main.scss │ │ ├── README.md │ │ ├── bower.json │ │ ├── app.py │ │ ├── package.json │ │ └── Gemfile.lock │ ├── checks-root │ │ ├── CHECKS │ │ ├── package.json │ │ └── index.js │ ├── php │ │ ├── CHECKS │ │ ├── web │ │ │ └── index.php │ │ ├── Procfile │ │ ├── check_deploy │ │ └── composer.json │ ├── python-flask │ │ ├── CHECKS │ │ ├── Procfile │ │ ├── requirements.txt │ │ ├── post-deploy │ │ ├── check_deploy │ │ └── hello.py │ ├── .websocket.disabled │ │ ├── Procfile │ │ ├── README.md │ │ ├── views │ │ │ ├── index.handlebars │ │ │ └── layout.html │ │ ├── check_deploy │ │ └── package.json │ ├── nodejs-worker │ │ ├── DOKKU_SCALE │ │ ├── Procfile │ │ ├── check_deploy │ │ ├── package.json │ │ └── worker.js │ ├── scala │ │ ├── system.properties │ │ ├── Procfile │ │ ├── project │ │ │ ├── plugins.sbt │ │ │ └── build.properties │ │ ├── check_deploy │ │ └── build.sbt │ ├── nodejs-express-noprocfile │ │ ├── CHECKS │ │ ├── check_deploy │ │ ├── package.json │ │ └── web.js │ ├── dockerfile-noexpose │ │ ├── Dockerfile │ │ ├── check_deploy │ │ ├── CHECKS │ │ ├── index.js │ │ └── package.json │ ├── dockerfile │ │ ├── CHECKS │ │ ├── Dockerfile │ │ ├── post-deploy │ │ ├── check_deploy │ │ ├── index.js │ │ └── package.json │ ├── nodejs-express │ │ ├── CHECKS │ │ ├── check_deploy │ │ ├── worker.js │ │ ├── package.json │ │ └── web.js │ └── dockerfile-procfile │ │ ├── CHECKS │ │ ├── check_deploy │ │ ├── worker.js │ │ ├── Dockerfile │ │ ├── package.json │ │ ├── Procfile │ │ └── web.js ├── unit │ ├── osx_ssl_tarred.tar │ └── 10_repo.bats └── ci │ ├── setup.sh │ └── unit_test_runner.sh ├── .codacy.yml ├── PULL_REQUEST_TEMPLATE.md ├── common.mk ├── SPONSORS.md ├── .gitignore ├── .dockerignore ├── .stickler.yml ├── .editorconfig ├── debian ├── lintian-overrides ├── templates ├── config └── control └── contrib ├── herokuish-build.Dockerfile ├── update-build.Dockerfile ├── packer.json └── bash-completion /docs/index.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plugins/20_events/report: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/update: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /tests/apps/go/.godir: -------------------------------------------------------------------------------- 1 | web 2 | -------------------------------------------------------------------------------- /tests/apps/static/.static: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plugins/20_events/post-create: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/post-delete: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/post-deploy: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/post-stop: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/pre-delete: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/pre-deploy: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/pre-restore: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/pre-start: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/receive-app: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/tags-create: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/uninstall: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/user-auth: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /tests/apps/go/CHECKS: -------------------------------------------------------------------------------- 1 | / go 2 | -------------------------------------------------------------------------------- /plugins/20_events/check-deploy: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/core-post-deploy: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/dependencies: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/deploy-source: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/docker-args-run: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/git-post-pull: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/git-pre-pull: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/network-get-port: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/nginx-hostname: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/nginx-pre-reload: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/post-app-clone: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/post-app-rename: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/post-extract: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/pre-enable-vhost: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/pre-receive-app: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/proxy-disable: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/proxy-enable: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/receive-branch: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/scheduler-deploy: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/scheduler-run: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/scheduler-stop: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/tags-destroy: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/certs/subcommands/update: -------------------------------------------------------------------------------- 1 | add -------------------------------------------------------------------------------- /tests/apps/go/Procfile: -------------------------------------------------------------------------------- 1 | web: web 2 | -------------------------------------------------------------------------------- /plugins/20_events/docker-args-build: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/docker-args-deploy: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/network-build-config: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/network-clear-config: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/network-compute-ports: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/network-config-exists: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/network-get-ipaddr: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/network-get-listeners: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/network-get-property: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/network-write-ipaddr: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/network-write-port: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/post-build-buildpack: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/post-build-dockerfile: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/post-certs-remove: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/post-certs-update: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/post-config-update: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/post-domains-update: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/pre-build-buildpack: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/pre-build-dockerfile: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/pre-disable-vhost: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/pre-release-buildpack: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/proxy-build-config: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/proxy-clear-config: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/scheduler-tags-create: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /tests/apps/gitsubmodules/CHECKS: -------------------------------------------------------------------------------- 1 | / Hello 2 | -------------------------------------------------------------------------------- /tests/apps/go-fail-predeploy/.godir: -------------------------------------------------------------------------------- 1 | web 2 | -------------------------------------------------------------------------------- /tests/apps/ruby/CHECKS: -------------------------------------------------------------------------------- 1 | / Hello, world 2 | -------------------------------------------------------------------------------- /tests/apps/static/CHECKS: -------------------------------------------------------------------------------- 1 | / Static Page 2 | -------------------------------------------------------------------------------- /plugins/00_dokku-standard/subcommands/url: -------------------------------------------------------------------------------- 1 | urls -------------------------------------------------------------------------------- /plugins/20_events/deployed-app-image-repo: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/deployed-app-image-tag: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/deployed-app-repository: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/post-proxy-ports-update: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/post-release-buildpack: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/post-release-dockerfile: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/pre-release-dockerfile: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/retire-container-failed: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/scheduler-docker-cleanup: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/20_events/scheduler-tags-destroy: -------------------------------------------------------------------------------- 1 | hook -------------------------------------------------------------------------------- /plugins/config/docker-args-run: -------------------------------------------------------------------------------- 1 | docker-args-deploy -------------------------------------------------------------------------------- /tests/apps/clojure/Procfile: -------------------------------------------------------------------------------- 1 | web: lein run 2 | -------------------------------------------------------------------------------- /tests/apps/config/Procfile: -------------------------------------------------------------------------------- 1 | web: node web.js 2 | -------------------------------------------------------------------------------- /tests/apps/go-fail-postdeploy/.godir: -------------------------------------------------------------------------------- 1 | web 2 | -------------------------------------------------------------------------------- /tests/apps/go-fail-postdeploy/CHECKS: -------------------------------------------------------------------------------- 1 | / go 2 | -------------------------------------------------------------------------------- /tests/apps/go-fail-predeploy/CHECKS: -------------------------------------------------------------------------------- 1 | / go 2 | -------------------------------------------------------------------------------- /tests/apps/java/CHECKS: -------------------------------------------------------------------------------- 1 | / Hello from Java 2 | -------------------------------------------------------------------------------- /tests/apps/multi/.npmrc: -------------------------------------------------------------------------------- 1 | unsafe-perm = true 2 | -------------------------------------------------------------------------------- /plugins/shell/inputrc: -------------------------------------------------------------------------------- 1 | set disable-completion on 2 | -------------------------------------------------------------------------------- /tests/apps/checks-root/CHECKS: -------------------------------------------------------------------------------- 1 | ATTEMPTS=2 2 | / 3 | -------------------------------------------------------------------------------- /tests/apps/multi/Procfile: -------------------------------------------------------------------------------- 1 | web: gunicorn app:app 2 | -------------------------------------------------------------------------------- /tests/apps/php/CHECKS: -------------------------------------------------------------------------------- 1 | /

php

2 | -------------------------------------------------------------------------------- /tests/apps/python-flask/CHECKS: -------------------------------------------------------------------------------- 1 | / python/flask 2 | -------------------------------------------------------------------------------- /plugins/00_dokku-standard/docker-args-run: -------------------------------------------------------------------------------- 1 | docker-args-build -------------------------------------------------------------------------------- /plugins/config/.gitignore: -------------------------------------------------------------------------------- 1 | /commands 2 | /subcommands/* 3 | -------------------------------------------------------------------------------- /plugins/docker-options/docker-args-build: -------------------------------------------------------------------------------- 1 | docker-args-deploy -------------------------------------------------------------------------------- /plugins/docker-options/docker-args-run: -------------------------------------------------------------------------------- 1 | docker-args-deploy -------------------------------------------------------------------------------- /plugins/nginx-vhosts/subcommands/error-logs: -------------------------------------------------------------------------------- 1 | access-logs -------------------------------------------------------------------------------- /plugins/repo/.gitignore: -------------------------------------------------------------------------------- 1 | /commands 2 | /subcommands/* 3 | -------------------------------------------------------------------------------- /tests/apps/.websocket.disabled/Procfile: -------------------------------------------------------------------------------- 1 | web: node app.js -------------------------------------------------------------------------------- /tests/apps/config/DOKKU_SCALE: -------------------------------------------------------------------------------- 1 | # test comment 2 | web=1 3 | -------------------------------------------------------------------------------- /tests/apps/go-fail-predeploy/Procfile: -------------------------------------------------------------------------------- 1 | web: /go/bin/web 2 | -------------------------------------------------------------------------------- /plugins/00_dokku-standard/docker-args-deploy: -------------------------------------------------------------------------------- 1 | docker-args-build -------------------------------------------------------------------------------- /tests/apps/.websocket.disabled/README.md: -------------------------------------------------------------------------------- 1 | node websocket demo -------------------------------------------------------------------------------- /tests/apps/go-fail-postdeploy/Procfile: -------------------------------------------------------------------------------- 1 | web: /go/bin/web 2 | -------------------------------------------------------------------------------- /tests/apps/multi/CHECKS: -------------------------------------------------------------------------------- 1 | / Heroku Multi Buildpack on Dokku 2 | -------------------------------------------------------------------------------- /tests/apps/nodejs-worker/DOKKU_SCALE: -------------------------------------------------------------------------------- 1 | web=0 2 | worker=1 3 | -------------------------------------------------------------------------------- /tests/apps/nodejs-worker/Procfile: -------------------------------------------------------------------------------- 1 | worker: node worker.js 2 | -------------------------------------------------------------------------------- /tests/apps/python-flask/Procfile: -------------------------------------------------------------------------------- 1 | web: gunicorn hello:app 2 | -------------------------------------------------------------------------------- /tests/apps/scala/system.properties: -------------------------------------------------------------------------------- 1 | java.runtime.version=1.7 2 | -------------------------------------------------------------------------------- /tests/apps/nodejs-express-noprocfile/CHECKS: -------------------------------------------------------------------------------- 1 | / nodejs/express 2 | -------------------------------------------------------------------------------- /tests/apps/ruby/Procfile: -------------------------------------------------------------------------------- 1 | web: bundle exec ruby web.rb -p $PORT 2 | -------------------------------------------------------------------------------- /tests/apps/static/index.html: -------------------------------------------------------------------------------- 1 |

Static Page

2 | -------------------------------------------------------------------------------- /plugins/common/vendor/github.com/codeskyblue/go-sh/testdata/executable: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plugins/common/vendor/github.com/codeskyblue/go-sh/testdata/hello.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plugins/config/vendor/github.com/joho/godotenv/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /plugins/network/vendor/github.com/codeskyblue/go-sh/testdata/executable: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plugins/network/vendor/github.com/codeskyblue/go-sh/testdata/hello.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plugins/network/vendor/github.com/codeskyblue/go-sh/testdata/linkfile: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/apps/gitsubmodules/Procfile: -------------------------------------------------------------------------------- 1 | web: node node-js-sample/index.js 2 | -------------------------------------------------------------------------------- /tests/apps/multi/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask==0.10.1 2 | gunicorn==18.0 3 | -------------------------------------------------------------------------------- /plugins/common/vendor/github.com/codeskyblue/go-sh/testdata/linkfile: -------------------------------------------------------------------------------- 1 | hello.txt -------------------------------------------------------------------------------- /tests/apps/multi/.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "static/components" 3 | } 4 | -------------------------------------------------------------------------------- /tests/apps/php/web/index.php: -------------------------------------------------------------------------------- 1 | php'; ?> 2 | -------------------------------------------------------------------------------- /tests/apps/scala/Procfile: -------------------------------------------------------------------------------- 1 | web: target/universal/stage/bin/scala-getting-started 2 | -------------------------------------------------------------------------------- /docs/assets/dokku.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/dokku.png -------------------------------------------------------------------------------- /docs/assets/git.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/git.png -------------------------------------------------------------------------------- /tests/apps/ruby/web.rb: -------------------------------------------------------------------------------- 1 | require 'sinatra' 2 | 3 | get '/' do 4 | "Hello, world" 5 | end -------------------------------------------------------------------------------- /tests/apps/static/.env: -------------------------------------------------------------------------------- 1 | export BUILDPACK_URL=https://github.com/dokku/buildpack-nginx 2 | -------------------------------------------------------------------------------- /docs/assets/docker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/docker.png -------------------------------------------------------------------------------- /docs/assets/extend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/extend.png -------------------------------------------------------------------------------- /plugins/common/vendor/github.com/codegangsta/inject/.gitignore: -------------------------------------------------------------------------------- 1 | inject 2 | inject.test 3 | -------------------------------------------------------------------------------- /plugins/network/vendor/github.com/codegangsta/inject/.gitignore: -------------------------------------------------------------------------------- 1 | inject 2 | inject.test 3 | -------------------------------------------------------------------------------- /tests/apps/java/Procfile: -------------------------------------------------------------------------------- 1 | web: java -cp target/classes:target/dependency/* HelloWorld 2 | -------------------------------------------------------------------------------- /tests/apps/ruby/.env: -------------------------------------------------------------------------------- 1 | export BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-ruby#v129 -------------------------------------------------------------------------------- /docs/assets/slack-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/slack-logo.png -------------------------------------------------------------------------------- /docs/assets/team/flink.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/team/flink.jpg -------------------------------------------------------------------------------- /plugins/common/glide.yaml: -------------------------------------------------------------------------------- 1 | package: . 2 | import: 3 | - package: github.com/codeskyblue/go-sh 4 | -------------------------------------------------------------------------------- /plugins/config/vendor/github.com/joho/godotenv/fixtures/invalid1.env: -------------------------------------------------------------------------------- 1 | INVALID LINE 2 | foo=bar 3 | -------------------------------------------------------------------------------- /tests/apps/go/check_deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e; test "$(curl -s -S "$1")" == "go" 3 | -------------------------------------------------------------------------------- /tests/apps/php/Procfile: -------------------------------------------------------------------------------- 1 | web: vendor/heroku/heroku-buildpack-php/bin/heroku-php-apache2 web/ 2 | -------------------------------------------------------------------------------- /.codacy.yml: -------------------------------------------------------------------------------- 1 | exclude_paths: 2 | - vendor/**/* 3 | - tests/**/* 4 | - "**_test.go" 5 | - contrib/* 6 | -------------------------------------------------------------------------------- /docs/assets/gplaypattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/gplaypattern.png -------------------------------------------------------------------------------- /docs/assets/team/u2mejc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/team/u2mejc.jpg -------------------------------------------------------------------------------- /plugins/config/vendor/github.com/ryanuber/columnize/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - tip 4 | -------------------------------------------------------------------------------- /plugins/network/src/glide.yaml: -------------------------------------------------------------------------------- 1 | package: . 2 | import: 3 | - package: github.com/ryanuber/columnize 4 | -------------------------------------------------------------------------------- /plugins/network/vendor/github.com/ryanuber/columnize/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - tip 4 | -------------------------------------------------------------------------------- /plugins/repo/src/glide.yaml: -------------------------------------------------------------------------------- 1 | package: . 2 | import: 3 | - package: github.com/ryanuber/columnize 4 | -------------------------------------------------------------------------------- /plugins/repo/src/vendor/github.com/ryanuber/columnize/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - tip 4 | -------------------------------------------------------------------------------- /docs/assets/team/progrium.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/team/progrium.jpg -------------------------------------------------------------------------------- /plugins/network/src/vendor/github.com/ryanuber/columnize/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - tip 4 | -------------------------------------------------------------------------------- /tests/apps/scala/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "0.7.4") 2 | -------------------------------------------------------------------------------- /tests/unit/osx_ssl_tarred.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/tests/unit/osx_ssl_tarred.tar -------------------------------------------------------------------------------- /docs/assets/favicons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/favicons/favicon.ico -------------------------------------------------------------------------------- /docs/assets/team/flink-hidden.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/team/flink-hidden.jpg -------------------------------------------------------------------------------- /docs/assets/team/josegonzalez.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/team/josegonzalez.jpg -------------------------------------------------------------------------------- /docs/assets/team/morrisjobke.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/team/morrisjobke.jpg -------------------------------------------------------------------------------- /tests/apps/go-fail-postdeploy/check_deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e; test "$(curl -s -S "$1")" == "go" 3 | -------------------------------------------------------------------------------- /tests/apps/go-fail-predeploy/check_deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e; test "$(curl -s -S "$1")" == "go" 3 | -------------------------------------------------------------------------------- /docs/assets/team/michaelshobbs.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/team/michaelshobbs.jpg -------------------------------------------------------------------------------- /docs/assets/team/progrium-hidden.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/team/progrium-hidden.jpg -------------------------------------------------------------------------------- /docs/assets/team/u2mejc-hidden.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/team/u2mejc-hidden.jpg -------------------------------------------------------------------------------- /plugins/config/vendor/github.com/joho/godotenv/fixtures/exported.env: -------------------------------------------------------------------------------- 1 | export OPTION_A=2 2 | export OPTION_B='\n' 3 | -------------------------------------------------------------------------------- /tests/apps/python-flask/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask==0.9 2 | Jinja2==2.6 3 | Werkzeug==0.8.3 4 | gunicorn==0.17.2 5 | 6 | -------------------------------------------------------------------------------- /docs/assets/favicons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/favicons/favicon-16x16.png -------------------------------------------------------------------------------- /docs/assets/favicons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/favicons/favicon-32x32.png -------------------------------------------------------------------------------- /docs/assets/favicons/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/favicons/favicon-96x96.png -------------------------------------------------------------------------------- /docs/assets/favicons/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/favicons/mstile-70x70.png -------------------------------------------------------------------------------- /plugins/git/plugin.toml: -------------------------------------------------------------------------------- 1 | [plugin] 2 | description = "dokku core git plugin" 3 | version = "0.12.12" 4 | [plugin.config] 5 | -------------------------------------------------------------------------------- /plugins/ps/plugin.toml: -------------------------------------------------------------------------------- 1 | [plugin] 2 | description = "dokku core ps plugin" 3 | version = "0.12.12" 4 | [plugin.config] 5 | -------------------------------------------------------------------------------- /plugins/tar/plugin.toml: -------------------------------------------------------------------------------- 1 | [plugin] 2 | description = "dokku core tar plugin" 3 | version = "0.12.12" 4 | [plugin.config] 5 | -------------------------------------------------------------------------------- /tests/apps/ruby/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | ruby '2.1.5' 3 | 4 | gem 'sinatra', '~>1.4.4' 5 | gem 'thin' 6 | -------------------------------------------------------------------------------- /docs/assets/favicons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/favicons/apple-touch-icon.png -------------------------------------------------------------------------------- /docs/assets/favicons/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/favicons/mstile-144x144.png -------------------------------------------------------------------------------- /docs/assets/favicons/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/favicons/mstile-150x150.png -------------------------------------------------------------------------------- /docs/assets/favicons/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/favicons/mstile-310x150.png -------------------------------------------------------------------------------- /docs/assets/favicons/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/favicons/mstile-310x310.png -------------------------------------------------------------------------------- /docs/assets/team/josegonzalez-hidden.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/team/josegonzalez-hidden.jpg -------------------------------------------------------------------------------- /docs/assets/team/michaelshobbs-hidden.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/team/michaelshobbs-hidden.jpg -------------------------------------------------------------------------------- /docs/assets/team/morrisjobke-hidden.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/team/morrisjobke-hidden.jpg -------------------------------------------------------------------------------- /plugins/apps/plugin.toml: -------------------------------------------------------------------------------- 1 | [plugin] 2 | description = "dokku core apps plugin" 3 | version = "0.12.12" 4 | [plugin.config] 5 | -------------------------------------------------------------------------------- /plugins/checks/plugin.toml: -------------------------------------------------------------------------------- 1 | [plugin] 2 | description = "dokku core checks plugin" 3 | version = "0.12.12" 4 | [plugin.config] 5 | -------------------------------------------------------------------------------- /plugins/common/plugin.toml: -------------------------------------------------------------------------------- 1 | [plugin] 2 | description = "dokku core common plugin" 3 | version = "0.12.12" 4 | [plugin.config] 5 | -------------------------------------------------------------------------------- /plugins/config/plugin.toml: -------------------------------------------------------------------------------- 1 | [plugin] 2 | description = "dokku core config plugin" 3 | version = "0.12.12" 4 | [plugin.config] 5 | -------------------------------------------------------------------------------- /plugins/enter/plugin.toml: -------------------------------------------------------------------------------- 1 | [plugin] 2 | description = "dokku core enter plugin" 3 | version = "0.12.12" 4 | [plugin.config] 5 | -------------------------------------------------------------------------------- /plugins/logs/plugin.toml: -------------------------------------------------------------------------------- 1 | [plugin] 2 | description = "dokku core logs plugin" 3 | version = "0.12.12" 4 | [plugin.config] 5 | -------------------------------------------------------------------------------- /plugins/plugin/plugin.toml: -------------------------------------------------------------------------------- 1 | [plugin] 2 | description = "dokku core plugin plugin" 3 | version = "0.12.12" 4 | [plugin.config] 5 | -------------------------------------------------------------------------------- /plugins/proxy/plugin.toml: -------------------------------------------------------------------------------- 1 | [plugin] 2 | description = "dokku core proxy plugin" 3 | version = "0.12.12" 4 | [plugin.config] 5 | -------------------------------------------------------------------------------- /plugins/repo/plugin.toml: -------------------------------------------------------------------------------- 1 | [plugin] 2 | description = "dokku core repo plugin" 3 | version = "0.12.12" 4 | [plugin.config] 5 | -------------------------------------------------------------------------------- /plugins/shell/plugin.toml: -------------------------------------------------------------------------------- 1 | [plugin] 2 | description = "dokku core shell plugin" 3 | version = "0.12.12" 4 | [plugin.config] 5 | -------------------------------------------------------------------------------- /plugins/tags/plugin.toml: -------------------------------------------------------------------------------- 1 | [plugin] 2 | description = "dokku core tags plugin" 3 | version = "0.12.12" 4 | [plugin.config] 5 | -------------------------------------------------------------------------------- /tests/apps/multi/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | static/components 3 | static/.tmp 4 | .sass-cache 5 | .bundle 6 | .DS_Store 7 | -------------------------------------------------------------------------------- /tests/apps/multi/check_deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e; curl -s -S "$1" | grep -q "Heroku Multi Buildpack on Dokku" 3 | -------------------------------------------------------------------------------- /PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | **Note:** If this PR is just doc changes, please put [ci skip] in the body that way tests do not run. 2 | -------------------------------------------------------------------------------- /plugins/domains/plugin.toml: -------------------------------------------------------------------------------- 1 | [plugin] 2 | description = "dokku core domains plugin" 3 | version = "0.12.12" 4 | [plugin.config] 5 | -------------------------------------------------------------------------------- /plugins/network/plugin.toml: -------------------------------------------------------------------------------- 1 | [plugin] 2 | description = "dokku core network plugin" 3 | version = "0.12.12" 4 | [plugin.config] 5 | -------------------------------------------------------------------------------- /plugins/ssh-keys/plugin.toml: -------------------------------------------------------------------------------- 1 | [plugin] 2 | description = "dokku core ssh-keys plugin" 3 | version = "0.12.12" 4 | [plugin.config] 5 | -------------------------------------------------------------------------------- /plugins/storage/plugin.toml: -------------------------------------------------------------------------------- 1 | [plugin] 2 | description = "dokku core storage plugin" 3 | version = "0.12.12" 4 | [plugin.config] 5 | -------------------------------------------------------------------------------- /docs/assets/favicons/android-chrome-36x36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/favicons/android-chrome-36x36.png -------------------------------------------------------------------------------- /docs/assets/favicons/android-chrome-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/favicons/android-chrome-48x48.png -------------------------------------------------------------------------------- /docs/assets/favicons/android-chrome-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/favicons/android-chrome-72x72.png -------------------------------------------------------------------------------- /docs/assets/favicons/android-chrome-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/favicons/android-chrome-96x96.png -------------------------------------------------------------------------------- /plugins/build-env/plugin.toml: -------------------------------------------------------------------------------- 1 | [plugin] 2 | description = "dokku core build-env plugin" 3 | version = "0.12.12" 4 | [plugin.config] 5 | -------------------------------------------------------------------------------- /tests/apps/dockerfile-noexpose/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:4 2 | 3 | COPY . /app 4 | WORKDIR /app 5 | RUN npm install 6 | 7 | CMD npm start 8 | -------------------------------------------------------------------------------- /docs/assets/favicons/android-chrome-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/favicons/android-chrome-144x144.png -------------------------------------------------------------------------------- /docs/assets/favicons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/favicons/android-chrome-192x192.png -------------------------------------------------------------------------------- /docs/assets/favicons/apple-touch-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/favicons/apple-touch-icon-57x57.png -------------------------------------------------------------------------------- /docs/assets/favicons/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/favicons/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /docs/assets/favicons/apple-touch-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/favicons/apple-touch-icon-72x72.png -------------------------------------------------------------------------------- /docs/assets/favicons/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/favicons/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /plugins/00_dokku-standard/plugin.toml: -------------------------------------------------------------------------------- 1 | [plugin] 2 | description = "dokku core standard plugin" 3 | version = "0.12.12" 4 | [plugin.config] 5 | -------------------------------------------------------------------------------- /plugins/20_events/plugin.toml: -------------------------------------------------------------------------------- 1 | [plugin] 2 | description = "dokku core events logging plugin" 3 | version = "0.12.12" 4 | [plugin.config] 5 | -------------------------------------------------------------------------------- /plugins/certs/plugin.toml: -------------------------------------------------------------------------------- 1 | [plugin] 2 | description = "dokku core certificate management plugin" 3 | version = "0.12.12" 4 | [plugin.config] 5 | -------------------------------------------------------------------------------- /plugins/config/vendor/github.com/joho/godotenv/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.8 5 | 6 | os: 7 | - linux 8 | - osx 9 | -------------------------------------------------------------------------------- /plugins/network/glide.yaml: -------------------------------------------------------------------------------- 1 | package: . 2 | import: 3 | - package: github.com/codeskyblue/go-sh 4 | - package: github.com/ryanuber/columnize 5 | -------------------------------------------------------------------------------- /plugins/nginx-vhosts/plugin.toml: -------------------------------------------------------------------------------- 1 | [plugin] 2 | description = "dokku core nginx-vhosts plugin" 3 | version = "0.12.12" 4 | [plugin.config] 5 | -------------------------------------------------------------------------------- /tests/apps/gitsubmodules/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | git submodule add https://github.com/heroku/node-js-sample.git node-js-sample 3 | -------------------------------------------------------------------------------- /tests/apps/multi/Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | ruby '2.2.4' 4 | 5 | gem 'compass', ">= 1.0.1" 6 | gem 'sass-globbing' 7 | -------------------------------------------------------------------------------- /tests/apps/ruby/check_deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e; output="$(curl -s -S "$1")"; echo "$output"; test "$output" == "Hello, world" 3 | -------------------------------------------------------------------------------- /common.mk: -------------------------------------------------------------------------------- 1 | GO_REPO_ROOT := /go/src/github.com/dokku/dokku 2 | BUILD_IMAGE := golang:1.9.1 3 | 4 | .PHONY: build-in-docker build clean src-clean 5 | -------------------------------------------------------------------------------- /docs/assets/favicons/apple-touch-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/favicons/apple-touch-icon-114x114.png -------------------------------------------------------------------------------- /docs/assets/favicons/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/favicons/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /docs/assets/favicons/apple-touch-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/favicons/apple-touch-icon-144x144.png -------------------------------------------------------------------------------- /docs/assets/favicons/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/favicons/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /docs/assets/favicons/apple-touch-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/favicons/apple-touch-icon-180x180.png -------------------------------------------------------------------------------- /plugins/config/vendor/github.com/joho/godotenv/fixtures/equals.env: -------------------------------------------------------------------------------- 1 | export OPTION_A='postgres://localhost:5432/database?sslmode=disable' 2 | 3 | -------------------------------------------------------------------------------- /plugins/docker-options/plugin.toml: -------------------------------------------------------------------------------- 1 | [plugin] 2 | description = "dokku core docker-options plugin" 3 | version = "0.12.12" 4 | [plugin.config] 5 | -------------------------------------------------------------------------------- /plugins/network/.gitignore: -------------------------------------------------------------------------------- 1 | /commands 2 | /subcommands/* 3 | /triggers/* 4 | /network-* 5 | /install 6 | /post-create 7 | /post-delete 8 | /report -------------------------------------------------------------------------------- /tests/apps/java/check_deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e; output="$(curl -s -S "$1")"; echo "$output"; test "$output" == "Hello from Java!" 3 | -------------------------------------------------------------------------------- /tests/apps/scala/check_deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e; output="$(curl -s -S "$1")"; echo "$output"; test "$output" == "Hello from Scala!" 3 | -------------------------------------------------------------------------------- /docs/assets/favicons/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DV/dokku/master/docs/assets/favicons/apple-touch-icon-precomposed.png -------------------------------------------------------------------------------- /tests/apps/dockerfile/CHECKS: -------------------------------------------------------------------------------- 1 | WAIT=2 # wait 2 seconds 2 | TIMEOUT=5 # set timeout to 5 seconds 3 | ATTEMPTS=2 # try 2 times 4 | 5 | / Hello World! 6 | -------------------------------------------------------------------------------- /tests/apps/gitsubmodules/check_deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e; output="$(curl -s -S "$1")"; echo "$output"; test "$output" == "Hello World!" 3 | -------------------------------------------------------------------------------- /tests/apps/nodejs-express/CHECKS: -------------------------------------------------------------------------------- 1 | WAIT=2 # wait 2 seconds 2 | TIMEOUT=5 # set timeout to 5 seconds 3 | ATTEMPTS=2 # try 2 times 4 | 5 | / nodejs/express -------------------------------------------------------------------------------- /SPONSORS.md: -------------------------------------------------------------------------------- 1 | #Sponsors 2 | 3 | [Deis](http://deis.io) 4 | 5 | [DigitalOcean](https://www.digitalocean.com/) 6 | 7 | [Melvin Lammerts](http://dokku.net) 8 | -------------------------------------------------------------------------------- /tests/apps/clojure/check_deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e; sleep 5; output="$(curl -s -S "$1")"; echo "$output"; test "$output" == "Hello World!" 3 | -------------------------------------------------------------------------------- /tests/apps/dockerfile-noexpose/check_deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e; output="$(curl -s -S "$1")"; echo "$output"; test "$output" == "Hello World!" 3 | -------------------------------------------------------------------------------- /tests/apps/nodejs-express/check_deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e; output="$(curl -s -S "$1")"; echo "$output"; test "$output" == "nodejs/express" 3 | -------------------------------------------------------------------------------- /tests/apps/nodejs-worker/check_deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e; output="$(pgrep -f "node worker.js" | wc -l)"; echo "$output"; test "$output" == "1" 3 | -------------------------------------------------------------------------------- /tests/apps/nodejs-worker/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node-example", 3 | "version": "0.0.1", 4 | "engines": { 5 | "node": "4.2.x" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /tests/apps/php/check_deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e; output="$(curl -s -S "$1")"; echo "$output"; test "$output" == "

php

" 3 | -------------------------------------------------------------------------------- /plugins/scheduler-docker-local/plugin.toml: -------------------------------------------------------------------------------- 1 | [plugin] 2 | description = "dokku core scheduler-docker-local plugin" 3 | version = "0.12.12" 4 | [plugin.config] 5 | -------------------------------------------------------------------------------- /tests/apps/dockerfile-noexpose/CHECKS: -------------------------------------------------------------------------------- 1 | WAIT=2 # wait 2 seconds 2 | TIMEOUT=5 # set timeout to 5 seconds 3 | ATTEMPTS=2 # try 2 times 4 | 5 | / Hello World! 6 | -------------------------------------------------------------------------------- /tests/apps/dockerfile-procfile/CHECKS: -------------------------------------------------------------------------------- 1 | WAIT=2 # wait 2 seconds 2 | TIMEOUT=5 # set timeout to 5 seconds 3 | ATTEMPTS=2 # try 2 times 4 | 5 | / nodejs/express 6 | -------------------------------------------------------------------------------- /tests/apps/dockerfile-procfile/check_deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e; output="$(curl -s -S "$1")"; echo "$output"; test "$output" == "nodejs/express" 3 | -------------------------------------------------------------------------------- /plugins/common/vendor/github.com/codegangsta/inject/update_readme.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | go get github.com/robertkrimen/godocdown/godocdown 3 | godocdown > README.md 4 | -------------------------------------------------------------------------------- /plugins/network/vendor/github.com/codegangsta/inject/update_readme.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | go get github.com/robertkrimen/godocdown/godocdown 3 | godocdown > README.md 4 | -------------------------------------------------------------------------------- /tests/apps/nodejs-express-noprocfile/check_deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e; output="$(curl -s -S "$1")"; echo "$output"; test "$output" == "nodejs/express" 3 | -------------------------------------------------------------------------------- /tests/apps/nodejs-express/worker.js: -------------------------------------------------------------------------------- 1 | function worker() { 2 | console.log('sleeping for 60 seconds'); 3 | setTimeout(worker, 60 * 1000); 4 | } 5 | 6 | worker(); 7 | -------------------------------------------------------------------------------- /tests/apps/nodejs-worker/worker.js: -------------------------------------------------------------------------------- 1 | function worker() { 2 | console.log('sleeping for 60 seconds'); 3 | setTimeout(worker, 60 * 1000); 4 | } 5 | 6 | worker(); 7 | -------------------------------------------------------------------------------- /tests/apps/static/check_deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e; output="$(curl -s -S "$1")"; echo "$output"; test "$output" == "

Static Page

" 3 | -------------------------------------------------------------------------------- /plugins/config/vendor/github.com/joho/godotenv/fixtures/plain.env: -------------------------------------------------------------------------------- 1 | OPTION_A=1 2 | OPTION_B=2 3 | OPTION_C= 3 4 | OPTION_D =4 5 | OPTION_E = 5 6 | OPTION_F = 7 | OPTION_G= -------------------------------------------------------------------------------- /tests/apps/dockerfile-procfile/worker.js: -------------------------------------------------------------------------------- 1 | function worker() { 2 | console.log('sleeping for 60 seconds'); 3 | setTimeout(worker, 60 * 1000); 4 | } 5 | 6 | worker(); 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.deb 2 | *.rpm 3 | .DS_Store 4 | .ruby-version 5 | .idea/ 6 | .vagrant 7 | data/ 8 | stack.tgz 9 | tmp 10 | coverage.out 11 | contrib/dokku-update-version -------------------------------------------------------------------------------- /plugins/git/receive-app: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_AVAILABLE_PATH/git/functions" 4 | 5 | git_receive_app "$@" 6 | -------------------------------------------------------------------------------- /plugins/tar/receive-app: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_AVAILABLE_PATH/tar/functions" 4 | 5 | tar_receive_app "$@" 6 | -------------------------------------------------------------------------------- /plugins/tar/subcommands/in: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_AVAILABLE_PATH/tar/functions" 4 | 5 | tar_in_cmd "$@" 6 | -------------------------------------------------------------------------------- /plugins/tar/subcommands/from: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_AVAILABLE_PATH/tar/functions" 4 | 5 | tar_from_cmd "$@" 6 | -------------------------------------------------------------------------------- /plugins/git/report: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | source "$PLUGIN_AVAILABLE_PATH/git/internal-functions" 3 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 4 | 5 | cmd-git-report-single "$@" 6 | -------------------------------------------------------------------------------- /plugins/ps/report: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | source "$PLUGIN_AVAILABLE_PATH/ps/internal-functions" 3 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 4 | 5 | cmd-ps-report-single "$@" 6 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | *Dockerfile 2 | .dockerignore 3 | .git 4 | .vagrant 5 | contrib 6 | docs 7 | tests 8 | !contrib/dokku-installer.py 9 | !contrib/dokku-update 10 | !contrib/bash-completion -------------------------------------------------------------------------------- /plugins/apps/report: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | source "$PLUGIN_AVAILABLE_PATH/apps/internal-functions" 3 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 4 | 5 | cmd-apps-report-single "$@" 6 | -------------------------------------------------------------------------------- /plugins/apps/subcommands/list: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_AVAILABLE_PATH/apps/internal-functions" 4 | 5 | apps_list_cmd "$@" 6 | -------------------------------------------------------------------------------- /plugins/git/subcommands/report: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | source "$PLUGIN_AVAILABLE_PATH/git/internal-functions" 3 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 4 | 5 | cmd-git-report "$@" 6 | -------------------------------------------------------------------------------- /plugins/ps/subcommands/report: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | source "$PLUGIN_AVAILABLE_PATH/ps/internal-functions" 3 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 4 | 5 | cmd-ps-report "$@" 6 | -------------------------------------------------------------------------------- /tests/apps/multi/.buildpacks: -------------------------------------------------------------------------------- 1 | https://github.com/heroku/heroku-buildpack-ruby 2 | https://github.com/heroku/heroku-buildpack-nodejs 3 | https://github.com/heroku/heroku-buildpack-python.git 4 | -------------------------------------------------------------------------------- /tests/apps/scala/project/build.properties: -------------------------------------------------------------------------------- 1 | #Activator-generated Properties 2 | #Wed Aug 13 09:36:12 CDT 2014 3 | template.uuid=a855816c-0367-44ba-9adb-6a903f6ad599 4 | sbt.version=0.13.5 5 | -------------------------------------------------------------------------------- /plugins/apps/subcommands/report: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | source "$PLUGIN_AVAILABLE_PATH/apps/internal-functions" 3 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 4 | 5 | cmd-apps-report "$@" 6 | -------------------------------------------------------------------------------- /plugins/certs/report: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | source "$PLUGIN_AVAILABLE_PATH/certs/internal-functions" 3 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 4 | 5 | cmd-certs-report-single "$@" 6 | -------------------------------------------------------------------------------- /plugins/checks/report: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | source "$PLUGIN_AVAILABLE_PATH/checks/internal-functions" 3 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 4 | 5 | cmd-checks-report-single "$@" 6 | -------------------------------------------------------------------------------- /plugins/git/subcommands/default: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_AVAILABLE_PATH/git/internal-functions" 4 | 5 | cmd-git-help "git:help" 6 | -------------------------------------------------------------------------------- /plugins/nginx-vhosts/post-delete: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/functions" 4 | 5 | restart_nginx "$@" 6 | -------------------------------------------------------------------------------- /plugins/plugin/subcommands/list: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_AVAILABLE_PATH/plugin/internal-functions" 4 | 5 | plugin_list_cmd "$@" 6 | -------------------------------------------------------------------------------- /plugins/proxy/report: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | source "$PLUGIN_AVAILABLE_PATH/proxy/internal-functions" 3 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 4 | 5 | cmd-proxy-report-single "$@" 6 | -------------------------------------------------------------------------------- /plugins/storage/install: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | 4 | mkdir -p /var/lib/dokku/data/storage 5 | chown dokku:dokku /var/lib/dokku/data/storage 6 | -------------------------------------------------------------------------------- /plugins/tar/subcommands/default: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_AVAILABLE_PATH/tar/internal-functions" 4 | 5 | tar_help_cmd "tar:help" 6 | -------------------------------------------------------------------------------- /plugins/certs/subcommands/report: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | source "$PLUGIN_AVAILABLE_PATH/certs/internal-functions" 3 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 4 | 5 | cmd-certs-report "$@" 6 | -------------------------------------------------------------------------------- /plugins/checks/subcommands/report: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | source "$PLUGIN_AVAILABLE_PATH/checks/internal-functions" 3 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 4 | 5 | cmd-checks-report "$@" 6 | -------------------------------------------------------------------------------- /plugins/config/vendor/github.com/joho/godotenv/fixtures/quoted.env: -------------------------------------------------------------------------------- 1 | OPTION_A='1' 2 | OPTION_B='2' 3 | OPTION_C='' 4 | OPTION_D='\n' 5 | OPTION_E="1" 6 | OPTION_F="2" 7 | OPTION_G="" 8 | OPTION_H="\n" 9 | -------------------------------------------------------------------------------- /plugins/domains/report: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | source "$PLUGIN_AVAILABLE_PATH/domains/internal-functions" 3 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 4 | 5 | cmd-domains-report-single "$@" 6 | -------------------------------------------------------------------------------- /plugins/proxy/subcommands/report: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | source "$PLUGIN_AVAILABLE_PATH/proxy/internal-functions" 3 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 4 | 5 | cmd-proxy-report "$@" 6 | -------------------------------------------------------------------------------- /plugins/storage/report: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | source "$PLUGIN_AVAILABLE_PATH/storage/internal-functions" 3 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 4 | 5 | cmd-storage-report-single "$@" 6 | -------------------------------------------------------------------------------- /plugins/storage/subcommands/list: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_AVAILABLE_PATH/storage/internal-functions" 4 | 5 | storage_list_cmd "$@" 6 | -------------------------------------------------------------------------------- /plugins/common/vendor/github.com/codeskyblue/go-sh/example/less/less.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "github.com/codeskyblue/go-sh" 4 | 5 | func main() { 6 | sh.Command("less", "less.go").Run() 7 | } 8 | -------------------------------------------------------------------------------- /plugins/domains/subcommands/report: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | source "$PLUGIN_AVAILABLE_PATH/domains/internal-functions" 3 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 4 | 5 | cmd-domains-report "$@" 6 | -------------------------------------------------------------------------------- /plugins/network/vendor/github.com/codeskyblue/go-sh/example/less/less.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "github.com/codeskyblue/go-sh" 4 | 5 | func main() { 6 | sh.Command("less", "less.go").Run() 7 | } 8 | -------------------------------------------------------------------------------- /plugins/storage/subcommands/report: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | source "$PLUGIN_AVAILABLE_PATH/storage/internal-functions" 3 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 4 | 5 | cmd-storage-report "$@" 6 | -------------------------------------------------------------------------------- /.stickler.yml: -------------------------------------------------------------------------------- 1 | linters: 2 | shellcheck: 3 | shell: bash 4 | exclude: SC2034,SC1090,SC2191 5 | golint: 6 | 7 | files: 8 | ignore: 9 | - './debian/*' 10 | - '*/vendor/*' 11 | -------------------------------------------------------------------------------- /tests/apps/dockerfile-procfile/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:4 2 | 3 | EXPOSE 3001/udp 4 | EXPOSE 3000/tcp 5 | EXPOSE 3003 6 | 7 | COPY . /app 8 | WORKDIR /app 9 | RUN npm install 10 | 11 | CMD npm start 12 | -------------------------------------------------------------------------------- /plugins/ssh-keys/subcommands/default: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_AVAILABLE_PATH/ssh-keys/internal-functions" 4 | 5 | ssh_keys_help_cmd "ssh-keys:help" 6 | -------------------------------------------------------------------------------- /plugins/storage/subcommands/default: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_AVAILABLE_PATH/storage/internal-functions" 4 | 5 | storage_help_cmd "storage:help" 6 | -------------------------------------------------------------------------------- /tests/apps/go-fail-postdeploy/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.9.1 2 | 3 | EXPOSE 3000/tcp 4 | 5 | ADD . /go/src/github.com/dokku/apps/web 6 | WORKDIR /go/src/github.com/dokku/apps/web 7 | 8 | RUN go install -v ./... 9 | -------------------------------------------------------------------------------- /tests/apps/go-fail-predeploy/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.9.1 2 | 3 | EXPOSE 3000/tcp 4 | 5 | ADD . /go/src/github.com/dokku/apps/web 6 | WORKDIR /go/src/github.com/dokku/apps/web 7 | 8 | RUN go install -v ./... 9 | -------------------------------------------------------------------------------- /plugins/00_dokku-standard/subcommands/deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | 5 | shift 1 6 | dokku_deploy_cmd "$@" 7 | -------------------------------------------------------------------------------- /plugins/docker-options/report: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | source "$PLUGIN_AVAILABLE_PATH/docker-options/internal-functions" 3 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 4 | 5 | cmd-docker-options-report-single "$@" 6 | -------------------------------------------------------------------------------- /tests/apps/config/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node-example", 3 | "version": "0.0.1", 4 | "dependencies": { 5 | "express": "2.5.x" 6 | }, 7 | "engines": { 8 | "node": "4.2.x" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tests/apps/dockerfile/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:4 2 | 3 | EXPOSE 3001/udp 4 | EXPOSE 3000/tcp 5 | EXPOSE 3003 6 | 7 | COPY . /var/www/html 8 | WORKDIR /var/www/html 9 | RUN npm install 10 | 11 | CMD npm start 12 | -------------------------------------------------------------------------------- /plugins/docker-options/subcommands/report: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | source "$PLUGIN_AVAILABLE_PATH/docker-options/internal-functions" 3 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 4 | 5 | cmd-docker-options-report "$@" 6 | -------------------------------------------------------------------------------- /plugins/nginx-vhosts/subcommands/default: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/internal-functions" 4 | 5 | nginx_vhosts_help_cmd "nginx:help" 6 | -------------------------------------------------------------------------------- /tests/apps/gitsubmodules/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node-example", 3 | "version": "0.0.1", 4 | "dependencies": { 5 | "express": "~3.3.4" 6 | }, 7 | "engines": { 8 | "node": "4.2.x" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tests/apps/nodejs-express/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node-example", 3 | "version": "0.0.1", 4 | "dependencies": { 5 | "express": "2.5.x" 6 | }, 7 | "engines": { 8 | "node": "4.2.x" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tests/apps/clojure/README.md: -------------------------------------------------------------------------------- 1 | Hello Clojure/Compojure 2 | ======================= 3 | 4 | A minimal Hello World web app in [Clojure](http://clojure.org/), using the [Compojure](https://github.com/weavejester/compojure) web framework. 5 | -------------------------------------------------------------------------------- /tests/apps/dockerfile/post-deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -ex; 3 | 4 | REMOTE=$1 5 | REPO=$2 6 | 7 | GREETING=$(printf "Hello 8 | 'world' " | base64) 9 | ssh "$REMOTE" config:set --encoded "$REPO" HELLO="$GREETING" 10 | -------------------------------------------------------------------------------- /tests/apps/python-flask/post-deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -ex; 3 | 4 | REMOTE=$1 5 | REPO=$2 6 | 7 | GREETING=$(printf "Hello 8 | 'world' " | base64) 9 | ssh "$REMOTE" config:set --encoded "$REPO" HELLO="$GREETING" 10 | -------------------------------------------------------------------------------- /tests/apps/.websocket.disabled/views/index.handlebars: -------------------------------------------------------------------------------- 1 |

I'm a static HTTP message

2 |

3 | No messages 4 |

5 |

If you get many GET messages in your console it isn't websocket but socket.io fallback mode

-------------------------------------------------------------------------------- /plugins/20_events/hook: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | 5 | [[ ! "$DOKKU_EVENTS" ]] || dokku_log_plugn_trigger_call "$(basename "$0")" "$@" 6 | -------------------------------------------------------------------------------- /plugins/scheduler-docker-local/report: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | source "$PLUGIN_AVAILABLE_PATH/scheduler-docker-local/internal-functions" 3 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 4 | 5 | cmd-scheduler-docker-local-report-single "$@" 6 | -------------------------------------------------------------------------------- /tests/apps/.websocket.disabled/check_deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e; output="$(curl -s -S -i -N -H \"Connection: Upgrade\" -H \"Upgrade: websocket\" -H \"Host: $1\" -H \"Origin: $1\" $1 -m 2)"; echo $output; test "$output" == "bazingaa" 3 | -------------------------------------------------------------------------------- /plugins/apps/subcommands/default: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_AVAILABLE_PATH/apps/internal-functions" 4 | 5 | dokku_log_warn "Deprecated: Please use apps:list" 6 | apps_list_cmd "$@" 7 | -------------------------------------------------------------------------------- /plugins/certs/subcommands/info: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_AVAILABLE_PATH/certs/internal-functions" 4 | 5 | dokku_log_warn "Deprecated: Please use certs:report" 6 | certs_info_cmd "$@" 7 | -------------------------------------------------------------------------------- /plugins/scheduler-docker-local/subcommands/report: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | source "$PLUGIN_AVAILABLE_PATH/scheduler-docker-local/internal-functions" 3 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 4 | 5 | cmd-scheduler-docker-local-report "$@" 6 | -------------------------------------------------------------------------------- /plugins/ssh-keys/subcommands/list: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/ssh-keys/functions" 5 | 6 | list_ssh_keys "$@" 7 | -------------------------------------------------------------------------------- /plugins/certs/subcommands/default: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_AVAILABLE_PATH/certs/internal-functions" 4 | 5 | dokku_log_warn "Deprecated: Please use certs:report" 6 | certs_info_cmd "$@" 7 | -------------------------------------------------------------------------------- /tests/apps/multi/static/styles/main.scss: -------------------------------------------------------------------------------- 1 | // override scss variables within bootsrap by declaring them 2 | // before importing bootstrap 3 | 4 | $brand-primary: #428bca !default; 5 | 6 | @import "bootstrap-sass/vendor/assets/stylesheets/bootstrap"; 7 | -------------------------------------------------------------------------------- /docs/assets/versions.json: -------------------------------------------------------------------------------- 1 | { 2 | "max-versions": [ 3 | "0.3.26", 4 | "0.4.14", 5 | "0.5.8", 6 | "0.6.5", 7 | "0.7.2", 8 | "0.8.2", 9 | "0.9.4", 10 | "0.10.5", 11 | "0.11.6", 12 | "0.12.12" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /plugins/scheduler-docker-local/subcommands/default: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_AVAILABLE_PATH/scheduler-docker-local/internal-functions" 4 | 5 | cmd-scheduler-docker-local-help "scheduler-docker-local:help" 6 | -------------------------------------------------------------------------------- /plugins/config/glide.yaml: -------------------------------------------------------------------------------- 1 | package: github.com/dokku/dokku/plugins/config 2 | ignore: 3 | - github.com/dokku/dokku/plugins/common 4 | - github.com/onsi/gomega 5 | import: 6 | - package: github.com/ryanuber/columnize 7 | - package: github.com/joho/godotenv 8 | version: ^1.2.0 9 | -------------------------------------------------------------------------------- /plugins/repo/src/glide.lock: -------------------------------------------------------------------------------- 1 | hash: 1ddab5de41d1514c2722bd7e24758ad4b60bf6956eb5b9b925fa071a1427f149 2 | updated: 2017-01-03T17:16:50.97156327-08:00 3 | imports: 4 | - name: github.com/ryanuber/columnize 5 | version: 0fbbb3f0e3fbdc5bae7c6cd5f6c1887ebfb76360 6 | testImports: [] 7 | -------------------------------------------------------------------------------- /plugins/network/src/glide.lock: -------------------------------------------------------------------------------- 1 | hash: 1ddab5de41d1514c2722bd7e24758ad4b60bf6956eb5b9b925fa071a1427f149 2 | updated: 2017-01-03T17:16:50.97156327-08:00 3 | imports: 4 | - name: github.com/ryanuber/columnize 5 | version: 0fbbb3f0e3fbdc5bae7c6cd5f6c1887ebfb76360 6 | testImports: [] 7 | -------------------------------------------------------------------------------- /tests/apps/checks-root/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node-example", 3 | "version": "0.0.1", 4 | "dependencies": { 5 | "express": "4.x" 6 | }, 7 | "engines": { 8 | "node": "4.2.x" 9 | }, 10 | "scripts": { 11 | "start": "node index.js" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/apps/config/post-deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -ex; 3 | 4 | REMOTE=$1 5 | REPO=$2 6 | 7 | GREETING=$(printf "Hello 8 | 'world'" | base64) 9 | ssh "$REMOTE" config:set "$REPO" CONFTEST=config-test 10 | ssh "$REMOTE" config:set --encoded "$REPO" HELLO="$GREETING" 11 | -------------------------------------------------------------------------------- /tests/apps/dockerfile-procfile/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node-example", 3 | "version": "0.0.1", 4 | "dependencies": { 5 | "express": "2.5.x" 6 | }, 7 | "engines": { 8 | "node": "4.2.x" 9 | }, 10 | "scripts": { 11 | "start": "false" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /plugins/network/network_test.go: -------------------------------------------------------------------------------- 1 | package network 2 | 3 | import ( 4 | "testing" 5 | 6 | . "github.com/onsi/gomega" 7 | ) 8 | 9 | func TestNetworkGetDefaultValue(t *testing.T) { 10 | RegisterTestingT(t) 11 | Expect(GetDefaultValue("bind-all-interfaces")).To(Equal("false")) 12 | } 13 | -------------------------------------------------------------------------------- /tests/apps/nodejs-express-noprocfile/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node-example", 3 | "version": "0.0.1", 4 | "dependencies": { 5 | "express": "2.5.x" 6 | }, 7 | "engines": { 8 | "node": "4.2.x" 9 | }, 10 | "scripts": { 11 | "start": "node web.js" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /plugins/domains/install: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_AVAILABLE_PATH/domains/functions" 4 | shopt -s nullglob 5 | 6 | for app in $DOKKU_ROOT/*/CONTAINER; do 7 | APP=$(basename "$(dirname "$app")"); 8 | domains_setup "$APP" 9 | done 10 | -------------------------------------------------------------------------------- /plugins/plugin/subcommands/default: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/plugin/internal-functions" 5 | 6 | dokku_log_warn "Deprecated: Please use plugin:list" 7 | plugin_list_cmd "$@" 8 | -------------------------------------------------------------------------------- /tests/apps/checks-root/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var app = express(); 3 | 4 | app.get('/', function(req, res) { 5 | res.sendStatus(404); 6 | }); 7 | 8 | var port = process.env.PORT || 5000; 9 | app.listen(port, function() { 10 | console.log('Listening on port ' + port); 11 | }); 12 | -------------------------------------------------------------------------------- /plugins/network/src/subcommands/rebuild/rebuild.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | 6 | "github.com/dokku/dokku/plugins/network" 7 | ) 8 | 9 | // rebuilds network settings for an app 10 | func main() { 11 | flag.Parse() 12 | appName := flag.Arg(1) 13 | 14 | network.BuildConfig(appName) 15 | } 16 | -------------------------------------------------------------------------------- /tests/apps/clojure/project.clj: -------------------------------------------------------------------------------- 1 | (defproject clojure-sample "1.0.1" 2 | :description "Hello World Clojure Web App" 3 | :dependencies [[org.clojure/clojure "1.6.0"] 4 | [compojure "1.3.1"] 5 | [ring/ring-jetty-adapter "1.3.2"]] 6 | :main ^:skip-aot sample.app 7 | :min-lein-version "2.0.0") 8 | -------------------------------------------------------------------------------- /tests/apps/dockerfile-procfile/Procfile: -------------------------------------------------------------------------------- 1 | ############################### 2 | # DEVELOPMENT # 3 | ############################### 4 | 5 | # Procfile for development using the new threaded worker (scheduler, twitter stream and delayed job) 6 | cron: node worker.js 7 | web: node web.js 8 | worker: node worker.js 9 | -------------------------------------------------------------------------------- /plugins/apps/subcommands/create: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_AVAILABLE_PATH/apps/functions" 4 | 5 | apps_create_cmd() { 6 | declare desc="creates app via command line" 7 | local cmd="apps:create" 8 | apps_create "$2" 9 | } 10 | 11 | apps_create_cmd "$@" 12 | -------------------------------------------------------------------------------- /tests/apps/multi/README.md: -------------------------------------------------------------------------------- 1 | This is a sample application to test heroku buildpack multi for integrating with herokuish: https://github.com/gliderlabs/herokuish 2 | 3 | I am choosing to use the python, nodejs, and ruby buildpacks to create a very simple flask app that performs a bower install and a simple grunt task using compass. 4 | -------------------------------------------------------------------------------- /plugins/network/src/triggers/report/report.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | 6 | "github.com/dokku/dokku/plugins/network" 7 | ) 8 | 9 | // displays a network report for one or more apps 10 | func main() { 11 | flag.Parse() 12 | appName := flag.Arg(0) 13 | 14 | network.ReportSingleApp(appName, "") 15 | } 16 | -------------------------------------------------------------------------------- /plugins/network/src/triggers/network-build-config/network-build-config.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | 6 | "github.com/dokku/dokku/plugins/network" 7 | ) 8 | 9 | // rebuilds network settings for an app 10 | func main() { 11 | flag.Parse() 12 | appName := flag.Arg(0) 13 | 14 | network.BuildConfig(appName) 15 | } 16 | -------------------------------------------------------------------------------- /tests/apps/php/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "a test php app for dokku", 3 | "name": "test-php-app/0.1", 4 | "require": { 5 | "monolog/monolog": "~1.7", 6 | "php": ">=5.5.9", 7 | "silex/silex": "~1.1" 8 | }, 9 | "require-dev": { 10 | "heroku/heroku-buildpack-php": "*" 11 | }, 12 | "license": "MIT" 13 | } 14 | -------------------------------------------------------------------------------- /plugins/network/src/triggers/post-delete/post-delete.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | 6 | "github.com/dokku/dokku/plugins/common" 7 | ) 8 | 9 | // destroys the network property for a given app container 10 | func main() { 11 | flag.Parse() 12 | appName := flag.Arg(0) 13 | 14 | common.PropertyDestroy("network", appName) 15 | } 16 | -------------------------------------------------------------------------------- /plugins/config/glide.lock: -------------------------------------------------------------------------------- 1 | hash: dd48defef474bdf5c6e47281a256ca941d71fe1e637d11443fb49acf3e4b5326 2 | updated: 2017-09-23T16:25:15.559883959-04:00 3 | imports: 4 | - name: github.com/joho/godotenv 5 | version: a79fa1e548e2c689c241d10173efd51e5d689d5b 6 | - name: github.com/ryanuber/columnize 7 | version: abc90934186a77966e2beeac62ed966aac0561d5 8 | testImports: [] 9 | -------------------------------------------------------------------------------- /tests/apps/dockerfile/check_deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e; 3 | 4 | test_url () { 5 | path="$1" 6 | expected_output="$2" 7 | url="${base_url}:3000${path}" 8 | output="$(curl -s -S "$url")" 9 | test "$output" == "$expected_output" 10 | } 11 | 12 | base_url="$1" 13 | test_url / "Hello World!" 14 | test_url /env/HELLO "Hello 15 | 'world' " 16 | -------------------------------------------------------------------------------- /tests/apps/nodejs-express/web.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | 3 | var app = express.createServer(express.logger()); 4 | 5 | app.get('/', function(request, response) { 6 | response.send('nodejs/express'); 7 | }); 8 | 9 | var port = process.env.PORT || 5000; 10 | app.listen(port, function() { 11 | console.log("Listening on " + port); 12 | }); 13 | -------------------------------------------------------------------------------- /tests/apps/scala/build.sbt: -------------------------------------------------------------------------------- 1 | import NativePackagerKeys._ 2 | 3 | packageArchetype.java_application 4 | 5 | name := """scala-getting-started""" 6 | 7 | version := "1.0" 8 | 9 | scalaVersion := "2.10.4" 10 | 11 | libraryDependencies ++= Seq( 12 | "com.twitter" % "finagle-http_2.10" % "6.18.0", 13 | "postgresql" % "postgresql" % "9.0-801.jdbc4" 14 | ) 15 | -------------------------------------------------------------------------------- /plugins/common/glide.lock: -------------------------------------------------------------------------------- 1 | hash: e438ca8cf1bdca3e9c984bb1ee70c0d58be9da52cbe13a079a7c6cbc14210a37 2 | updated: 2017-01-03T17:17:27.973373328-08:00 3 | imports: 4 | - name: github.com/codegangsta/inject 5 | version: 33e0aa1cb7c019ccc3fbe049a8262a6403d30504 6 | - name: github.com/codeskyblue/go-sh 7 | version: ceb46ec4630a726eeed51d0a70066c9e1102c48f 8 | testImports: [] 9 | -------------------------------------------------------------------------------- /plugins/config/vendor/github.com/joho/godotenv/autoload/autoload.go: -------------------------------------------------------------------------------- 1 | package autoload 2 | 3 | /* 4 | You can just read the .env file on import just by doing 5 | 6 | import _ "github.com/joho/godotenv/autoload" 7 | 8 | And bob's your mother's brother 9 | */ 10 | 11 | import "github.com/joho/godotenv" 12 | 13 | func init() { 14 | godotenv.Load() 15 | } 16 | -------------------------------------------------------------------------------- /tests/apps/config/check_deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e; 3 | 4 | test_url () { 5 | path="$1" 6 | expected_output="$2" 7 | url="$base_url$path" 8 | output="$(curl -s -S "$url")" 9 | echo "$output" 10 | test "$output" == "$expected_output" 11 | } 12 | 13 | base_url="$1" 14 | test_url / "config-test" 15 | test_url /hello "Hello 16 | 'world'" 17 | -------------------------------------------------------------------------------- /tests/apps/dockerfile-procfile/web.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | 3 | var app = express.createServer(express.logger()); 4 | 5 | app.get('/', function(request, response) { 6 | response.send('nodejs/express'); 7 | }); 8 | 9 | var port = process.env.PORT || 5000; 10 | app.listen(port, function() { 11 | console.log("Listening on " + port); 12 | }); 13 | -------------------------------------------------------------------------------- /tests/apps/nodejs-express-noprocfile/web.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | 3 | var app = express.createServer(express.logger()); 4 | 5 | app.get('/', function(request, response) { 6 | response.send('nodejs/express'); 7 | }); 8 | 9 | var port = process.env.PORT || 5000; 10 | app.listen(port, function() { 11 | console.log("Listening on " + port); 12 | }); -------------------------------------------------------------------------------- /plugins/00_dokku-standard/subcommands/urls: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | 5 | dokku_urls_cmd() { 6 | [[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on" 7 | local APP="$2" 8 | 9 | get_app_urls "$@" 10 | } 11 | 12 | dokku_urls_cmd "$@" 13 | -------------------------------------------------------------------------------- /plugins/common/vendor/github.com/codeskyblue/go-sh/example/tail/tailf.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "fmt" 6 | 7 | "github.com/codeskyblue/go-sh" 8 | ) 9 | 10 | func main() { 11 | flag.Parse() 12 | if flag.NArg() != 1 { 13 | fmt.Println("Usage: PROGRAM ") 14 | return 15 | } 16 | sh.Command("tail", "-f", flag.Arg(0)).Run() 17 | } 18 | -------------------------------------------------------------------------------- /plugins/network/src/triggers/post-create/post-create.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | 6 | "github.com/dokku/dokku/plugins/common" 7 | ) 8 | 9 | // set bind-all-interfaces to false by default 10 | func main() { 11 | flag.Parse() 12 | appName := flag.Arg(0) 13 | 14 | common.PropertyWrite("network", appName, "bind-all-interfaces", "false") 15 | } 16 | -------------------------------------------------------------------------------- /plugins/network/vendor/github.com/codeskyblue/go-sh/example/tail/tailf.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "fmt" 6 | 7 | "github.com/codeskyblue/go-sh" 8 | ) 9 | 10 | func main() { 11 | flag.Parse() 12 | if flag.NArg() != 1 { 13 | fmt.Println("Usage: PROGRAM ") 14 | return 15 | } 16 | sh.Command("tail", "-f", flag.Arg(0)).Run() 17 | } 18 | -------------------------------------------------------------------------------- /plugins/git/post-delete: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions" 4 | 5 | trigger-git-post-delete() { 6 | declare desc="destroys the git properties for a given app" 7 | declare APP="$1" 8 | fn-plugin-property-destroy "git" "$APP" 9 | } 10 | 11 | trigger-git-post-delete "$@" 12 | -------------------------------------------------------------------------------- /tests/apps/python-flask/check_deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e; 3 | base_url=$1 4 | test_url () { 5 | path="$1" 6 | expected_output="$2" 7 | url="${base_url}${path}" 8 | output="$(curl -s -S "$url")" 9 | echo "$url -> $output" 10 | test "$output" == "$expected_output" 11 | } 12 | 13 | base_url="$1" 14 | test_url / "python/flask" 15 | test_url /HELLO "Hello 16 | 'world' " 17 | -------------------------------------------------------------------------------- /tests/apps/python-flask/hello.py: -------------------------------------------------------------------------------- 1 | import os 2 | from flask import Flask, abort 3 | 4 | app = Flask(__name__) 5 | 6 | @app.route('/') 7 | def hello(): 8 | return 'python/flask' 9 | 10 | 11 | @app.route('/') 12 | def get_enc(env): 13 | val = os.environ.get(env, None) 14 | if val: 15 | return val 16 | else: 17 | abort(404) 18 | -------------------------------------------------------------------------------- /plugins/20_events/subcommands/off: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | 5 | events_off_cmd() { 6 | declare desc="disables dokku events logger" 7 | local cmd="events:off" 8 | echo "Disabling dokku events logger" 9 | rm -f "$DOKKU_ROOT/.dokkurc/DOKKU_EVENTS" 10 | } 11 | 12 | events_off_cmd "$@" 13 | -------------------------------------------------------------------------------- /plugins/scheduler-docker-local/commands: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_AVAILABLE_PATH/scheduler-docker-local/internal-functions" 4 | 5 | case "$1" in 6 | help | scheduler-docker-local:help) 7 | cmd-scheduler-docker-local-help "$@" 8 | ;; 9 | 10 | *) 11 | exit "$DOKKU_NOT_IMPLEMENTED_EXIT" 12 | ;; 13 | 14 | esac 15 | -------------------------------------------------------------------------------- /plugins/tar/commands: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | [[ " help tar:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT" 3 | source "$PLUGIN_AVAILABLE_PATH/tar/internal-functions" 4 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 5 | 6 | case "$1" in 7 | help | tar:help) 8 | tar_help_cmd "$1" 9 | ;; 10 | 11 | *) 12 | exit "$DOKKU_NOT_IMPLEMENTED_EXIT" 13 | ;; 14 | 15 | esac 16 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | insert_final_newline = true 5 | indent_style = space 6 | indent_size = 2 7 | 8 | [Makefile] 9 | insert_final_newline = true 10 | indent_style = tab 11 | indent_size = 4 12 | 13 | [*.mk] 14 | insert_final_newline = true 15 | indent_style = tab 16 | indent_size = 4 17 | 18 | [*.go] 19 | insert_final_newline = true 20 | indent_style = tab 21 | indent_size = 4 22 | -------------------------------------------------------------------------------- /plugins/00_dokku-standard/subcommands/version: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | 5 | dokku_version_cmd() { 6 | declare desc="prints dokku version" 7 | local cmd="version" 8 | cat "$DOKKU_ROOT/VERSION" || dokku_log_fail "Unable to determine dokku's version" 9 | } 10 | 11 | dokku_version_cmd "$@" 12 | -------------------------------------------------------------------------------- /plugins/apps/commands: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | [[ " help apps:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT" 3 | source "$PLUGIN_AVAILABLE_PATH/apps/internal-functions" 4 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 5 | 6 | case "$1" in 7 | help | apps:help) 8 | apps_help_cmd "$@" 9 | ;; 10 | 11 | *) 12 | exit "$DOKKU_NOT_IMPLEMENTED_EXIT" 13 | ;; 14 | 15 | esac 16 | -------------------------------------------------------------------------------- /plugins/logs/commands: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | [[ " help logs:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT" 3 | source "$PLUGIN_AVAILABLE_PATH/logs/internal-functions" 4 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 5 | 6 | case "$1" in 7 | help | logs:help) 8 | cmd-logs-help "$@" 9 | ;; 10 | 11 | *) 12 | exit "$DOKKU_NOT_IMPLEMENTED_EXIT" 13 | ;; 14 | 15 | esac 16 | -------------------------------------------------------------------------------- /plugins/certs/commands: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | [[ " help certs:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT" 3 | source "$PLUGIN_AVAILABLE_PATH/certs/internal-functions" 4 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 5 | 6 | case "$1" in 7 | help | certs:help) 8 | certs_help_cmd "$@" 9 | ;; 10 | 11 | *) 12 | exit "$DOKKU_NOT_IMPLEMENTED_EXIT" 13 | ;; 14 | 15 | esac 16 | -------------------------------------------------------------------------------- /plugins/proxy/commands: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | [[ " help proxy:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT" 3 | source "$PLUGIN_AVAILABLE_PATH/proxy/internal-functions" 4 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 5 | 6 | case "$1" in 7 | help | proxy:help) 8 | proxy_help_cmd "$@" 9 | ;; 10 | 11 | *) 12 | exit "$DOKKU_NOT_IMPLEMENTED_EXIT" 13 | ;; 14 | 15 | esac 16 | -------------------------------------------------------------------------------- /plugins/ps/app-restart: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/ps/functions" 5 | 6 | ps_app_restart() { 7 | declare desc="ps app-restart plugin trigger" 8 | local trigger="ps_app_restart" 9 | local APP="$1"; 10 | 11 | ps_restart "$APP" 12 | } 13 | 14 | ps_app_restart "$@" 15 | -------------------------------------------------------------------------------- /plugins/checks/commands: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | [[ " help checks:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT" 3 | source "$PLUGIN_AVAILABLE_PATH/checks/internal-functions" 4 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 5 | 6 | case "$1" in 7 | help | checks:help) 8 | checks_help_cmd "$@" 9 | ;; 10 | 11 | *) 12 | exit "$DOKKU_NOT_IMPLEMENTED_EXIT" 13 | ;; 14 | 15 | esac 16 | -------------------------------------------------------------------------------- /plugins/domains/commands: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | [[ " help domains:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT" 3 | source "$PLUGIN_AVAILABLE_PATH/domains/internal-functions" 4 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 5 | 6 | case "$1" in 7 | help | domains:help) 8 | domains_help_cmd "$@" 9 | ;; 10 | 11 | *) 12 | exit "$DOKKU_NOT_IMPLEMENTED_EXIT" 13 | ;; 14 | 15 | esac 16 | -------------------------------------------------------------------------------- /plugins/storage/commands: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | [[ " storage:help help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT" 3 | source "$PLUGIN_AVAILABLE_PATH/storage/internal-functions" 4 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 5 | 6 | case "$1" in 7 | help | storage:help) 8 | storage_help_cmd "$@" 9 | ;; 10 | 11 | *) 12 | exit "$DOKKU_NOT_IMPLEMENTED_EXIT" 13 | ;; 14 | 15 | esac 16 | -------------------------------------------------------------------------------- /plugins/ssh-keys/commands: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | [[ " help ssh-keys:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT" 3 | source "$PLUGIN_AVAILABLE_PATH/ssh-keys/internal-functions" 4 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 5 | 6 | case "$1" in 7 | help | ssh-keys:help) 8 | ssh_keys_help_cmd "$@" 9 | ;; 10 | 11 | *) 12 | exit "$DOKKU_NOT_IMPLEMENTED_EXIT" 13 | ;; 14 | 15 | esac 16 | -------------------------------------------------------------------------------- /plugins/nginx-vhosts/commands: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | [[ " help nginx:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT" 3 | source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/internal-functions" 4 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 5 | 6 | case "$1" in 7 | help | nginx:help) 8 | nginx_vhosts_help_cmd "$@" 9 | ;; 10 | 11 | *) 12 | exit "$DOKKU_NOT_IMPLEMENTED_EXIT" 13 | ;; 14 | 15 | esac 16 | -------------------------------------------------------------------------------- /tests/apps/dockerfile-noexpose/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express') 2 | var app = express(); 3 | 4 | app.set('port', (process.env.PORT || 5000)) 5 | app.use(express.static(__dirname + '/public')) 6 | 7 | app.get('/', function(request, response) { 8 | response.send('Hello World!') 9 | }) 10 | 11 | app.listen(app.get('port'), function() { 12 | console.log("Node app is running at localhost:" + app.get('port')) 13 | }) 14 | -------------------------------------------------------------------------------- /plugins/00_dokku-standard/subcommands/cleanup: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | 5 | dokku_cleanup_cmd() { 6 | declare desc="cleans up old deployment cruft" 7 | declare cmd="cleanup" 8 | [[ "$1" == "$cmd" ]] && shift 1 9 | declare APP="$1" 10 | 11 | docker_cleanup "$APP" "true" 12 | } 13 | 14 | 15 | dokku_cleanup_cmd "$@" 16 | -------------------------------------------------------------------------------- /tests/apps/go/web.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | "os" 7 | ) 8 | 9 | func main() { 10 | http.HandleFunc("/", hello) 11 | fmt.Println("listening...") 12 | err := http.ListenAndServe(":"+os.Getenv("PORT"), nil) 13 | if err != nil { 14 | panic(err) 15 | } 16 | } 17 | 18 | func hello(res http.ResponseWriter, req *http.Request) { 19 | fmt.Fprintln(res, "go") 20 | } 21 | -------------------------------------------------------------------------------- /plugins/network/src/subcommands/rebuildall/rebuildall.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/dokku/dokku/plugins/common" 5 | "github.com/dokku/dokku/plugins/network" 6 | ) 7 | 8 | // rebuilds network settings for all apps 9 | func main() { 10 | apps, err := common.DokkuApps() 11 | if err != nil { 12 | common.LogFail(err.Error()) 13 | } 14 | for _, appName := range apps { 15 | network.BuildConfig(appName) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /plugins/ps/subcommands/stop: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/ps/functions" 5 | 6 | ps_stop_cmd() { 7 | declare desc="stops app via command line" 8 | local cmd="ps:stop" 9 | [[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on" 10 | ps_stop "$2" 11 | } 12 | 13 | ps_stop_cmd "$@" 14 | -------------------------------------------------------------------------------- /tests/apps/.websocket.disabled/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node-websocket-app", 3 | "version": "0.0.0", 4 | "description": "a basic webscket demo", 5 | "author": "Luigi Maselli", 6 | "dependencies": { 7 | "express": "3.1.x", 8 | "connect": "*", 9 | "handlebars": "~1.0.9", 10 | "socket.io": "~0.9.13", 11 | "express3-handlebars": "~0.2.3" 12 | }, 13 | "engines": { 14 | "node": "0.10.x" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /plugins/ps/subcommands/start: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/ps/functions" 5 | 6 | ps_start_cmd() { 7 | declare desc="starts app via command line" 8 | local cmd="ps:start" 9 | [[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on" 10 | ps_start "$2" 11 | } 12 | 13 | ps_start_cmd "$@" 14 | -------------------------------------------------------------------------------- /tests/apps/go-fail-postdeploy/web.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | "os" 7 | ) 8 | 9 | func main() { 10 | http.HandleFunc("/", hello) 11 | fmt.Println("listening...") 12 | err := http.ListenAndServe(":"+os.Getenv("PORT"), nil) 13 | if err != nil { 14 | panic(err) 15 | } 16 | } 17 | 18 | func hello(res http.ResponseWriter, req *http.Request) { 19 | fmt.Fprintln(res, "go") 20 | } 21 | -------------------------------------------------------------------------------- /tests/apps/go-fail-predeploy/web.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | "os" 7 | ) 8 | 9 | func main() { 10 | http.HandleFunc("/", hello) 11 | fmt.Println("listening...") 12 | err := http.ListenAndServe(":"+os.Getenv("PORT"), nil) 13 | if err != nil { 14 | panic(err) 15 | } 16 | } 17 | 18 | func hello(res http.ResponseWriter, req *http.Request) { 19 | fmt.Fprintln(res, "go") 20 | } 21 | -------------------------------------------------------------------------------- /plugins/ps/subcommands/restart: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/ps/functions" 5 | 6 | ps_restart_cmd() { 7 | declare desc="restarts app via command line" 8 | local cmd="ps:restart" 9 | [[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on" 10 | ps_restart "$2" 11 | } 12 | 13 | ps_restart_cmd "$@" 14 | -------------------------------------------------------------------------------- /plugins/plugin/subcommands/install-dependencies: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | 4 | plugin_install_dependencies_cmd() { 5 | declare desc="calls dependencies plugin trigger via command line" 6 | local cmd="plugin:install-dependencies" 7 | if [[ $2 == "--core" ]]; then 8 | export PLUGIN_PATH="$PLUGIN_CORE_PATH" 9 | fi 10 | plugn trigger dependencies 11 | } 12 | 13 | plugin_install_dependencies_cmd "$@" 14 | -------------------------------------------------------------------------------- /tests/apps/config/web.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | 3 | var app = express.createServer(express.logger()); 4 | 5 | app.get('/', function(request, response) { 6 | response.send(process.env.CONFTEST); 7 | }); 8 | 9 | app.get('/hello', function(request, response) { 10 | response.send(process.env.HELLO); 11 | }); 12 | 13 | var port = process.env.PORT || 5000; 14 | app.listen(port, function() { 15 | console.log("Listening on " + port); 16 | }); 17 | -------------------------------------------------------------------------------- /plugins/ps/post-stop: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/config/functions" 5 | source "$PLUGIN_AVAILABLE_PATH/ps/functions" 6 | 7 | ps_post_stop() { 8 | declare desc="ps post-stop plugin trigger" 9 | local trigger="ps_post_stop" 10 | local APP="$1" 11 | 12 | config_set --no-restart "$APP" DOKKU_APP_RESTORE=0 13 | } 14 | 15 | ps_post_stop "$@" -------------------------------------------------------------------------------- /plugins/ps/subcommands/scale: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/ps/functions" 5 | 6 | ps_scale_cmd() { 7 | declare desc="sets app scaling config via command line" 8 | local cmd="ps:scale" 9 | [[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on" 10 | shift 1 11 | ps_scale "$@" 12 | } 13 | 14 | ps_scale_cmd "$@" 15 | -------------------------------------------------------------------------------- /tests/apps/clojure/src/sample/app.clj: -------------------------------------------------------------------------------- 1 | (ns sample.app 2 | (:require [ring.adapter.jetty :as jetty] 3 | [compojure.core :refer [defroutes GET]])) 4 | 5 | (defroutes handler 6 | (GET "/" [] 7 | {:headers {"Content-type" "text/plain; charset=UTF-8"} 8 | :body "Hello World!"})) 9 | 10 | (defn -main [] 11 | (jetty/run-jetty handler 12 | {:port (Integer. (or (System/getenv "PORT") "5000")) 13 | :join? false})) 14 | -------------------------------------------------------------------------------- /tests/apps/multi/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test-buildpack-multi", 3 | "version": "0.0.0", 4 | "authors": [ 5 | "Al Johri " 6 | ], 7 | "license": "MIT", 8 | "private": true, 9 | "directory": "static/components", 10 | "ignore": [ 11 | "**/.*", 12 | "node_modules", 13 | "statc/components", 14 | "test", 15 | "tests" 16 | ], 17 | "dependencies": { 18 | "bootstrap-sass": "twbs/bootstrap-sass#~3.1.1" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /plugins/20_events/subcommands/on: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | 5 | events_on_cmd() { 6 | declare desc="enables dokku events logger" 7 | local cmd="events:on" 8 | echo "Enabling dokku events logger" 9 | [[ -d $DOKKU_ROOT/.dokkurc ]] || mkdir -p "$DOKKU_ROOT/.dokkurc" 10 | echo "export DOKKU_EVENTS=1" > "$DOKKU_ROOT/.dokkurc/DOKKU_EVENTS" 11 | } 12 | 13 | events_on_cmd "$@" 14 | -------------------------------------------------------------------------------- /plugins/network/src/triggers/network-get-listeners/network-get-listeners.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "fmt" 6 | "os" 7 | "strings" 8 | 9 | "github.com/dokku/dokku/plugins/network" 10 | ) 11 | 12 | // returns the listeners (host:port combinations) for a given app container 13 | func main() { 14 | flag.Parse() 15 | appName := flag.Arg(0) 16 | 17 | listeners := network.GetListeners(appName) 18 | fmt.Fprint(os.Stdout, strings.Join(listeners, " ")) 19 | } 20 | -------------------------------------------------------------------------------- /plugins/ps/pre-deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/ps/functions" 5 | 6 | ps_pre_deploy() { 7 | declare desc="ps pre-deploy plugin trigger" 8 | local trigger="ps_pre_deploy" 9 | local APP="$1"; local IMAGE_TAG="$2" 10 | 11 | extract_procfile "$APP" "$IMAGE_TAG" 12 | generate_scale_file "$APP" "$IMAGE_TAG" 13 | } 14 | 15 | ps_pre_deploy "$@" 16 | -------------------------------------------------------------------------------- /plugins/apps/subcommands/exists: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_AVAILABLE_PATH/apps/functions" 4 | 5 | apps_exists_cmd() { 6 | declare desc="checks if an app exists" 7 | local cmd="apps:exists" 8 | [[ "$1" == "$cmd" ]] && shift 1 9 | declare APP="$1" 10 | 11 | if ! apps_exists "$APP"; then 12 | dokku_log_fail "App does not exist" 13 | fi 14 | dokku_log_info1 "App already exists" 15 | } 16 | 17 | apps_exists_cmd "$@" 18 | -------------------------------------------------------------------------------- /plugins/domains/subcommands/setup: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/domains/functions" 5 | 6 | domains_setup_cmd() { 7 | declare desc="setup domains to default state via command line" 8 | local cmd="domains:setup" 9 | [[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on" 10 | domains_setup "$2" 11 | } 12 | 13 | domains_setup_cmd "$@" 14 | -------------------------------------------------------------------------------- /plugins/domains/subcommands/enable: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/domains/functions" 5 | 6 | domains_enable_cmd() { 7 | declare desc="enable domains/VHOST support via command line" 8 | local cmd="domains:enable" 9 | [[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on" 10 | domains_enable "$2" 11 | } 12 | 13 | domains_enable_cmd "$@" 14 | -------------------------------------------------------------------------------- /plugins/domains/subcommands/disable: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/domains/functions" 5 | 6 | domains_disable_cmd() { 7 | declare desc="disable domains/VHOST support via command line" 8 | local cmd="domains:disable" 9 | [[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on" 10 | domains_disable "$2" 11 | } 12 | 13 | domains_disable_cmd "$@" 14 | -------------------------------------------------------------------------------- /plugins/network/src/triggers/network-config-exists/network-config-exists.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "fmt" 6 | "os" 7 | 8 | "github.com/dokku/dokku/plugins/network" 9 | ) 10 | 11 | // writes true or false to stdout whether a given app has network config 12 | func main() { 13 | flag.Parse() 14 | appName := flag.Arg(0) 15 | 16 | if network.HasNetworkConfig(appName) { 17 | fmt.Fprintln(os.Stdout, "true") 18 | return 19 | } 20 | 21 | fmt.Fprintln(os.Stdout, "false") 22 | } 23 | -------------------------------------------------------------------------------- /plugins/config/src/subcommands/keys/keys.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "os" 6 | 7 | "github.com/dokku/dokku/plugins/config" 8 | ) 9 | 10 | func main() { 11 | args := flag.NewFlagSet("config:keys", flag.ExitOnError) 12 | global := args.Bool("global", false, "--global: use the global environment") 13 | merged := args.Bool("merged", false, "--merged: merge app environment and global environment") 14 | args.Parse(os.Args[2:]) 15 | config.CommandKeys(args.Args(), *global, *merged) 16 | } 17 | -------------------------------------------------------------------------------- /debian/lintian-overrides: -------------------------------------------------------------------------------- 1 | dokku: command-with-path-in-maintainer-script postinst:16 /usr/bin/sshcommand 2 | dokku: maintainer-script-calls-systemctl postinst:87 3 | dokku: changelog-file-missing-in-native-package 4 | dokku: statically-linked-binary 5 | dokku: unstripped-binary-or-object 6 | 7 | # The Go compiler is currently unable to produce read-only relocations 8 | # (it produces static binaries). 9 | dokku: hardening-no-relro 10 | 11 | # Built golang binaries link to libc 12 | dokku: missing-dependency-on-libc 13 | -------------------------------------------------------------------------------- /plugins/20_events/subcommands/default: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | 5 | events_main_cmd() { 6 | declare desc="shows contents of dokku events log" 7 | local cmd="events" 8 | if [[ -f $DOKKU_EVENTS_LOGFILE ]]; then 9 | if [[ $2 == "-t" ]]; then 10 | tail -F "$DOKKU_EVENTS_LOGFILE" 11 | else 12 | tail -n 100 "$DOKKU_EVENTS_LOGFILE" 13 | fi 14 | fi 15 | } 16 | 17 | events_main_cmd "$@" 18 | -------------------------------------------------------------------------------- /plugins/config/src/subcommands/bundle/bundle.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "os" 6 | 7 | "github.com/dokku/dokku/plugins/config" 8 | ) 9 | 10 | func main() { 11 | args := flag.NewFlagSet("config:bundle", flag.ExitOnError) 12 | global := args.Bool("global", false, "--global: use the global environment") 13 | merged := args.Bool("merged", false, "--merged: merge app environment and global environment") 14 | args.Parse(os.Args[2:]) 15 | config.CommandBundle(args.Args(), *global, *merged) 16 | } 17 | -------------------------------------------------------------------------------- /plugins/proxy/subcommands/ports: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/proxy/functions" 5 | source "$PLUGIN_AVAILABLE_PATH/config/functions" 6 | 7 | proxy_ports_cmd() { 8 | declare desc="cmd wrapper to list proxy port mappings for an app" 9 | local cmd="proxy:ports" 10 | local APP="$2"; verify_app_name "$APP" 11 | 12 | list_app_proxy_ports "$APP" 13 | } 14 | 15 | proxy_ports_cmd "$@" 16 | -------------------------------------------------------------------------------- /plugins/network/src/triggers/network-get-ipaddr/network-get-ipaddr.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "fmt" 6 | "os" 7 | 8 | "github.com/dokku/dokku/plugins/network" 9 | ) 10 | 11 | // write the ipaddress to stdout for a given app container 12 | func main() { 13 | flag.Parse() 14 | appName := flag.Arg(0) 15 | procType := flag.Arg(1) 16 | containerID := flag.Arg(2) 17 | 18 | ipAddress := network.GetContainerIpaddress(appName, procType, containerID) 19 | fmt.Fprintln(os.Stdout, ipAddress) 20 | } 21 | -------------------------------------------------------------------------------- /plugins/proxy/subcommands/ports-add: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/proxy/functions" 5 | 6 | proxy_ports_add_cmd() { 7 | declare desc="add proxy port mappings from an app" 8 | local cmd="proxy:add" 9 | local APP="$2"; verify_app_name "$APP" 10 | shift 2 11 | 12 | add_proxy_ports "$APP" "$@" 13 | plugn trigger post-proxy-ports-update "$APP" "add" 14 | } 15 | 16 | proxy_ports_add_cmd "$@" 17 | -------------------------------------------------------------------------------- /plugins/proxy/subcommands/ports-set: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/proxy/functions" 5 | 6 | proxy_ports_set_cmd() { 7 | declare desc="add proxy port mappings from an app" 8 | local cmd="proxy:add" 9 | local APP="$2"; verify_app_name "$APP" 10 | shift 2 11 | 12 | set_proxy_ports "$APP" "$@" 13 | plugn trigger post-proxy-ports-update "$APP" "add" 14 | } 15 | 16 | proxy_ports_set_cmd "$@" 17 | -------------------------------------------------------------------------------- /plugins/git/deploy-source: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | 4 | git_deploy_source() { 5 | declare desc="git deploy-source plugin trigger" 6 | declare trigger="git_deploy_source" 7 | declare APP="$1" 8 | local STDIN 9 | STDIN=$(cat) 10 | 11 | # bail if another source is detected 12 | if [[ -n "$STDIN" ]]; then 13 | echo "$STDIN" 14 | return 15 | fi 16 | 17 | if [[ -d "$DOKKU_ROOT/$APP/refs" ]]; then 18 | echo "git" 19 | fi 20 | } 21 | 22 | git_deploy_source "$@" 23 | -------------------------------------------------------------------------------- /plugins/nginx-vhosts/subcommands/access-logs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/config/functions" 5 | source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/functions" 6 | 7 | nginx_logs_cmd() { 8 | declare desc="display app nginx logs from command line" 9 | local cmd="$1" 10 | [[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on" 11 | nginx_logs "$@" 12 | } 13 | 14 | nginx_logs_cmd "$@" 15 | -------------------------------------------------------------------------------- /plugins/tar/deploy-source: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | 4 | tar_deploy_source() { 5 | declare desc="tar deploy-source plugin trigger" 6 | declare trigger="tar_deploy_source" 7 | declare APP="$1" 8 | local STDIN 9 | STDIN=$(cat) 10 | 11 | # bail if another source is detected 12 | if [[ -n "$STDIN" ]]; then 13 | echo "$STDIN" 14 | return 15 | fi 16 | 17 | if [[ -f "$DOKKU_ROOT/$APP/src.tar" ]]; then 18 | echo "tar" 19 | fi 20 | } 21 | 22 | tar_deploy_source "$@" 23 | -------------------------------------------------------------------------------- /plugins/config/src/subcommands/get/get.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "os" 6 | 7 | "github.com/dokku/dokku/plugins/config" 8 | ) 9 | 10 | // get the given entries from the specified environment 11 | func main() { 12 | args := flag.NewFlagSet("config:get", flag.ExitOnError) 13 | global := args.Bool("global", false, "--global: use the global environment") 14 | quoted := args.Bool("quoted", false, "--quoted: get the value quoted") 15 | args.Parse(os.Args[2:]) 16 | config.CommandGet(args.Args(), *global, *quoted) 17 | } 18 | -------------------------------------------------------------------------------- /plugins/ps/core-post-deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/config/functions" 5 | source "$PLUGIN_AVAILABLE_PATH/ps/functions" 6 | 7 | ps_core_post_deploy() { 8 | declare desc="ps core-post-deploy plugin trigger" 9 | local trigger="ps_core_post_deploy" 10 | local APP="$1" 11 | 12 | remove_procfile "$APP" 13 | config_set --no-restart "$APP" DOKKU_APP_RESTORE=1 14 | } 15 | 16 | ps_core_post_deploy "$@" 17 | -------------------------------------------------------------------------------- /plugins/ssh-keys/user-auth: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | 5 | check_ssh_keys_user() { 6 | declare desc="check user passed by user-auth for ssh-keys plugin" 7 | local SSH_USER=$1 SSH_NAME=$2 8 | [[ "$SSH_USER" == "root" || "$SSH_NAME" == *admin* ]] || dokku_log_fail "You must be root, or a dokku admin, to execute this command" 9 | } 10 | 11 | if [[ "$3" =~ (ssh-keys:add|ssh-keys:remove) ]]; then 12 | check_ssh_keys_user "$@" 13 | fi 14 | -------------------------------------------------------------------------------- /plugins/ps/post-create: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/docker-options/functions" 5 | source "$PLUGIN_AVAILABLE_PATH/ps/functions" 6 | 7 | ps_post_create() { 8 | declare desc="ps post-create plugin trigger" 9 | local trigger="ps_post_create" 10 | local APP="$1" 11 | 12 | local passed_phases=(deploy) 13 | add_passed_docker_option passed_phases[@] "--restart=on-failure:10" 14 | } 15 | 16 | ps_post_create "$@" 17 | -------------------------------------------------------------------------------- /tests/apps/ruby/Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | daemons (1.1.9) 5 | eventmachine (1.0.3) 6 | rack (1.5.2) 7 | rack-protection (1.5.2) 8 | rack 9 | sinatra (1.4.4) 10 | rack (~> 1.4) 11 | rack-protection (~> 1.4) 12 | tilt (~> 1.3, >= 1.3.4) 13 | thin (1.6.1) 14 | daemons (>= 1.0.9) 15 | eventmachine (>= 1.0.0) 16 | rack (>= 1.0.0) 17 | tilt (1.4.1) 18 | 19 | PLATFORMS 20 | ruby 21 | 22 | DEPENDENCIES 23 | sinatra (~> 1.4.4) 24 | thin 25 | -------------------------------------------------------------------------------- /plugins/config/src/subcommands/unset/unset.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "os" 6 | 7 | "github.com/dokku/dokku/plugins/config" 8 | ) 9 | 10 | //unset the given entries from the given environment 11 | func main() { 12 | args := flag.NewFlagSet("config:unset", flag.ExitOnError) 13 | global := args.Bool("global", false, "--global: use the global environment") 14 | noRestart := args.Bool("no-restart", false, "--no-restart: no restart") 15 | args.Parse(os.Args[2:]) 16 | config.CommandUnset(args.Args(), *global, *noRestart) 17 | } 18 | -------------------------------------------------------------------------------- /plugins/domains/subcommands/add-global: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/domains/functions" 5 | 6 | domains_add_global_cmd() { 7 | declare desc="add global domain names via command line" 8 | local cmd="domains:add-global" 9 | [[ -z $2 ]] && dokku_log_fail "Please specify a domain name. Usage: dokku $1 [ ...]" 10 | 11 | shift 1 12 | domains_add_global "$@" 13 | } 14 | 15 | domains_add_global_cmd "$@" 16 | -------------------------------------------------------------------------------- /plugins/domains/subcommands/set-global: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/domains/functions" 5 | 6 | domains_set_global_cmd() { 7 | declare desc="set global domain names via command line" 8 | local cmd="domains:set-global" 9 | [[ -z $2 ]] && dokku_log_fail "Please specify a domain name. Usage: dokku $1 [ ...]" 10 | 11 | shift 1 12 | domains_set_global "$@" 13 | } 14 | 15 | domains_set_global_cmd "$@" 16 | -------------------------------------------------------------------------------- /plugins/proxy/subcommands/ports-clear: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/config/functions" 5 | 6 | proxy_ports_clear_cmd() { 7 | declare desc="clear all proxy port mappings for an app" 8 | local cmd="proxy:clear" 9 | local APP="$2"; verify_app_name "$APP" 10 | 11 | config_unset --no-restart "$APP" DOKKU_PROXY_PORT_MAP 12 | plugn trigger post-proxy-ports-update "$APP" "clear" 13 | } 14 | 15 | proxy_ports_clear_cmd "$@" 16 | -------------------------------------------------------------------------------- /plugins/scheduler-docker-local/post-create: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | 4 | scheduler-docker-local-post-create() { 5 | declare desc="scheduler-docker-local post-create plugin trigger" 6 | declare trigger="scheduler-docker-local-post-create" 7 | declare APP="$1" 8 | 9 | mkdir -p "${DOKKU_LIB_ROOT}/data/scheduler-docker-local/${APP}" 10 | chown -R "${DOKKU_SYSTEM_USER}:${DOKKU_SYSTEM_GROUP}" "${DOKKU_LIB_ROOT}/data/scheduler-docker-local/${APP}" 11 | } 12 | 13 | scheduler-docker-local-post-create "$@" 14 | -------------------------------------------------------------------------------- /plugins/git/commands: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_AVAILABLE_PATH/git/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/git/internal-functions" 5 | 6 | case "$1" in 7 | git-hook) 8 | git_hook_cmd "$@" 9 | ;; 10 | 11 | git-upload-pack) 12 | git_upload_pack_cmd "$@" 13 | ;; 14 | 15 | git-*) 16 | git_glob_cmd "$@" 17 | ;; 18 | 19 | help | git:help) 20 | cmd-git-help "$@" 21 | ;; 22 | 23 | *) 24 | exit "$DOKKU_NOT_IMPLEMENTED_EXIT" 25 | ;; 26 | 27 | esac 28 | -------------------------------------------------------------------------------- /plugins/network/src/subcommands/set/set.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | 6 | "github.com/dokku/dokku/plugins/common" 7 | "github.com/dokku/dokku/plugins/network" 8 | ) 9 | 10 | // set or clear a network property for an app 11 | func main() { 12 | flag.Parse() 13 | appName := flag.Arg(1) 14 | property := flag.Arg(2) 15 | value := flag.Arg(3) 16 | 17 | if property == "bind-all-interfaces" && value == "" { 18 | value = "false" 19 | } 20 | 21 | common.CommandPropertySet("network", appName, property, value, network.DefaultProperties) 22 | } 23 | -------------------------------------------------------------------------------- /tests/apps/go-fail-postdeploy/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Sample go app", 3 | "description": "Used in dokku's test suite", 4 | "website": "http://dokku.viewdocs.io/dokku/", 5 | "repository": "https://github.com/dokku/dokku", 6 | "logo": "https://raw.githubusercontent.com/dokku/dokku/master/docs/assets/dokku.png", 7 | "scripts": { 8 | "dokku": { 9 | "postdeploy": "touch /app/postdeploy.test && ls -la /app" 10 | } 11 | }, 12 | "buildpacks": [ 13 | { 14 | "url": "https://github.com/heroku/heroku-buildpack-go" 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /tests/apps/go-fail-predeploy/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Sample go app", 3 | "description": "Used in dokku's test suite", 4 | "website": "http://dokku.viewdocs.io/dokku/", 5 | "repository": "https://github.com/dokku/dokku", 6 | "logo": "https://raw.githubusercontent.com/dokku/dokku/master/docs/assets/dokku.png", 7 | "scripts": { 8 | "dokku": { 9 | "predeploy": "touch /app/predeploy.test && ls -la /app" 10 | } 11 | }, 12 | "buildpacks": [ 13 | { 14 | "url": "https://github.com/heroku/heroku-buildpack-go" 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /plugins/plugin/internal-functions: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | 5 | plugin_list_cmd() { 6 | declare desc="lists all plugins" 7 | local cmd="plugin" 8 | 9 | plugn version 10 | plugn list 11 | } 12 | 13 | plugin_prime_bash_completion() { 14 | declare desc="primes the bash-completion cache" 15 | 16 | dokku_log_info1_quiet "Priming bash-completion cache" 17 | dokku --quiet help --all | awk '/^ /{ print $1 }' | sort > "/var/cache/dokku-completion" 18 | } 19 | -------------------------------------------------------------------------------- /tests/apps/multi/app.py: -------------------------------------------------------------------------------- 1 | import os 2 | from flask import Flask, render_template 3 | from werkzeug.wsgi import SharedDataMiddleware 4 | 5 | app = Flask(__name__) 6 | 7 | @app.route('/') 8 | def hello_world(): 9 | return render_template('index.html') 10 | 11 | app.wsgi_app = SharedDataMiddleware(app.wsgi_app, { '/': os.path.join(os.path.dirname(__file__), 'static') }) 12 | app.wsgi_app = SharedDataMiddleware(app.wsgi_app, { '/': os.path.join(os.path.dirname(__file__), 'static/.tmp') }) 13 | 14 | if __name__ == '__main__': 15 | app.run(host='0.0.0.0', debug=True) 16 | -------------------------------------------------------------------------------- /contrib/herokuish-build.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:14.04 2 | 3 | ENV DEBIAN_FRONTEND=noninteractive 4 | 5 | RUN apt-get update && apt-get -y install gcc git build-essential wget ruby-dev ruby1.9.1 lintian rpm help2man man-db 6 | RUN command -v fpm > /dev/null || sudo gem install fpm --no-ri --no-rdoc 7 | 8 | ARG WORKDIR=/go/src/github.com/dokku/dokku 9 | 10 | WORKDIR ${WORKDIR} 11 | 12 | COPY . ${WORKDIR} 13 | 14 | RUN make deb-herokuish rpm-herokuish 15 | 16 | RUN mkdir -p /data \ 17 | && cp /tmp/*.deb /data \ 18 | && cp /tmp/*.rpm /data \ 19 | && ls -lha /data/ 20 | -------------------------------------------------------------------------------- /plugins/domains/subcommands/remove-global: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/domains/functions" 5 | 6 | domains_remove_global_cmd() { 7 | declare desc="remove global domain names via command line" 8 | local cmd="domains:remove-global" 9 | [[ -z $2 ]] && dokku_log_fail "Please specify a domain name. Usage: dokku $1 [ ...]" 10 | 11 | shift 1 12 | domains_remove_global "$@" 13 | } 14 | 15 | domains_remove_global_cmd "$@" 16 | -------------------------------------------------------------------------------- /contrib/update-build.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:14.04 2 | 3 | ENV DEBIAN_FRONTEND=noninteractive 4 | 5 | RUN apt-get update && apt-get -y install gcc git build-essential wget ruby-dev ruby1.9.1 lintian rpm help2man man-db 6 | RUN command -v fpm > /dev/null || sudo gem install fpm --no-ri --no-rdoc 7 | 8 | ARG WORKDIR=/go/src/github.com/dokku/dokku 9 | 10 | WORKDIR ${WORKDIR} 11 | 12 | COPY . ${WORKDIR} 13 | 14 | RUN make deb-dokku-update rpm-dokku-update 15 | 16 | RUN mkdir -p /data \ 17 | && cp /tmp/*.deb /data \ 18 | && cp /tmp/*.rpm /data \ 19 | && ls -lha /data/ 20 | -------------------------------------------------------------------------------- /plugins/00_dokku-standard/subcommands/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/config/functions" 5 | 6 | dokku_run_cmd() { 7 | declare desc="runs command in container based on app image" 8 | declare cmd="run" APP="$2" 9 | verify_app_name "$APP" 10 | shift 2 11 | 12 | local DOKKU_SCHEDULER=$(config_get "$APP" DOKKU_SCHEDULER || echo "docker-local") 13 | plugn trigger scheduler-run "$DOKKU_SCHEDULER" "$APP" "$@" 14 | } 15 | 16 | dokku_run_cmd "$@" 17 | -------------------------------------------------------------------------------- /plugins/git/subcommands/initialize: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 3 | source "$PLUGIN_AVAILABLE_PATH/git/functions" 4 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 5 | 6 | git-initialize-cmd() { 7 | declare desc="initialize a git repository for an app" 8 | local cmd="git:initialize" argv=("$@"); [[ ${argv[0]} == "$cmd" ]] && shift 1 9 | declare APP="$1" 10 | is_valid_app_name "$APP" 11 | 12 | dokku_log_info1_quiet "Initializing git repository for $APP" 13 | fn-git-create-hook "$APP" 14 | } 15 | 16 | git-initialize-cmd "$@" 17 | -------------------------------------------------------------------------------- /plugins/plugin/subcommands/enable: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/plugin/functions" 5 | source "$PLUGIN_AVAILABLE_PATH/plugin/internal-functions" 6 | 7 | plugin_enable_cmd() { 8 | declare desc="enables plugin via command line" 9 | local cmd="plugin:enable" 10 | [[ -z $2 ]] && dokku_log_fail "Please specify a plugin to enable" 11 | local PLUGIN="$2" 12 | enable_plugin "$PLUGIN" 13 | plugin_prime_bash_completion 14 | } 15 | 16 | plugin_enable_cmd "$@" 17 | -------------------------------------------------------------------------------- /plugins/plugin/subcommands/update: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_AVAILABLE_PATH/plugin/internal-functions" 4 | 5 | plugin_update_cmd() { 6 | declare desc="updates plugin to optional committish and calls update plugin trigger via command line" 7 | local cmd="plugin:update" 8 | if [[ -n "$2" ]]; then 9 | local PLUGIN="$2" 10 | local PLUGIN_COMMITTISH="$3" 11 | plugn update "$PLUGIN" "$PLUGIN_COMMITTISH" 12 | fi 13 | plugn trigger update 14 | plugin_prime_bash_completion 15 | } 16 | 17 | plugin_update_cmd "$@" 18 | -------------------------------------------------------------------------------- /plugins/tags/subcommands/default: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | 5 | tags_main_cmd() { 6 | declare desc="shows docker images tags for app via command line" 7 | local cmd="tags" 8 | [[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on" 9 | local APP="$2"; local IMAGE_REPO=$(get_app_image_repo "$APP") 10 | verify_app_name "$APP" 11 | 12 | dokku_log_info2_quiet "Image tags for $IMAGE_REPO" 13 | docker images "$IMAGE_REPO" 14 | } 15 | 16 | tags_main_cmd "$@" 17 | -------------------------------------------------------------------------------- /plugins/domains/subcommands/add: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/domains/functions" 5 | 6 | domains_add_cmd() { 7 | declare desc="adds domains to app via command line" 8 | local cmd="domains:add" 9 | [[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on" 10 | [[ -z $3 ]] && dokku_log_fail "Please specify a domain name. Usage: dokku $1 $2 [ ...]" 11 | 12 | shift 1 13 | domains_add "$@" 14 | } 15 | 16 | domains_add_cmd "$@" 17 | -------------------------------------------------------------------------------- /plugins/domains/subcommands/set: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/domains/functions" 5 | 6 | domains_set_cmd() { 7 | declare desc="set domains for app via command line" 8 | local cmd="domains:set" 9 | [[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on" 10 | [[ -z $3 ]] && dokku_log_fail "Please specify a domain name. Usage: dokku $1 $2 [ ...]" 11 | 12 | shift 1 13 | domains_set "$@" 14 | } 15 | 16 | domains_set_cmd "$@" 17 | -------------------------------------------------------------------------------- /plugins/plugin/subcommands/disable: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/plugin/functions" 5 | source "$PLUGIN_AVAILABLE_PATH/plugin/internal-functions" 6 | 7 | plugin_disable_cmd() { 8 | declare desc="disables plugin via command line" 9 | local cmd="plugin:disable" 10 | [[ -z $2 ]] && dokku_log_fail "Please specify a plugin to disable" 11 | local PLUGIN="$2" 12 | disable_plugin "$PLUGIN" 13 | plugin_prime_bash_completion 14 | } 15 | 16 | plugin_disable_cmd "$@" 17 | -------------------------------------------------------------------------------- /plugins/proxy/proxy.go: -------------------------------------------------------------------------------- 1 | package proxy 2 | 3 | import ( 4 | "github.com/dokku/dokku/plugins/common" 5 | "github.com/dokku/dokku/plugins/config" 6 | ) 7 | 8 | // IsAppProxyEnabled returns true if proxy is enabled; otherwise return false 9 | func IsAppProxyEnabled(appName string) bool { 10 | err := common.VerifyAppName(appName) 11 | if err != nil { 12 | common.LogFail(err.Error()) 13 | } 14 | 15 | proxyEnabled := true 16 | disableProxy := config.GetWithDefault(appName, "DOKKU_DISABLE_PROXY", "") 17 | if disableProxy != "" { 18 | proxyEnabled = false 19 | } 20 | return proxyEnabled 21 | } 22 | -------------------------------------------------------------------------------- /plugins/ps/subcommands/rebuild: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/ps/functions" 5 | 6 | ps_rebuild_cmd() { 7 | declare desc="rebuilds an app from source" 8 | local cmd="ps:rebuild" 9 | local APP="$2" 10 | [[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on" 11 | 12 | if (is_deployed "$APP"); then 13 | ps_rebuild "$APP" 14 | else 15 | dokku_log_warn "App $APP has not been deployed" 16 | fi 17 | } 18 | 19 | ps_rebuild_cmd "$@" 20 | -------------------------------------------------------------------------------- /plugins/network/src/triggers/network-get-property/network-get-property.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "fmt" 6 | "os" 7 | 8 | "github.com/dokku/dokku/plugins/common" 9 | network "github.com/dokku/dokku/plugins/network" 10 | ) 11 | 12 | // writes the network property to stdout for a given app container 13 | func main() { 14 | flag.Parse() 15 | appName := flag.Arg(0) 16 | property := flag.Arg(1) 17 | 18 | defaultValue := network.GetDefaultValue(property) 19 | value := common.PropertyGetDefault("network", appName, property, defaultValue) 20 | fmt.Fprintln(os.Stdout, value) 21 | } 22 | -------------------------------------------------------------------------------- /plugins/plugin/subcommands/uninstall: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/plugin/functions" 5 | source "$PLUGIN_AVAILABLE_PATH/plugin/internal-functions" 6 | 7 | plugin_uninstall_cmd() { 8 | declare desc="uninstalls plugin via command line" 9 | local cmd="plugin:uninstall" 10 | [[ -z $2 ]] && dokku_log_fail "Please specify a plugin to uninstall" 11 | local PLUGIN="$2" 12 | uninstall_plugin "$PLUGIN" 13 | plugin_prime_bash_completion 14 | } 15 | 16 | plugin_uninstall_cmd "$@" 17 | -------------------------------------------------------------------------------- /plugins/apps/subcommands/destroy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/apps/functions" 5 | 6 | apps_destroy_cmd() { 7 | declare desc="destroys an app" 8 | local cmd="apps:destroy" 9 | [[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on" 10 | [[ "$2" == "tls" ]] && dokku_log_fail "Unable to destroy tls directory" 11 | [[ "$3" == "force" ]] && export DOKKU_APPS_FORCE_DELETE=1 12 | local APP="$2" 13 | apps_destroy "$APP" 14 | } 15 | 16 | apps_destroy_cmd "$@" 17 | -------------------------------------------------------------------------------- /plugins/apps/subcommands/lock: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/apps/internal-functions" 5 | 6 | apps_lock_cmd() { 7 | declare desc="creates a '.deploy.lock' file in an application's repo" 8 | declare cmd="apps:lock" 9 | [[ "$1" == "$cmd" ]] && shift 1 10 | declare APP="$1"; verify_app_name "$APP" 11 | 12 | touch "$DOKKU_ROOT/$APP/.deploy.lock" || dokku_log_fail "Unable to create deploy lock" 13 | 14 | dokku_log_info1 "Deploy lock created" 15 | } 16 | 17 | apps_lock_cmd "$@" 18 | -------------------------------------------------------------------------------- /plugins/domains/subcommands/remove: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/domains/functions" 5 | 6 | domains_remove_cmd() { 7 | declare desc="removes domains from app via command line" 8 | local cmd="domains:remove" 9 | [[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on" 10 | [[ -z $3 ]] && dokku_log_fail "Please specify a domain name. Usage: dokku $1 $2 [ ...]" 11 | 12 | shift 1 13 | domains_remove "$@" 14 | } 15 | 16 | domains_remove_cmd "$@" 17 | -------------------------------------------------------------------------------- /plugins/network/src/triggers/network-get-port/network-get-port.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "fmt" 6 | "os" 7 | 8 | "github.com/dokku/dokku/plugins/common" 9 | network "github.com/dokku/dokku/plugins/network" 10 | ) 11 | 12 | // write the port to stdout for a given app container 13 | func main() { 14 | flag.Parse() 15 | appName := flag.Arg(0) 16 | procType := flag.Arg(1) 17 | isHerokuishContainer := common.ToBool(flag.Arg(2)) 18 | containerID := flag.Arg(3) 19 | 20 | port := network.GetContainerPort(appName, procType, isHerokuishContainer, containerID) 21 | fmt.Fprintln(os.Stdout, port) 22 | } 23 | -------------------------------------------------------------------------------- /plugins/ssh-keys/subcommands/remove: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/ssh-keys/functions" 5 | 6 | remove_key() { 7 | declare desc="Removes key from authorized_keys" 8 | local cmd="ssh-keys:remove" 9 | shift 10 | local name="$1" 11 | verify_ssh_key_file 12 | [[ -z $1 ]] && dokku_log_fail "A name is required to remove a key, ie: dokku ssh-keys:remove " 13 | sshcommand acl-remove dokku "$name" || dokku_log_fail "sshcommand returned an error $?" 14 | } 15 | 16 | remove_key "$@" 17 | -------------------------------------------------------------------------------- /debian/templates: -------------------------------------------------------------------------------- 1 | Template: dokku/web_config 2 | Description: Enable the web-based config page? 3 | Type: boolean 4 | Default: true 5 | 6 | Template: dokku/vhost_enable 7 | Description: Enable vhost-based deployments? 8 | Type: boolean 9 | Default: false 10 | 11 | Template: dokku/hostname 12 | Description: Hostname or IP for server: 13 | Type: string 14 | Default: dokku.me 15 | 16 | Template: dokku/skip_key_file 17 | Description: Skip key file requirement? 18 | Type: boolean 19 | Default: false 20 | 21 | Template: dokku/key_file 22 | Description: Keyfile for initial user: 23 | Type: string 24 | Default: /root/.ssh/id_rsa.pub 25 | -------------------------------------------------------------------------------- /plugins/scheduler-docker-local/install: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions" 4 | 5 | scheduler-docker-local-install() { 6 | declare desc="scheduler-docker-local install plugin trigger" 7 | declare trigger="scheduler-docker-local-install" 8 | 9 | mkdir -p "${DOKKU_LIB_ROOT}/data/scheduler-docker-local" 10 | chown -R "${DOKKU_SYSTEM_USER}:${DOKKU_SYSTEM_GROUP}" "${DOKKU_LIB_ROOT}/data/scheduler-docker-local" 11 | 12 | fn-plugin-property-setup "scheduler-docker-local" 13 | } 14 | 15 | scheduler-docker-local-install "$@" 16 | -------------------------------------------------------------------------------- /tests/apps/.websocket.disabled/views/layout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Websocket demo Socket.io 4 | 5 | 6 | 7 | 8 | 23 | {{{body}}} 24 | 25 | -------------------------------------------------------------------------------- /plugins/config/src/subcommands/set/set.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "os" 6 | 7 | "github.com/dokku/dokku/plugins/config" 8 | ) 9 | 10 | // set the given entries to the specified environment 11 | func main() { 12 | args := flag.NewFlagSet("config:set", flag.ExitOnError) 13 | global := args.Bool("global", false, "--global: use the global environment") 14 | encoded := args.Bool("encoded", false, "--encoded: interpret VALUEs as base64") 15 | noRestart := args.Bool("no-restart", false, "--no-restart: no restart") 16 | args.Parse(os.Args[2:]) 17 | config.CommandSet(args.Args(), *global, *noRestart, *encoded) 18 | } 19 | -------------------------------------------------------------------------------- /plugins/nginx-vhosts/post-proxy-ports-update: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/functions" 5 | source "$PLUGIN_AVAILABLE_PATH/proxy/functions" 6 | 7 | nginx_post_proxy_ports_update() { 8 | declare desc="calls nginx build_config when domains are updated" 9 | local trigger="nginx_post_proxy_ports_update" 10 | local APP="$1" ACTION="$2" 11 | if [[ "$(get_app_proxy_type "$APP")" == "nginx" ]]; then 12 | nginx_build_config "$APP" 13 | fi 14 | } 15 | 16 | nginx_post_proxy_ports_update "$@" 17 | -------------------------------------------------------------------------------- /plugins/tags/subcommands/deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | 5 | tags_deploy_cmd() { 6 | declare desc="deploys an app with a given tagged image via command line" 7 | local cmd="tags:deploy" 8 | declare APP="$2" IMAGE_TAG="$3" 9 | local IMAGE 10 | [[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on" 11 | verify_app_name "$APP" 12 | 13 | IMAGE="$(get_app_image_name "$APP" "$IMAGE_TAG")" 14 | verify_image "$IMAGE" || return 1 15 | release_and_deploy "$APP" "$IMAGE_TAG" 16 | } 17 | 18 | tags_deploy_cmd "$@" 19 | -------------------------------------------------------------------------------- /tests/apps/dockerfile/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express') 2 | var app = express(); 3 | 4 | app.set('port', (process.env.PORT || 5000)) 5 | app.use(express.static(__dirname + '/public')) 6 | 7 | app.get('/', function(request, response) { 8 | response.send('Hello World!') 9 | }) 10 | 11 | app.get('/env/:key', function(request, response) { 12 | response.send(process.env[request.params["key"]]) 13 | }) 14 | 15 | app.listen(app.get('port'), function() { 16 | console.log("Node app is running at localhost:" + app.get('port')) 17 | }) 18 | 19 | app.listen(3003, function() { 20 | console.log("Node app is running at localhost:" + 3003) 21 | }) 22 | -------------------------------------------------------------------------------- /debian/config: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eo pipefail; [[ $TRACE ]] && set -x 3 | 4 | if [[ -e /usr/share/debconf/confmodule ]]; then 5 | # shellcheck disable=SC1091 6 | . /usr/share/debconf/confmodule 7 | fi 8 | 9 | readonly ACTION="${1:-configure}" 10 | readonly VERSION="${2:-dev}" 11 | 12 | db_input "high" "dokku/web_config" || true 13 | db_go || true 14 | 15 | db_get "dokku/web_config" 16 | if [ $RET = "true" ]; then 17 | exit 0 18 | fi 19 | 20 | db_input "high" "dokku/hostname" || true 21 | db_input "high" "dokku/vhost_enable" || true 22 | if [ "$ACTION" != "reconfigure" ]; then 23 | db_input "high" "dokku/key_file" || true 24 | fi 25 | db_go || true 26 | -------------------------------------------------------------------------------- /plugins/nginx-vhosts/proxy-enable: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/domains/functions" 5 | source "$PLUGIN_AVAILABLE_PATH/proxy/functions" 6 | source "$PLUGIN_AVAILABLE_PATH/ps/functions" 7 | 8 | nginx_proxy_enable() { 9 | declare desc="enable nginx proxy" 10 | local trigger="nginx_proxy_enable" 11 | local APP="$1"; verify_app_name "$APP" 12 | 13 | if [[ "$(get_app_proxy_type "$APP")" == "nginx" ]]; then 14 | enable_app_vhost "$APP" --no-restart 15 | ps_restart "$APP" 16 | fi 17 | } 18 | 19 | nginx_proxy_enable "$@" 20 | -------------------------------------------------------------------------------- /plugins/00_dokku-standard/pre-deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_CORE_AVAILABLE_PATH/00_dokku-standard/exec-app-json-scripts" 5 | 6 | exec_app_json_scripts() { 7 | declare desc="core app.json scripts execution" 8 | local trigger="pre-deploy app_json_scripts" 9 | local APP="$1"; local IMAGE_TAG="$2"; local PHASE_SCRIPT_KEY="predeploy" 10 | 11 | dokku_log_info1 "Attempting to run scripts.dokku.$PHASE_SCRIPT_KEY from app.json (if defined)" 12 | execute_script "$APP" "$IMAGE_TAG" "$PHASE_SCRIPT_KEY" 13 | } 14 | 15 | exec_app_json_scripts "$@" 16 | -------------------------------------------------------------------------------- /plugins/nginx-vhosts/proxy-disable: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/domains/functions" 5 | source "$PLUGIN_AVAILABLE_PATH/proxy/functions" 6 | source "$PLUGIN_AVAILABLE_PATH/ps/functions" 7 | 8 | nginx_proxy_disable() { 9 | declare desc="disable nginx proxy" 10 | local trigger="nginx_proxy_disable" 11 | local APP="$1"; verify_app_name "$APP" 12 | 13 | if [[ "$(get_app_proxy_type "$APP")" == "nginx" ]]; then 14 | disable_app_vhost "$APP" --no-restart 15 | ps_restart "$APP" 16 | fi 17 | } 18 | 19 | nginx_proxy_disable "$@" 20 | -------------------------------------------------------------------------------- /plugins/scheduler-docker-local/scheduler-tags-destroy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | 5 | scheduler-docker-local-scheduler-tags-destroy() { 6 | declare desc="scheduler-docker-local scheduler-tags-destroy plugin trigger" 7 | declare trigger="scheduler-docker-local scheduler-tags-destroy" 8 | declare DOKKU_SCHEDULER="$1" APP="$2" IMAGE_REPO="$3" IMAGE_TAG="$4" 9 | 10 | if [[ "$DOKKU_SCHEDULER" != "docker-local" ]]; then 11 | return 12 | fi 13 | 14 | docker rmi "$IMAGE_REPO:$IMAGE_TAG" 15 | } 16 | 17 | scheduler-docker-local-scheduler-tags-destroy "$@" 18 | -------------------------------------------------------------------------------- /plugins/00_dokku-standard/post-deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_CORE_AVAILABLE_PATH/00_dokku-standard/exec-app-json-scripts" 5 | 6 | exec_app_json_scripts() { 7 | declare desc="core app.json scripts execution" 8 | local trigger="post-deploy app_json_scripts" 9 | local APP="$1"; local IMAGE_TAG="$4"; local PHASE_SCRIPT_KEY="postdeploy" 10 | 11 | dokku_log_info1 "Attempting to run scripts.dokku.$PHASE_SCRIPT_KEY from app.json (if defined)" 12 | execute_script "$APP" "$IMAGE_TAG" "$PHASE_SCRIPT_KEY" 13 | } 14 | 15 | exec_app_json_scripts "$@" 16 | -------------------------------------------------------------------------------- /plugins/nginx-vhosts/pre-enable-vhost: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/config/functions" 5 | source "$PLUGIN_AVAILABLE_PATH/proxy/functions" 6 | 7 | nginx_pre_enable_vhost_trigger() { 8 | declare desc="unset port prior to vhosts being enabled" 9 | local trigger="nginx_pre_enable_vhost_trigger" 10 | local APP="$1" 11 | if [[ "$(get_app_proxy_type "$APP")" == "nginx" ]]; then 12 | config_unset --no-restart "$APP" DOKKU_PROXY_PORT DOKKU_PROXY_SSL_PORT DOKKU_PROXY_PORT_MAP 13 | fi 14 | } 15 | 16 | nginx_pre_enable_vhost_trigger "$@" 17 | -------------------------------------------------------------------------------- /plugins/nginx-vhosts/pre-disable-vhost: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/config/functions" 5 | source "$PLUGIN_AVAILABLE_PATH/proxy/functions" 6 | 7 | nginx_pre_disable_vhost_trigger() { 8 | declare desc="unset port prior to vhosts being disabled" 9 | local trigger="nginx_pre_disable_vhost_trigger" 10 | local APP="$1" 11 | if [[ "$(get_app_proxy_type "$APP")" == "nginx" ]]; then 12 | config_unset --no-restart "$APP" DOKKU_PROXY_PORT DOKKU_PROXY_SSL_PORT DOKKU_PROXY_PORT_MAP 13 | fi 14 | } 15 | 16 | nginx_pre_disable_vhost_trigger "$@" 17 | -------------------------------------------------------------------------------- /tests/apps/multi/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "Al Johri", 3 | "dependencies": { 4 | "bower": "^1.3.1", 5 | "grunt": "~0.4.5", 6 | "grunt-cli": "~0.1.13", 7 | "grunt-contrib-compass": "~1.0.1", 8 | "load-grunt-tasks": "~1.0.0", 9 | "tmp": "0.0.23" 10 | }, 11 | "description": "Test application for heroku multi buildpack.", 12 | "engines": { 13 | "node": "4.2.x" 14 | }, 15 | "license": "ISC", 16 | "name": "test-buildpack-multi", 17 | "scripts": { 18 | "postinstall": "echo $PATH && ./node_modules/bower/bin/bower install --allow-root && ./node_modules/grunt-cli/bin/grunt --verbose --debug heroku" 19 | }, 20 | "version": "0.0.0" 21 | } 22 | -------------------------------------------------------------------------------- /plugins/common/vendor/github.com/codeskyblue/go-sh/example_test.go: -------------------------------------------------------------------------------- 1 | package sh_test 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/codeskyblue/go-sh" 7 | ) 8 | 9 | func ExampleCommand() { 10 | out, err := sh.Command("echo", "hello").Output() 11 | fmt.Println(string(out), err) 12 | } 13 | 14 | func ExampleCommandPipe() { 15 | out, err := sh.Command("echo", "-n", "hi").Command("wc", "-c").Output() 16 | fmt.Println(string(out), err) 17 | } 18 | 19 | func ExampleCommandSetDir() { 20 | out, err := sh.Command("pwd", sh.Dir("/")).Output() 21 | fmt.Println(string(out), err) 22 | } 23 | 24 | func ExampleTest() { 25 | if sh.Test("dir", "mydir") { 26 | fmt.Println("mydir exists") 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /plugins/network/vendor/github.com/codeskyblue/go-sh/example_test.go: -------------------------------------------------------------------------------- 1 | package sh_test 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/codeskyblue/go-sh" 7 | ) 8 | 9 | func ExampleCommand() { 10 | out, err := sh.Command("echo", "hello").Output() 11 | fmt.Println(string(out), err) 12 | } 13 | 14 | func ExampleCommandPipe() { 15 | out, err := sh.Command("echo", "-n", "hi").Command("wc", "-c").Output() 16 | fmt.Println(string(out), err) 17 | } 18 | 19 | func ExampleCommandSetDir() { 20 | out, err := sh.Command("pwd", sh.Dir("/")).Output() 21 | fmt.Println(string(out), err) 22 | } 23 | 24 | func ExampleTest() { 25 | if sh.Test("dir", "mydir") { 26 | fmt.Println("mydir exists") 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /docs/appendices/0.9.0-migration-guide.md: -------------------------------------------------------------------------------- 1 | # 0.9.0 Migration Guide 2 | 3 | ## Golang Migration 4 | 5 | There is an ongoing migration to rewrite Dokku in Golang. The reasons are beyond the scope of this document, but this may impact any patches you have for Dokku. As of 0.9.0, only the `repo` plugin is in Golang. 6 | 7 | The following shall remain true, regardless of the state of our rewrite: 8 | 9 | - You will be able to write custom plugins in any language. 10 | - You will be able to enable or disable core plugins. 11 | - `plugn` will continue to be used for executing plugin triggers. 12 | - We will provide bash wrappers that can be sourced to execute core functionality that is implemented in golang. 13 | -------------------------------------------------------------------------------- /plugins/common/vendor/github.com/codeskyblue/go-sh/example/timeout/timeout.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "time" 6 | 7 | sh "github.com/codeskyblue/go-sh" 8 | ) 9 | 10 | func main() { 11 | c := sh.Command("sleep", "3") 12 | c.Start() 13 | err := c.WaitTimeout(time.Second * 1) 14 | if err != nil { 15 | fmt.Printf("timeout should happend: %v\n", err) 16 | } 17 | // timeout should be a session 18 | out, err := sh.Command("sleep", "2").SetTimeout(time.Second).Output() 19 | fmt.Printf("output:(%s), err(%v)\n", string(out), err) 20 | 21 | out, err = sh.Command("echo", "hello").SetTimeout(time.Second).Output() 22 | fmt.Printf("output:(%s), err(%v)\n", string(out), err) 23 | } 24 | -------------------------------------------------------------------------------- /plugins/domains/subcommands/clear: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/domains/functions" 5 | 6 | domains_clear_cmd() { 7 | declare desc="clear all app domains" 8 | local cmd="domains:clear" 9 | [[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on" 10 | verify_app_name "$2" 11 | local APP="$2"; local APP_VHOST_PATH="$DOKKU_ROOT/$APP/VHOST" 12 | 13 | rm -f "$APP_VHOST_PATH" 14 | domains_setup "$APP" 15 | plugn trigger post-domains-update "$APP" "clear" 16 | dokku_log_info1 "Cleared domains in $APP" 17 | } 18 | 19 | domains_clear_cmd "$@" 20 | -------------------------------------------------------------------------------- /plugins/network/vendor/github.com/codeskyblue/go-sh/example/timeout/timeout.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "time" 6 | 7 | sh "github.com/codeskyblue/go-sh" 8 | ) 9 | 10 | func main() { 11 | c := sh.Command("sleep", "3") 12 | c.Start() 13 | err := c.WaitTimeout(time.Second * 1) 14 | if err != nil { 15 | fmt.Printf("timeout should happend: %v\n", err) 16 | } 17 | // timeout should be a session 18 | out, err := sh.Command("sleep", "2").SetTimeout(time.Second).Output() 19 | fmt.Printf("output:(%s), err(%v)\n", string(out), err) 20 | 21 | out, err = sh.Command("echo", "hello").SetTimeout(time.Second).Output() 22 | fmt.Printf("output:(%s), err(%v)\n", string(out), err) 23 | } 24 | -------------------------------------------------------------------------------- /plugins/nginx-vhosts/post-domains-update: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/functions" 5 | source "$PLUGIN_AVAILABLE_PATH/proxy/functions" 6 | 7 | nginx_post_domains_update() { 8 | declare desc="calls nginx build_config when domains are updated" 9 | declare trigger="nginx_post_domains_update" 10 | declare APP="$1" 11 | [[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on" 12 | 13 | if [[ "$(get_app_proxy_type "$APP")" == "nginx" ]]; then 14 | nginx_build_config "$APP" 15 | fi 16 | } 17 | 18 | nginx_post_domains_update "$@" 19 | -------------------------------------------------------------------------------- /plugins/20_events/subcommands/list: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | 5 | events_list_cmd() { 6 | declare desc="lists enabled events" 7 | local cmd="events:list" 8 | local PLUGIN_DIR="$(dirname "$0")/.." 9 | local logged hook 10 | 11 | if [[ "$DOKKU_EVENTS" ]]; then 12 | logged="$(find "$PLUGIN_DIR" -type l -printf '%f\n' 2>/dev/null | sort -n)" 13 | dokku_col_log_info2_quiet "Events currently logged" 14 | 15 | for hook in $logged; do 16 | dokku_col_log_msg "$hook" 17 | done 18 | else 19 | dokku_log_warn "Events logger disabled" 20 | fi 21 | } 22 | 23 | events_list_cmd "$@" 24 | -------------------------------------------------------------------------------- /plugins/proxy/subcommands/set: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/config/functions" 5 | 6 | proxy_set_cmd() { 7 | declare desc="enable proxy for app via command line" 8 | local cmd="proxy:set" 9 | [[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on" 10 | 11 | local APP="$2"; verify_app_name "$APP" 12 | local PROXY_TYPE="$3" 13 | 14 | if [[ -n "$PROXY_TYPE" ]]; then 15 | config_set --no-restart "$APP" DOKKU_APP_PROXY_TYPE="$PROXY_TYPE" 16 | else 17 | dokku_log_fail "Please specify a proxy type!" 18 | fi 19 | } 20 | 21 | proxy_set_cmd "$@" 22 | -------------------------------------------------------------------------------- /docs/assets/favicons/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | #da532c 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /plugins/docker-options/subcommands/default: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/docker-options/functions" 5 | 6 | docker_options_main_cmd() { 7 | declare desc="Display applications docker options" 8 | local cmd="docker-options" 9 | dokku_log_warn "Deprecated: Please use docker-options:report" 10 | 11 | verify_app_name "$2" && local APP="$2" 12 | read -ra passed_phases <<< "$(get_phases "$3")" 13 | if [[ ! "${passed_phases[@]}" ]]; then 14 | display_all_phases_options 15 | else 16 | display_passed_phases_options passed_phases[@] 17 | fi 18 | } 19 | 20 | docker_options_main_cmd "$@" 21 | -------------------------------------------------------------------------------- /plugins/ps/subcommands/restart-policy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/docker-options/functions" 5 | source "$PLUGIN_AVAILABLE_PATH/ps/functions" 6 | 7 | ps_restart_policy_cmd() { 8 | declare desc="shows the restart-policy for an app" 9 | local cmd="ps:restart-policy" 10 | local passed_phases="deploy" 11 | [[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on" 12 | verify_app_name "$2" && local APP="$2" 13 | 14 | dokku_log_info2_quiet "$APP restart-policy:" 15 | get_restart_policies "$(get_phase_file_path "$passed_phases")" 16 | } 17 | 18 | ps_restart_policy_cmd "$@" 19 | -------------------------------------------------------------------------------- /tests/apps/dockerfile/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node-js-sample", 3 | "version": "0.1.0", 4 | "description": "A sample Node.js app using Express 4", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "dependencies": { 10 | "express": "^4.0.0" 11 | }, 12 | "engines": { 13 | "node": "4.2.x" 14 | }, 15 | "repository": { 16 | "type": "git", 17 | "url": "https://github.com/heroku/node-js-sample" 18 | }, 19 | "keywords": [ 20 | "node", 21 | "heroku", 22 | "express" 23 | ], 24 | "author": "Mark Pundsack", 25 | "contributors": [ 26 | "Zeke Sikelianos (http://zeke.sikelianos.com)" 27 | ], 28 | "license": "MIT" 29 | } 30 | -------------------------------------------------------------------------------- /plugins/repo/Makefile: -------------------------------------------------------------------------------- 1 | include ../../common.mk 2 | 3 | GO_ARGS ?= -a 4 | 5 | SUBCOMMANDS = subcommands/gc subcommands/purge-cache 6 | 7 | build-in-docker: clean 8 | docker run --rm \ 9 | -v $$PWD/../..:$(GO_REPO_ROOT) \ 10 | -w $(GO_REPO_ROOT)/plugins/repo \ 11 | $(BUILD_IMAGE) \ 12 | bash -c "GO_ARGS='$(GO_ARGS)' make build" || exit $$? 13 | 14 | build: commands subcommands 15 | 16 | commands: **/**/commands.go 17 | go build $(GO_ARGS) -o commands src/commands/commands.go 18 | 19 | subcommands: $(SUBCOMMANDS) 20 | 21 | subcommands/%: src/subcommands/*/%.go 22 | go build $(GO_ARGS) -o $@ $< 23 | 24 | clean: 25 | rm -rf commands subcommands 26 | 27 | src-clean: 28 | rm -rf .gitignore src triggers vendor Makefile *.go 29 | -------------------------------------------------------------------------------- /tests/apps/dockerfile-noexpose/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node-js-sample", 3 | "version": "0.1.0", 4 | "description": "A sample Node.js app using Express 4", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "dependencies": { 10 | "express": "^4.0.0" 11 | }, 12 | "engines": { 13 | "node": "4.2.x" 14 | }, 15 | "repository": { 16 | "type": "git", 17 | "url": "https://github.com/heroku/node-js-sample" 18 | }, 19 | "keywords": [ 20 | "node", 21 | "heroku", 22 | "express" 23 | ], 24 | "author": "Mark Pundsack", 25 | "contributors": [ 26 | "Zeke Sikelianos (http://zeke.sikelianos.com)" 27 | ], 28 | "license": "MIT" 29 | } 30 | -------------------------------------------------------------------------------- /plugins/nginx-vhosts/post-certs-remove: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/config/functions" 5 | source "$PLUGIN_AVAILABLE_PATH/proxy/functions" 6 | 7 | nginx_post_certs_remove() { 8 | declare desc="unset port config vars after SSL cert is removed" 9 | local trigger="nginx_post_certs_remove" 10 | local APP="$1" 11 | if [[ "$(get_app_proxy_type "$APP")" == "nginx" ]]; then 12 | config_unset --no-restart "$APP" DOKKU_PROXY_SSL_PORT 13 | 14 | # shellcheck disable=SC2046 15 | remove_proxy_ports "$APP" $(filter_app_proxy_ports "$APP" "https" "443") 16 | fi 17 | } 18 | 19 | nginx_post_certs_remove "$@" 20 | -------------------------------------------------------------------------------- /plugins/scheduler-docker-local/pre-restore: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | 5 | scheduler-docker-local-pre-restore() { 6 | declare desc="scheduler-docker-local pre-restore plugin trigger" 7 | declare trigger="scheduler-docker-local pre-restore" 8 | declare DOKKU_SCHEDULER="$1" 9 | 10 | if [[ "$DOKKU_SCHEDULER" != "docker-local" ]]; then 11 | return 12 | fi 13 | 14 | # delete all "old" containers 15 | # shellcheck disable=SC2046 16 | docker rm $(docker ps --format "{{.Names}}" -a -f "label=$DOKKU_CONTAINER_LABEL" -q | grep -E '(.+\..+\.[0-9]+\.[0-9]+$)') &> /dev/null || true 17 | } 18 | 19 | scheduler-docker-local-pre-restore "$@" 20 | -------------------------------------------------------------------------------- /plugins/apps/post-delete: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | 5 | app_post_delete() { 6 | declare desc="apps post-delete plugin trigger" 7 | local trigger="app_post_delete" 8 | local APP="$1"; local IMAGE_REPO=$(get_app_image_repo "$APP") 9 | if [[ -n $APP ]]; then 10 | # remove contents for apps that are symlinks to other folders 11 | rm -rf "${DOKKU_ROOT:?}/$APP/" > /dev/null 12 | # then remove the folder and/or the symlink 13 | rm -rf "${DOKKU_ROOT:?}/$APP" > /dev/null 14 | fi 15 | 16 | # shellcheck disable=SC2046 17 | docker rmi $(docker images -q "$IMAGE_REPO" | xargs) &>/dev/null || true 18 | } 19 | 20 | app_post_delete "$@" 21 | -------------------------------------------------------------------------------- /plugins/00_dokku-standard/docker-args-build: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_AVAILABLE_PATH/config/functions" 4 | 5 | app_user_docker_args() { 6 | local APP="$1" 7 | local STDIN 8 | local DOKKU_APP_TYPE 9 | local DOKKU_APP_USER 10 | 11 | STDIN=$(cat) 12 | DOKKU_APP_TYPE=$(config_get "$APP" DOKKU_APP_TYPE || true) 13 | DOKKU_APP_USER=$(config_get "$APP" DOKKU_APP_USER || true) 14 | DOKKU_APP_USER=${DOKKU_APP_USER:="herokuishuser"} 15 | 16 | if [[ "$DOKKU_APP_TYPE" == "herokuish" ]]; then 17 | local docker_args="$STDIN --env=USER=${DOKKU_APP_USER}" 18 | else 19 | local docker_args="$STDIN" 20 | fi 21 | 22 | echo -n "$docker_args" 23 | } 24 | 25 | app_user_docker_args "$@" 26 | -------------------------------------------------------------------------------- /plugins/common/vendor/github.com/codeskyblue/go-sh/wercker.yml: -------------------------------------------------------------------------------- 1 | box: wercker/golang 2 | # Build definition 3 | build: 4 | # The steps that will be executed on build 5 | steps: 6 | # Sets the go workspace and places you package 7 | # at the right place in the workspace tree 8 | - setup-go-workspace 9 | 10 | # Gets the dependencies 11 | - script: 12 | name: go get 13 | code: | 14 | cd $WERCKER_SOURCE_DIR 15 | go version 16 | go get -t . 17 | 18 | # Build the project 19 | - script: 20 | name: go build 21 | code: | 22 | go build . 23 | 24 | # Test the project 25 | - script: 26 | name: go test 27 | code: | 28 | go test -v ./... 29 | -------------------------------------------------------------------------------- /plugins/network/src/subcommands/report/report.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "strings" 6 | 7 | "github.com/dokku/dokku/plugins/common" 8 | "github.com/dokku/dokku/plugins/network" 9 | ) 10 | 11 | // displays a network report for one or more apps 12 | func main() { 13 | flag.Parse() 14 | appName := flag.Arg(1) 15 | infoFlag := flag.Arg(2) 16 | 17 | if strings.HasPrefix(appName, "--") { 18 | infoFlag = appName 19 | appName = "" 20 | } 21 | 22 | if len(appName) == 0 { 23 | apps, err := common.DokkuApps() 24 | if err != nil { 25 | return 26 | } 27 | for _, appName := range apps { 28 | network.ReportSingleApp(appName, infoFlag) 29 | } 30 | return 31 | } 32 | 33 | network.ReportSingleApp(appName, infoFlag) 34 | } 35 | -------------------------------------------------------------------------------- /plugins/network/vendor/github.com/codeskyblue/go-sh/wercker.yml: -------------------------------------------------------------------------------- 1 | box: wercker/golang 2 | # Build definition 3 | build: 4 | # The steps that will be executed on build 5 | steps: 6 | # Sets the go workspace and places you package 7 | # at the right place in the workspace tree 8 | - setup-go-workspace 9 | 10 | # Gets the dependencies 11 | - script: 12 | name: go get 13 | code: | 14 | cd $WERCKER_SOURCE_DIR 15 | go version 16 | go get -t . 17 | 18 | # Build the project 19 | - script: 20 | name: go build 21 | code: | 22 | go build . 23 | 24 | # Test the project 25 | - script: 26 | name: go test 27 | code: | 28 | go test -v ./... 29 | -------------------------------------------------------------------------------- /plugins/nginx-vhosts/proxy-build-config: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/functions" 5 | source "$PLUGIN_AVAILABLE_PATH/proxy/functions" 6 | 7 | nginx_proxy_build_config() { 8 | declare desc="build nginx config to proxy app containers from command line" 9 | declare trigger="nginx_proxy_build_config" 10 | declare APP="$1" 11 | [[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on" 12 | 13 | if [[ "$(get_app_proxy_type "$APP")" = "nginx" ]]; then 14 | plugn trigger network-build-config "$APP" 15 | nginx_build_config "$APP" 16 | fi 17 | } 18 | 19 | nginx_proxy_build_config "$@" 20 | -------------------------------------------------------------------------------- /plugins/config/src/subcommands/export/export.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "os" 6 | 7 | "github.com/dokku/dokku/plugins/config" 8 | ) 9 | 10 | // print the environment to stdout 11 | func main() { 12 | const defaultPrefix = "export " 13 | const defaultSeparator = "\n" 14 | args := flag.NewFlagSet("config:export", flag.ExitOnError) 15 | global := args.Bool("global", false, "--global: use the global environment") 16 | merged := args.Bool("merged", false, "--merged: merge app environment and global environment") 17 | format := args.String("format", "exports", "--format: [ exports | envfile | docker-args | shell ] which format to export as)") 18 | args.Parse(os.Args[2:]) 19 | config.CommandExport(args.Args(), *global, *merged, *format) 20 | } 21 | -------------------------------------------------------------------------------- /plugins/repo/src/subcommands/gc/gc.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "strings" 6 | 7 | "github.com/dokku/dokku/plugins/common" 8 | ) 9 | 10 | // runs 'git gc --aggressive' against the application's repo 11 | func main() { 12 | flag.Parse() 13 | appName := flag.Arg(1) 14 | if appName == "" { 15 | common.LogFail("Please specify an app to run the command on") 16 | } 17 | err := common.VerifyAppName(appName) 18 | if err != nil { 19 | common.LogFail(err.Error()) 20 | } 21 | 22 | appRoot := strings.Join([]string{common.MustGetEnv("DOKKU_ROOT"), appName}, "/") 23 | cmdEnv := map[string]string{ 24 | "GIT_DIR": appRoot, 25 | } 26 | gitGcCmd := common.NewShellCmd("git gc --aggressive") 27 | gitGcCmd.Env = cmdEnv 28 | gitGcCmd.Execute() 29 | } 30 | -------------------------------------------------------------------------------- /plugins/proxy/subcommands/default: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/proxy/functions" 5 | 6 | proxy_main_cmd() { 7 | declare desc="displays app proxy implementation via command line" 8 | local cmd="proxy" 9 | [[ "$1" == "$cmd" ]] && shift 1 10 | local APPS=$(dokku_apps) 11 | if [[ -n "$1" ]]; then 12 | local APPS="$1" 13 | fi 14 | 15 | dokku_log_warn "Deprecated: Please use proxy:report" 16 | dokku_col_log_info1_quiet "App Name" "Proxy Type" 17 | local app 18 | for app in $APPS; do 19 | verify_app_name "$app" 20 | dokku_col_log_msg "$app" "$(get_app_proxy_type "$app")" 21 | done 22 | } 23 | 24 | proxy_main_cmd "$@" 25 | -------------------------------------------------------------------------------- /plugins/docker-options/subcommands/add: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/docker-options/functions" 5 | 6 | docker_options_add_cmd() { 7 | declare desc="Add a docker option to application" 8 | local cmd="docker-options:add" 9 | 10 | verify_app_name "$2" && local APP="$2" 11 | read -ra passed_phases <<< "$(get_phases "$3")" 12 | shift 3 # everything else passed is the docker option 13 | local passed_docker_option="$*" 14 | [[ -z "$passed_docker_option" ]] && dokku_log_fail "Please specify docker options to add to the phase" 15 | add_passed_docker_option passed_phases[@] "${passed_docker_option[@]}" 16 | } 17 | 18 | docker_options_add_cmd "$@" 19 | -------------------------------------------------------------------------------- /plugins/config/docker-args-deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/config/functions" 5 | 6 | config_docker_args() { 7 | declare desc="config docker-args plugin trigger" 8 | declare APP="$1" IMAGE_TAG="$2" 9 | local ENV_ARGS IMAGE STDIN trigger 10 | 11 | IMAGE=$(get_deploying_app_image_name "$APP" "$IMAGE_TAG") 12 | STDIN=$(cat); 13 | trigger="$0 config_docker_args" 14 | verify_app_name "$APP" 15 | 16 | if ! is_image_herokuish_based "$IMAGE"; then 17 | ENV_ARGS="$(config_export app "$APP" --format docker-args --merged)" 18 | echo -n "$STDIN $ENV_ARGS" 19 | else 20 | echo -n "$STDIN" 21 | fi 22 | } 23 | 24 | config_docker_args "$@" 25 | -------------------------------------------------------------------------------- /plugins/00_dokku-standard/subcommands/trace: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | 5 | dokku_trace_cmd() { 6 | declare desc="enables/disables DOKKU_TRACE" 7 | local cmd="trace" 8 | [[ -d $DOKKU_ROOT/.dokkurc ]] || mkdir -p "$DOKKU_ROOT/.dokkurc" 9 | [[ "$2" == "on" ]] || [[ "$2" == "off" ]] || { 10 | dokku_log_fail "Valid trace options are [on/off]" 11 | } 12 | 13 | if [[ "$2" == "on" ]]; then 14 | echo "Enabling dokku trace" 15 | echo "export DOKKU_TRACE=1" > "$DOKKU_ROOT/.dokkurc/DOKKU_TRACE" 16 | fi 17 | 18 | if [[ "$2" == "off" ]]; then 19 | echo "Disabling dokku trace" 20 | rm -f "$DOKKU_ROOT/.dokkurc/DOKKU_TRACE" 21 | fi 22 | } 23 | 24 | dokku_trace_cmd "$@" 25 | -------------------------------------------------------------------------------- /plugins/nginx-vhosts/proxy-clear-config: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/internal-functions" 5 | source "$PLUGIN_AVAILABLE_PATH/proxy/functions" 6 | 7 | trigger-nginx-vhosts-clear-config() { 8 | declare desc="clear nginx config for proxy app containers from command line" 9 | declare trigger="trigger-nginx-vhosts-clear-config" 10 | declare APP="$1" 11 | [[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on" 12 | 13 | if [[ "$(get_app_proxy_type "$APP")" = "nginx" ]]; then 14 | plugn trigger network-clear-config "$APP" 15 | nginx_clear_config "$APP" 16 | fi 17 | } 18 | 19 | trigger-nginx-vhosts-clear-config "$@" 20 | -------------------------------------------------------------------------------- /tests/apps/multi/Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | chunky_png (1.3.3) 5 | compass (1.0.1) 6 | chunky_png (~> 1.2) 7 | compass-core (~> 1.0.1) 8 | compass-import-once (~> 1.0.5) 9 | rb-fsevent (>= 0.9.3) 10 | rb-inotify (>= 0.9) 11 | sass (>= 3.3.13, < 3.5) 12 | compass-core (1.0.1) 13 | multi_json (~> 1.0) 14 | sass (>= 3.3.0, < 3.5) 15 | compass-import-once (1.0.5) 16 | sass (>= 3.2, < 3.5) 17 | ffi (1.9.6) 18 | multi_json (1.10.1) 19 | rb-fsevent (0.9.4) 20 | rb-inotify (0.9.5) 21 | ffi (>= 0.5.0) 22 | sass (3.4.9) 23 | sass-globbing (1.1.1) 24 | sass (>= 3.1) 25 | 26 | PLATFORMS 27 | ruby 28 | 29 | DEPENDENCIES 30 | compass (>= 1.0.1) 31 | sass-globbing 32 | -------------------------------------------------------------------------------- /docs/appendices/0.10.0-migration-guide.md: -------------------------------------------------------------------------------- 1 | # 0.10.0 Migration Guide 2 | 3 | ## PCI Compliance 4 | 5 | By default, Dokku will ship a PCI Compliant nginx configuration. For developers whose users are on older browsers or mobile devices, you may need to ship a custom `nginx.conf.sigil` to enable ciphers for older browsers. 6 | 7 | See the [nginx customization](/docs/configuration/nginx/#customizing-the-nginx-configuration) docs for more details. 8 | 9 | ## Nginx Error Pages 10 | 11 | We now ship with nicer error pages by default. You are free to customize your Dokku installation via a custom `nginx.conf.sigil` to change what error pages are displayed in different circumstances. 12 | 13 | See the [nginx customization](/docs/configuration/nginx/#customizing-the-nginx-configuration) docs for more details. 14 | -------------------------------------------------------------------------------- /plugins/config/Makefile: -------------------------------------------------------------------------------- 1 | include ../../common.mk 2 | 3 | GO_ARGS ?= -a 4 | 5 | SUBCOMMANDS = subcommands/export subcommands/get subcommands/set subcommands/unset subcommands/keys subcommands/bundle 6 | 7 | build-in-docker: clean 8 | docker run --rm \ 9 | -v $$PWD/../..:$(GO_REPO_ROOT) \ 10 | -w $(GO_REPO_ROOT)/plugins/config \ 11 | $(BUILD_IMAGE) \ 12 | bash -c "GO_ARGS='$(GO_ARGS)' make build" || exit $$? 13 | 14 | build: commands subcommands 15 | 16 | commands: **/**/commands.go 17 | go build $(GO_ARGS) -o commands src/commands/commands.go 18 | 19 | subcommands: $(SUBCOMMANDS) 20 | 21 | subcommands/%: src/subcommands/*/%.go 22 | go build $(GO_ARGS) -o $@ $< 23 | 24 | clean: 25 | rm -rf commands subcommands 26 | 27 | src-clean: 28 | rm -rf .gitignore src triggers vendor Makefile *.go 29 | -------------------------------------------------------------------------------- /plugins/docker-options/subcommands/remove: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/docker-options/functions" 5 | 6 | docker_options_remove_cmd() { 7 | declare desc="Remove a docker option from application" 8 | local cmd="docker-options:remove" 9 | 10 | verify_app_name "$2" && local APP="$2" 11 | read -ra passed_phases <<< "$(get_phases "$3")" 12 | shift 3 # everything else passed is the docker option 13 | # shellcheck disable=SC2154 14 | [[ -z ${passed_docker_option="$@"} ]] && dokku_log_fail "Please specify docker options to remove from the phase" 15 | remove_passed_docker_option passed_phases[@] "${passed_docker_option[@]}" 16 | } 17 | 18 | docker_options_remove_cmd "$@" 19 | -------------------------------------------------------------------------------- /plugins/nginx-vhosts/subcommands/build-config: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/proxy/functions" 5 | 6 | nginx_build_config_cmd() { 7 | declare desc="build nginx config to proxy app containers from command line" 8 | declare APP="$2" 9 | local cmd="nginx:build-config" 10 | [[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on" 11 | local PROXY_APP_TYPE 12 | PROXY_APP_TYPE="$(get_app_proxy_type "$APP")" 13 | 14 | if [[ "$PROXY_APP_TYPE" == "nginx" ]]; then 15 | plugn trigger proxy-build-config "$APP" 16 | else 17 | dokku_log_fail "Configured proxy for ${APP} is ${PROXY_APP_TYPE}" 18 | fi 19 | } 20 | 21 | nginx_build_config_cmd "$@" 22 | -------------------------------------------------------------------------------- /plugins/ps/install: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/docker-options/functions" 5 | source "$PLUGIN_AVAILABLE_PATH/ps/functions" 6 | 7 | set_default_restart_policies() { 8 | declare desc="set the default restart policy for all applications if there is not one already set" 9 | local APPS="$(dokku_apps)" 10 | local APP 11 | 12 | for APP in $APPS; do 13 | local RESTART_POLICIES=$(get_restart_policies "$(get_phase_file_path "deploy")") 14 | if [[ -z "$RESTART_POLICIES" ]]; then 15 | local passed_phases=(deploy) 16 | add_passed_docker_option passed_phases[@] "--restart=on-failure:10" 17 | fi 18 | done 19 | } 20 | 21 | set_default_restart_policies "$@" 22 | -------------------------------------------------------------------------------- /plugins/certs/subcommands/remove: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | 5 | certs_remove_cmd() { 6 | declare desc="removes SSL cert/key from specified app" 7 | local cmd="certs:remove" 8 | [[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on" 9 | verify_app_name "$2" 10 | local APP="$2"; local APP_SSL_PATH="$DOKKU_ROOT/$APP/tls" 11 | 12 | if [[ -d "$APP_SSL_PATH" ]]; then 13 | dokku_log_info1 "Removing SSL endpoint from $APP" 14 | rm -rf "$APP_SSL_PATH" 15 | plugn trigger post-certs-remove "$APP" 16 | plugn trigger post-domains-update "$APP" 17 | else 18 | dokku_log_fail "An app-specific SSL endpoint is not defined" 19 | fi 20 | } 21 | 22 | certs_remove_cmd "$@" 23 | -------------------------------------------------------------------------------- /plugins/proxy/subcommands/ports-remove: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/proxy/functions" 5 | 6 | proxy_ports_remove_cmd() { 7 | declare desc="remove specific proxy port mappings from an app" 8 | local cmd="proxy:ports-remove" 9 | local APP="$2"; verify_app_name "$APP" 10 | shift 2 11 | 12 | local INPUT_PORTS="$*" 13 | if [[ -z "$INPUT_PORTS" ]]; then 14 | dokku_log_warn "No port mapping specified. Please supply a valid configured host port" 15 | list_app_proxy_ports "$APP" 16 | dokku_log_fail "exiting..." 17 | fi 18 | 19 | remove_proxy_ports "$APP" "$@" 20 | plugn trigger post-proxy-ports-update "$APP" "remove" 21 | } 22 | 23 | proxy_ports_remove_cmd "$@" 24 | -------------------------------------------------------------------------------- /plugins/apps/pre-delete: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | 5 | apps_pre_delete() { 6 | declare desc="apps pre-delete plugin trigger" 7 | local trigger="apps_pre_delete" 8 | local APP="$1"; local IMAGE_TAG="$2"; local IMAGE=$(get_deploying_app_image_name "$APP" "$IMAGE_TAG"); local CACHE_DIR="$DOKKU_ROOT/$APP/cache"; local CACHE_HOST_DIR="$DOKKU_HOST_ROOT/$APP/cache" 9 | verify_app_name "$APP" 10 | 11 | if ! is_image_herokuish_based "$IMAGE"; then 12 | return 13 | fi 14 | 15 | if [[ -d $CACHE_DIR ]]; then 16 | docker run "$DOKKU_GLOBAL_RUN_ARGS" --rm -v "$CACHE_HOST_DIR:/cache" "$IMAGE" find /cache -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} \; || true 17 | fi 18 | } 19 | 20 | apps_pre_delete "$@" 21 | -------------------------------------------------------------------------------- /plugins/nginx-vhosts/templates/500-error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | We're sorry, but something went wrong (500) 5 | 6 | 24 | 25 | 26 | 27 |
28 |

We're sorry, but something went wrong.

29 |

If you are the application owner check the logs for more information.

30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /tests/unit/10_repo.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | load test_helper 4 | 5 | setup() { 6 | global_setup 7 | deploy_app 8 | } 9 | 10 | teardown() { 11 | destroy_app 12 | global_teardown 13 | } 14 | 15 | @test "(repo) repo:gc, repo:purge-cache" { 16 | run dokku repo:gc $TEST_APP 17 | echo "output: "$output 18 | echo "status: "$status 19 | assert_success 20 | 21 | run bash -c "find $DOKKU_ROOT/$TEST_APP/cache -type f | wc -l | grep 0" 22 | echo "output: "$output 23 | echo "status: "$status 24 | assert_failure 25 | run dokku repo:purge-cache $TEST_APP 26 | echo "output: "$output 27 | echo "status: "$status 28 | assert_success 29 | run bash -c "find $DOKKU_ROOT/$TEST_APP/cache -type f | wc -l | grep 0" 30 | echo "output: "$output 31 | echo "status: "$status 32 | assert_success 33 | } 34 | -------------------------------------------------------------------------------- /docs/appendices/0.8.0-migration-guide.md: -------------------------------------------------------------------------------- 1 | # 0.8.0 Migration Guide 2 | 3 | ## Domain Management 4 | 5 | You can now set global and app domains via `domains:set` and `domains:set-global`. See the [domains documentation](/docs/configuration/domains/) for more details. 6 | 7 | ## Plugin Uninstallation 8 | 9 | A new `uninstall` plugin trigger was introduced. This functionality may be in use for newer plugins, so be aware that older Dokku versions may require manual cleanup. 10 | 11 | See the [uninstall trigger documentation](/docs/development/plugin-triggers/#uninstall) for implementation instructions. 12 | 13 | ## Deployment Tasks 14 | 15 | Should a pre or post deployment task fail, we now fail the entire deploy. 16 | 17 | ## Nginx HTTP2 Support 18 | 19 | Due to bugs in Nginx, the minimum version for HTTP2 is now 1.11.5. 20 | -------------------------------------------------------------------------------- /plugins/nginx-vhosts/templates/400-error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | The page you were looking for cannot be served (4xx) 5 | 6 | 24 | 25 | 26 | 27 |
28 |

The page you were looking for cannot be served.

29 |

If you are the application owner check the logs for more information.

30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /contrib/packer.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | { 4 | "type": "digitalocean", 5 | "region": "nyc3", 6 | "image": "ubuntu-14-04-x64" 7 | } 8 | ], 9 | "provisioners": [ 10 | { 11 | "type": "file", 12 | "source": "deb.mk", 13 | "destination": "/tmp/Makefile" 14 | }, 15 | { 16 | "type": "shell", 17 | "inline": [ 18 | "echo '--> Waiting 30 seconds for core services to be available'", 19 | "sleep 30", 20 | 21 | "echo '--> Updating apt repositories'", 22 | "sudo apt-get update -qq > /dev/null", 23 | 24 | "echo '--> Installing make requirement'", 25 | "sudo apt-get -qq -y install build-essential", 26 | 27 | "cd /tmp && make install-from-deb", 28 | "rm /root/.ssh/authorized_keys" 29 | ] 30 | } 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /plugins/apps/subcommands/unlock: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/apps/internal-functions" 5 | 6 | apps_unlock_cmd() { 7 | declare desc="removes the '.deploy.lock' file from an application's repo" 8 | declare cmd="apps:unlock" 9 | [[ "$1" == "$cmd" ]] && shift 1 10 | declare APP="$1"; verify_app_name "$APP" 11 | 12 | if [[ -f "$DOKKU_ROOT/$APP/.deploy.lock" ]]; then 13 | dokku_log_warn "A deploy may be in progress." 14 | dokku_log_warn "Removing the application lock will not stop in progress deploys." 15 | fi 16 | 17 | rm -f "$DOKKU_ROOT/$APP/.deploy.lock" || dokku_log_fail "Unable to remove deploy lock" 18 | 19 | dokku_log_info1 "Deploy lock removed." 20 | } 21 | 22 | apps_unlock_cmd "$@" 23 | -------------------------------------------------------------------------------- /tests/ci/setup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -eo pipefail 4 | 5 | # shellcheck disable=SC2120 6 | setup_circle() { 7 | echo "=====> setup_circle on CIRCLE_NODE_INDEX: $CIRCLE_NODE_INDEX" 8 | sudo -E CI=true make -e sshcommand 9 | # need to add the dokku user to the docker group 10 | sudo usermod -G docker dokku 11 | [[ "$1" == "buildstack" ]] && BUILD_STACK=true make -e stack 12 | sudo -E CI=true make -e install 13 | sudo -E make -e setup-deploy-tests 14 | bash --version 15 | docker version 16 | lsb_release -a 17 | # setup .dokkurc 18 | sudo -E mkdir -p /home/dokku/.dokkurc 19 | sudo -E chown dokku:ubuntu /home/dokku/.dokkurc 20 | sudo -E chmod 775 /home/dokku/.dokkurc 21 | # pull node:4 image for testing 22 | sudo docker pull node:4 23 | } 24 | 25 | # shellcheck disable=SC2119 26 | setup_circle 27 | exit $? 28 | -------------------------------------------------------------------------------- /plugins/storage/functions: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/docker-options/functions" 5 | 6 | verify_paths() { 7 | declare desc="verifies storage paths" 8 | echo "$1" | grep -qe '^/.*\:/' || dokku_log_fail "Storage path must be two valid paths divided by colon." 9 | } 10 | 11 | check_if_path_exists() { 12 | declare desc="checks if path exists" 13 | local -r passed_path=$1 14 | local -r phase_file_path=$2 15 | [[ -r "$phase_file_path" ]] && grep -qe "^-v $passed_path" "$phase_file_path" 16 | } 17 | 18 | get_bind_mounts() { 19 | declare desc="strips docker options and prints mounts" 20 | local -r phase_file_path=$1 21 | [[ -r "$phase_file_path" ]] && sed -e '/^-v/!d' -e 's/^-v/ /' < "$phase_file_path" 22 | } 23 | -------------------------------------------------------------------------------- /docs/appendices/0.7.0-migration-guide.md: -------------------------------------------------------------------------------- 1 | # 0.7.0 Migration Guide 2 | 3 | ## Persistent Storage 4 | 5 | We should now properly handle file ownership for mounted directories. This was enhanced in 0.7.1. See the [persistent storage documentation](/docs/advanced-usage/persistent-storage.md) for more details. 6 | 7 | ## Restart Policies 8 | 9 | If you previously managed container restart policies via docker-options, these can now be managed natively via the built-in `ps` plugin. There is no migration necessary. See the [restart policy documentation](/docs/deployment/process-management.md#restart-policies) for more details. 10 | 11 | ## SSH Keys 12 | 13 | Dokku now has an `ssh-keys` plugin that can be used to manage ssh keys for the `dokku` user on the host operating system. See the [user management documentation](/docs/deployment/user-management.md) for more details. 14 | -------------------------------------------------------------------------------- /plugins/storage/subcommands/mount: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/storage/functions" 5 | source "$PLUGIN_AVAILABLE_PATH/docker-options/functions" 6 | 7 | storage_mount_cmd() { 8 | declare desc="Add bind-mount, redeploy app if running" 9 | local cmd="storage:mount" 10 | local passed_phases=(deploy run) 11 | [[ -z $3 || $4 ]] && dokku_log_fail "storage:mount requires an app and a two paths divided by colon." 12 | verify_app_name "$2" && local APP="$2" 13 | verify_paths "$3" && local MOUNT_PATH="$3" 14 | check_if_path_exists "$MOUNT_PATH" "$(get_phase_file_path "${passed_phases[@]}")" && dokku_log_fail "Mount path already exists." 15 | add_passed_docker_option passed_phases[@] "-v $MOUNT_PATH" 16 | } 17 | 18 | storage_mount_cmd "$@" 19 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Package: dokku 2 | Version: 0.12.12 3 | Section: web 4 | Priority: optional 5 | Architecture: amd64 6 | Depends: locales, git, make, curl, gcc, man-db, netcat, sshcommand (>= 0.6.0), gliderlabs-sigil, docker-engine-cs (>= 1.7.1) | docker-engine (>= 1.7.1) | docker-io (>= 1.7.1) | docker-ce | docker-ee, net-tools, software-properties-common, python-software-properties | python3-software-properties, rsyslog 7 | Recommends: herokuish (>= 0.3.4), parallel, dokku-update 8 | Pre-Depends: nginx (>= 1.8.0) | openresty, dnsutils, cgroupfs-mount | cgroup-lite, plugn (>= 0.3.0), sudo, python2.7, debconf 9 | Maintainer: Jose Diaz-Gonzalez 10 | Description: Docker-powered PaaS that helps build and manage the lifecycle of applications 11 | Dokku is an extensible, open source Platform as a Service 12 | that runs on a single server of your choice. 13 | -------------------------------------------------------------------------------- /plugins/storage/subcommands/unmount: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/storage/functions" 5 | source "$PLUGIN_AVAILABLE_PATH/docker-options/functions" 6 | 7 | storage_unmount_cmd() { 8 | declare desc="Remove bind-mount, restart app if running" 9 | local cmd="storage:unmount" 10 | local passed_phases=(deploy run) 11 | [[ -z $3 || $4 ]] && dokku_log_fail "storage:unmount requires an app and a two paths divided by colon." 12 | verify_app_name "$2" && local APP="$2" 13 | verify_paths "$3" && local MOUNT_PATH="$3" 14 | check_if_path_exists "$MOUNT_PATH" "$(get_phase_file_path "${passed_phases[@]}")" || dokku_log_fail "Mount path does not exist." 15 | remove_passed_docker_option passed_phases[@] "-v $MOUNT_PATH" 16 | } 17 | 18 | storage_unmount_cmd "$@" 19 | -------------------------------------------------------------------------------- /plugins/tar/internal-functions: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | 4 | tar_help_content_func() { 5 | declare desc="return tar plugin help content" 6 | cat<, Reads an tarball containing the app from stdin 8 | tar:from , Loads an app tarball from url 9 | help_content 10 | } 11 | 12 | tar_help_cmd() { 13 | if [[ $1 = "tar:help" ]] ; then 14 | echo -e 'Usage: dokku tar[:COMMAND]' 15 | echo '' 16 | echo 'An alternative to using git, apps are loaded via tarballs instead.' 17 | echo '' 18 | echo 'Additional commands:' 19 | tar_help_content_func | sort | column -c2 -t -s, 20 | elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then 21 | tar_help_content_func 22 | else 23 | cat< 2 | 3 | 4 | The page you were looking for doesn't exist (404) 5 | 6 | 24 | 25 | 26 | 27 |
28 |

The page you were looking for doesn't exist.

29 |

You may have mistyped the address or the page may have moved.

30 |

If you are the application owner check the logs for more information.

31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /plugins/shell/commands: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | [[ " help shell:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT" 3 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 4 | 5 | case "$1" in 6 | help | shell:help) 7 | help_content_func () { 8 | declare desc="return shell plugin help content" 9 | cat< [ || --container-id ], Connect to a specific app container 11 | help_content 12 | } 13 | 14 | if [[ $1 = "enter:help" ]] ; then 15 | echo -e 'Usage: dokku enter ' 16 | echo '' 17 | echo 'Allows you to access a bash prompt inside the container of the app.' 18 | echo '' 19 | echo 'Additional commands:' 20 | help_content_func | sort | column -c2 -t -s, 21 | else 22 | help_content_func 23 | fi 24 | ;; 25 | 26 | *) 27 | exit "$DOKKU_NOT_IMPLEMENTED_EXIT" 28 | ;; 29 | 30 | esac 31 | -------------------------------------------------------------------------------- /plugins/domains/subcommands/default: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/domains/functions" 5 | 6 | domains_main_cmd() { 7 | declare desc="print app domains" 8 | local cmd="domains" 9 | local APP="$2" 10 | 11 | dokku_log_warn "Deprecated: Please use domains:report" 12 | if [[ "$(is_global_vhost_enabled)" == "true" ]]; then 13 | dokku_log_info2_quiet "Global Domain Name" 14 | get_global_vhosts 15 | fi 16 | 17 | if [[ "$APP" == "--global" ]]; then 18 | return 19 | fi 20 | 21 | if [[ -n "$APP" ]]; then 22 | verify_app_name "$APP" 23 | if [[ -f "$DOKKU_ROOT/$APP/VHOST" ]]; then 24 | dokku_log_info2_quiet "$APP Domain Names" 25 | get_app_domains "$APP" 26 | else 27 | dokku_log_fail "No domain names set for $APP" 28 | fi 29 | fi 30 | } 31 | 32 | domains_main_cmd "$@" 33 | -------------------------------------------------------------------------------- /plugins/plugin/subcommands/install: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/plugin/functions" 5 | source "$PLUGIN_AVAILABLE_PATH/plugin/internal-functions" 6 | 7 | plugin_install_cmd() { 8 | declare desc="installs a plugin from URL and calls install plugin trigger via command line" 9 | local cmd="plugin:install" 10 | case "$2" in 11 | --core) 12 | [[ "$#" -gt 2 ]] && dokku_log_info1_quiet "Cannot install additional core plugins, running core plugin install trigger" 13 | PLUGIN_PATH="$PLUGIN_CORE_PATH" plugn trigger install 14 | ;; 15 | https:*|git*|ssh:*|*.tar.gz|*.tgz) 16 | shift 17 | download_and_enable_plugin "$@" 18 | plugn trigger install 19 | ;; 20 | *) 21 | plugn trigger install 22 | ;; 23 | esac 24 | plugin_prime_bash_completion 25 | } 26 | 27 | plugin_install_cmd "$@" 28 | -------------------------------------------------------------------------------- /plugins/proxy/subcommands/enable: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/config/functions" 5 | source "$PLUGIN_AVAILABLE_PATH/proxy/functions" 6 | 7 | proxy_enable_cmd() { 8 | declare desc="enable proxy for app via command line" 9 | local cmd="proxy:enable" 10 | [[ -z $1 ]] && dokku_log_fail "Please specify an app to run the command on" 11 | local APP="$1"; verify_app_name "$APP" 12 | 13 | if [[ "$(is_app_proxy_enabled "$APP")" == "false" ]]; then 14 | dokku_log_info1 "Enabling proxy for app ($APP)" 15 | [[ "$2" == "--no-restart" ]] && local CONFIG_SET_ARGS=$2 16 | # shellcheck disable=SC2086 17 | config_unset $CONFIG_SET_ARGS $APP DOKKU_DISABLE_PROXY 18 | plugn trigger proxy-enable "$APP" 19 | else 20 | dokku_log_info1 "proxy is already enabled for app ($APP)" 21 | fi 22 | } 23 | 24 | proxy_enable_cmd "$2" --no-restart 25 | -------------------------------------------------------------------------------- /tests/apps/java/src/main/java/HelloWorld.java: -------------------------------------------------------------------------------- 1 | import java.io.IOException; 2 | import javax.servlet.ServletException; 3 | import javax.servlet.http.*; 4 | import org.eclipse.jetty.server.Server; 5 | import org.eclipse.jetty.servlet.*; 6 | 7 | public class HelloWorld extends HttpServlet { 8 | @Override 9 | protected void doGet(HttpServletRequest req, HttpServletResponse resp) 10 | throws ServletException, IOException { 11 | resp.getWriter().print("Hello from Java!\n"); 12 | } 13 | public static void main(String[] args) throws Exception{ 14 | Server server = new Server(Integer.valueOf(System.getenv("PORT"))); 15 | ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS); 16 | context.setContextPath("/"); 17 | server.setHandler(context); 18 | context.addServlet(new ServletHolder(new HelloWorld()),"/*"); 19 | server.start(); 20 | server.join(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /plugins/proxy/subcommands/disable: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | source "$PLUGIN_AVAILABLE_PATH/config/functions" 5 | source "$PLUGIN_AVAILABLE_PATH/proxy/functions" 6 | 7 | proxy_disable_cmd() { 8 | declare desc="disable proxy for app via command line" 9 | local cmd="proxy:disable" 10 | [[ -z $1 ]] && dokku_log_fail "Please specify an app to run the command on" 11 | local APP="$1"; verify_app_name "$APP" 12 | 13 | if [[ "$(is_app_proxy_enabled "$APP")" == "true" ]]; then 14 | dokku_log_info1 "Disabling proxy for app ($APP)" 15 | [[ "$2" == "--no-restart" ]] && local CONFIG_SET_ARGS=$2 16 | # shellcheck disable=SC2086 17 | config_set $CONFIG_SET_ARGS $APP DOKKU_DISABLE_PROXY=1 18 | plugn trigger proxy-disable "$APP" 19 | else 20 | dokku_log_info1 "proxy is already disable for app ($APP)" 21 | fi 22 | } 23 | 24 | proxy_disable_cmd "$2" --no-restart 25 | -------------------------------------------------------------------------------- /plugins/ps/subcommands/default: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 3 | source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" 4 | 5 | ps_main_cmd() { 6 | declare desc="shows running processes in all running app containers" 7 | local cmd="ps" 8 | dokku_log_warn "Deprecated: Please use ps:report" 9 | 10 | [[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on" 11 | 12 | local APP="$2"; verify_app_name "$APP" 13 | ! (is_deployed "$APP") && dokku_log_warn "App $APP has not been deployed" && exit 0 14 | 15 | local DOKKU_APP_RUNNING_CONTAINER_IDS=$(get_app_running_container_ids "$APP") 16 | 17 | local CID 18 | for CID in $DOKKU_APP_RUNNING_CONTAINER_IDS; do 19 | has_tty && local DOKKU_RUN_OPTS="-i -t" 20 | dokku_log_info1_quiet "running processes in container: $CID" 21 | # shellcheck disable=SC2086 22 | docker exec $DOKKU_RUN_OPTS $CID /bin/sh -c "ps auxwww" 23 | done 24 | } 25 | 26 | ps_main_cmd "$@" 27 | -------------------------------------------------------------------------------- /plugins/20_events/commands: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | [[ " help events:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT" 3 | set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x 4 | 5 | case "$1" in 6 | help | events:help) 7 | help_content_func () { 8 | declare desc="return events plugin help content" 9 | cat< "/var/cache/dokku-completion" 25 | fi 26 | 27 | opts=$(_dokku_complete_verify "${cur}") 28 | COMPREPLY=($(IFS=";" compgen -W "$opts" -- "$cur")) 29 | __ltrim_colon_completions "$cur" 30 | } && 31 | complete -F _dokku dokku 32 | --------------------------------------------------------------------------------