Compare commits

..

1062 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
5676dbc4c6 Release 0.3.26 2015-08-24 16:01:28 -04:00
Michael Hobbs
6d71c164f0 Merge pull request #1128 from progrium/1091_mh-switch-to-herokuish
switching to herokuish. closes #1091
2015-08-24 12:11:05 -07:00
Jose Diaz-Gonzalez
3f43a64430 Merge pull request #1399 from basicer/fix-multi-receive-app
Make dokku play nice when we have multiple receive-app hooks
2015-08-24 14:54:13 -04:00
Jose Diaz-Gonzalez
f20d24463f Merge pull request #1413 from progrium/mh-dokku-scale-with-comments
support comments in DOKKU_SCALE and print contents on deploy
2015-08-24 14:26:34 -04:00
Rob Blanckaert
98990b6885 Make dokku play nice when we have multiple receive-app hooks in various plugins. 2015-08-24 14:20:36 -04:00
Michael Hobbs
42905c345b support comments in DOKKU_SCALE and print contents on deploy 2015-08-24 09:22:07 -07:00
Michael Hobbs
d0623ea37b [ci skip] fix make count on OS X 2015-08-24 09:05:32 -07:00
Jose Diaz-Gonzalez
5717e3afef Merge pull request #1411 from progrium/josegonzalez-patch-2
Clarify `ps:scale` example
2015-08-23 20:52:32 -04:00
Jose Diaz-Gonzalez
268c8763b2 Clarify ps:scale example
[ci skip]
2015-08-23 20:52:26 -04:00
Jose Diaz-Gonzalez
cb0565eb56 Merge pull request #1410 from progrium/josegonzalez-patch-2
Clarify DOKKU_SCALE usage
2015-08-23 20:50:40 -04:00
Jose Diaz-Gonzalez
4cd40aef03 Clarify DOKKU_SCALE usage
refs #1409

[ci skip]
2015-08-23 20:50:35 -04:00
Jose Diaz-Gonzalez
198fe14b7b Merge pull request #1401 from progrium/1219-apt-transport-https
Install apt-transport-https before adding https-backed apt sources
2015-08-20 20:22:13 -04:00
Jose Diaz-Gonzalez
9409fc2ef0 Install apt-transport-https before adding https-backed apt sources
Refs #1219

[ci skip]
2015-08-20 20:21:06 -04:00
Jose Diaz-Gonzalez
ab6f49cebe Merge pull request #1400 from progrium/history-fix
Fix history formatting
2015-08-20 20:16:15 -04:00
Jose Diaz-Gonzalez
5492b0e4e0 Fix history formatting [ci skip] 2015-08-20 20:16:00 -04:00
Jose Diaz-Gonzalez
acd28f4647 Release 0.3.25 2015-08-19 22:01:26 -04:00
Jose Diaz-Gonzalez
e5976e62c7 Merge pull request #1398 from progrium/revert-1394
Revert "Remove `dokku plugins-install` from postinst hook"
2015-08-19 21:48:26 -04:00
Jose Diaz-Gonzalez
55d4fb788e Revert "Remove dokku plugins-install from postinst hook"
This reverts commit 1bf30bdcb1.

Commit was reverted as this breaks installs of core plugins. It is also a hack around broken plugins that don't use the `dependencies` pluginhook.
2015-08-19 21:45:10 -04:00
Jose Diaz-Gonzalez
f39b38b25d Release 0.3.24 2015-08-19 21:11:38 -04:00
Jose Diaz-Gonzalez
9433ab3076 Merge pull request #1397 from progrium/https-docker-apt-repo
Https docker apt repo
2015-08-19 21:01:52 -04:00
Jose Diaz-Gonzalez
c6e4f95550 fix name of herokuish debian package 2015-08-19 20:45:58 -04:00
Jose Diaz-Gonzalez
2b59932ba5 Use https version of docker repository. Refs #1396 2015-08-19 20:23:06 -04:00
Jose Diaz-Gonzalez
d3361d21d8 Remove provides statement from control file 2015-08-19 20:22:19 -04:00
Jose Diaz-Gonzalez
a45be794cc Merge pull request #1394 from progrium/josegonzalez-patch-1
Remove `dokku plugins-install` from postinst hook
2015-08-19 17:02:14 -04:00
Jose Diaz-Gonzalez
8e37d04dda Merge pull request #1395 from adrianmoya/master
Adding fqdn requirement
2015-08-19 17:01:03 -04:00
Adrian Moya
1f6930294a Adding fqdn requirement
Installation fails if no FQDN is set. I'm adding this as a requirement.
2015-08-19 15:02:39 -05:00
Jose Diaz-Gonzalez
1bf30bdcb1 Remove dokku plugins-install from postinst hook
All core plugins that require debian packages already have those packages specified in the `depends` stanza of the `control` file, so no need to respecify them here.
2015-08-19 11:12:28 -04:00
Jose Diaz-Gonzalez
d58e1cd0ab Release 0.3.23 2015-08-15 17:07:10 -04:00
Jose Diaz-Gonzalez
dffdaa141f Merge pull request #1370 from offscale/master
From /dev/null to -qq, from --silent to -sL, and sudo
2015-08-15 16:48:59 -04:00
Jose Diaz-Gonzalez
6e11686fdf Merge pull request #1380 from emdantrim/emdantrim-ignore-noninteractive
Removed uses of `sudo` from `bootstrap.sh`
2015-08-15 16:48:31 -04:00
Jose Diaz-Gonzalez
162fff18e9 Merge pull request #1383 from progrium/1382_mh-downscaling-with-more-than-10-containers
fix downscaling from 10+
2015-08-15 16:47:44 -04:00
Michael Hobbs
26d761d85b make sure we sort container id files, et al correctly even if the app name contains a period. fixes #1382 2015-08-12 21:36:25 -07:00
Jose Diaz-Gonzalez
5a5e80335f Merge pull request #1366 from omeid/patch-1
Make bootstrap.sh safe from bad connection
2015-08-12 14:20:52 -04:00
Jose Diaz-Gonzalez
5988c91512 Merge pull request #1381 from lunohodov/y/docs-update
Instructions for using the bash client in shells other than bash
2015-08-12 14:19:55 -04:00
Y.
c2499541e5 Docs on using the bash client in other shells 2015-08-12 09:06:03 +02:00
emdantrim
0261e9566d Removed uses of sudo from bootstrap.sh
`bootstrap.sh` fails to acknowledge the `DEBIAN_FRONTEND=noninteractive` envvar because of the use of `sudo`, because the -E flag is not set. However, the script also assumes that it will be run with `sudo` in the first place, so it shouldn't be needed. In the event that it is needed, it can be run with -E instead.
2015-08-11 21:00:07 +00:00
O'meid
9835b5da41 show the Tag and Repo used. 2015-08-11 19:38:43 +10:00
Jose Diaz-Gonzalez
b4d559c002 Merge pull request #1379 from jezdez/patch-1
Deleted my old plugins since there is no maintenance happening.
2015-08-10 15:20:35 -04:00
Jannis Leidel
72c62a0ec6 Deleted my old plugins since there is no maintenance happening. 2015-08-10 15:18:45 +02:00
Jose Diaz-Gonzalez
e0244cd093 Merge pull request #1377 from vkurup/1374-fix-docs-link
Fix link to docs from README
2015-08-08 21:34:02 -04:00
Vinod Kurup
9fbe033fba Fix link to docs from README
Fixes #1374
2015-08-08 21:25:35 -04:00
Samuel Marks
287da3fa47 Correctly elevating echo piping 2015-08-06 14:54:54 +10:00
Samuel Marks
123d75c13a From /dev/null to -qq, from --silent to -sL, and sudo 2015-08-05 12:20:51 +10:00
O'meid
777a09847c Make bootstrap.sh safe from bad connection
This allows to run the bootstrap.sh directly and "safely" without storing it on disk.

Signed-off-by: O'meid <public@omeid.me>
2015-08-04 17:13:42 +10:00
Jose Diaz-Gonzalez
00d834bdc3 Merge pull request #1365 from progrium/1364_mh-sh-not-bash
support dockerfile images that don't include bash
2015-08-03 15:30:32 -04:00
Michael Hobbs
8edea8512d use /bin/sh instead of /bin/bash in order to support dockerfile images that don't include bash. fixes #1364 2015-08-03 11:42:30 -07:00
Jose Diaz-Gonzalez
466df88660 Merge pull request #1358 from bkniffler/patch-1
Add suggestion for low memory VMs
2015-08-01 22:02:01 -04:00
bkniffler
9fb7c205df Move small memory instructions to advanced installation - installation.md 2015-07-31 18:26:07 +02:00
bkniffler
fa36d38fb7 Small fix 2015-07-31 18:19:56 +02:00
bkniffler
3a0a873079 Move small memory instructions to advanced installation 2015-07-31 18:18:37 +02:00
Jose Diaz-Gonzalez
b371bca82e Merge pull request #1357 from progrium/1355_mh-deploy-no-webproc
only run domains and nginx config if we have a port and ip
2015-07-31 10:47:23 -04:00
Jose Diaz-Gonzalez
05b7a8ecbd Merge pull request #1359 from progrium/1258_mh-dokku-wait-to-retire-per-app
allow DOKKU_WAIT_TO_RETIRE to be defined per app
2015-07-31 10:31:51 -04:00
Michael Hobbs
c02ba86c81 allow DOKKU_WAIT_TO_RETIRE to be defined per app. closes #1258 2015-07-30 15:03:19 -07:00
bkniffler
003ab07ff4 Adapt to other shell example script 2015-07-30 23:57:52 +02:00
bkniffler
d66b4665d0 Little correction 2015-07-30 23:53:01 +02:00
bkniffler
07cb639bd5 Add suggestion for low memory VMs 2015-07-30 23:38:27 +02:00
Michael Hobbs
11e10fceef only run domains and nginx config if we have a port and ip. fixes #1355 2015-07-30 14:29:36 -07:00
Michael Hobbs
b0d55ce589 Merge pull request #1354 from alessio/events-new-receive-branch-hook
Log receive-branch pluginhook
2015-07-30 08:39:02 -07:00
Alessio Treglia
78c0cdc12d Log receive-branch pluginhook
Such new pluginhook was introduced in dokku v0.3.22.
2015-07-30 15:37:47 +01:00
Michael Hobbs
d21caa4811 Merge branch 'master' into 1091_mh-switch-to-herokuish 2015-07-28 10:55:44 -07:00
Michael Hobbs
fd3f84669b Merge pull request #1292 from progrium/mh-columnar-help-output
use column to format help output
2015-07-28 10:51:50 -07:00
Michael Hobbs
36d607a4f4 [ci skip] update docs 2015-07-28 09:36:42 -07:00
Michael Hobbs
b30db17def use column to format help output 2015-07-28 09:31:56 -07:00
Michael Hobbs
d05df06f1a Merge pull request #1349 from alexkruegger/master
add plugin dokku-app-configfiles
2015-07-28 08:51:03 -07:00
alexkruegger
7e89932dba Update plugins.md 2015-07-28 18:48:00 +03:00
alexkruegger
7cd1b6cdc5 add plugin dokku-app-configfiles 2015-07-28 18:05:29 +03:00
Jose Diaz-Gonzalez
8df24ff4a6 Merge pull request #1346 from progrium/1220_mh-document-dokku-cleanup
document dokku cleanup and the potential of compat issues
2015-07-27 13:08:08 -04:00
Michael Hobbs
67ab803283 [ci skip] document dokku cleanup and the potential of compat issues. closes #1220 2015-07-27 09:50:06 -07:00
Jose Diaz-Gonzalez
e9efcbead4 Merge pull request #1321 from econya/master
In doc: mention alternative to nginx.conf templates: include-dir.
2015-07-26 22:56:41 -04:00
Michael Hobbs
3525f699f9 Merge pull request #1341 from progrium/1336_mh-use-dockerfile-port-sans-vhost
set and use $port whenever $PROC_TYPE == 'web'
2015-07-24 12:45:15 -07:00
Michael Hobbs
9593bd6d48 simplify docker run logic in deploy 2015-07-24 12:15:10 -07:00
Michael Hobbs
da5f42a13e set and use $port whenever $PROC_TYPE == 'web'. closes #1336 2015-07-24 10:40:00 -07:00
Michael Hobbs
0deea445d6 Merge pull request #1337 from progrium/josegonzalez-buildstep
Update PREBUILT_STACK_URL to latest buildstep release
2015-07-23 11:12:26 -07:00
Jose Diaz-Gonzalez
84538e1c1d Update PREBUILT_STACK_URL to latest buildstep release 2015-07-23 13:33:11 -04:00
Jose Diaz-Gonzalez
97eefef04a Fix version
[ci skip]
2015-07-22 14:36:48 -04:00
Jose Diaz-Gonzalez
04b9f0cb9a Fix version
[ci skip]
2015-07-22 14:36:19 -04:00
Jose Diaz-Gonzalez
b3ddea604a Fix docs link
[ci skip]
2015-07-22 14:14:56 -04:00
Jose Diaz-Gonzalez
511d9717ec Merge pull request #1305 from progrium/template
Updated Docs Site
2015-07-22 14:13:00 -04:00
Jose Diaz-Gonzalez
c14f29b01b fix link to documentation [ci skip] 2015-07-22 14:07:52 -04:00
Jose Diaz-Gonzalez
ccc3b810c7 Add missing Release Process link [ci skip] 2015-07-22 14:06:39 -04:00
Jose Diaz-Gonzalez
53a3438cf7 Link docs page 2015-07-22 14:05:22 -04:00
Jose Diaz-Gonzalez
cafbb8a4f9 minor column tweak 2015-07-22 14:05:22 -04:00
Jose Diaz-Gonzalez
230cdaf996 change column sizes 2015-07-22 14:05:22 -04:00
Jose Diaz-Gonzalez
1ef42b527d add padding 2015-07-22 14:05:22 -04:00
Jose Diaz-Gonzalez
cefe772330 remove todo 2015-07-22 14:05:22 -04:00
Jose Diaz-Gonzalez
6dc2b218c7 style tables after the fact 2015-07-22 14:05:22 -04:00
Jose Diaz-Gonzalez
025699cd01 Fix margin on pages 2015-07-22 14:05:22 -04:00
Jose Diaz-Gonzalez
a8b1f4fae5 Attempt to add a sidebar and use fluid container positioning for non-home pages 2015-07-22 14:05:22 -04:00
Jose Diaz-Gonzalez
9b64298314 Use a fluid container 2015-07-22 14:05:22 -04:00
Jose Diaz-Gonzalez
ed9801c031 Fix pattern url
[ci skip]
2015-07-22 14:05:22 -04:00
Jose Diaz-Gonzalez
53f0b00d31 Make assets relative to current page
[ci skip]
2015-07-22 14:05:22 -04:00
Jose Diaz-Gonzalez
222162fd9d Add static site assets
[ci skip]
2015-07-22 14:05:22 -04:00
Jose Diaz-Gonzalez
3322ae6cc3 Custom home.html template 2015-07-22 14:05:22 -04:00
Jose Diaz-Gonzalez
8256d78007 Updated landing page
[ci skip]
2015-07-22 14:05:22 -04:00
Jose Diaz-Gonzalez
e3669479ce Beginning new template changes
[ci skip]
2015-07-22 14:04:21 -04:00
Felix Wolfsteller
430bd3f01a Fix typo and remove reference to dokku-alt issue. 2015-07-22 07:41:22 +02:00
Jose Diaz-Gonzalez
28ffcc887e Merge pull request #1334 from progrium/deb-creation
Fix pluginhook building and update package version
2015-07-21 21:04:53 -04:00
Jose Diaz-Gonzalez
5b06cd68ac Merge pull request #1335 from progrium/fix-michaelshobbs-name
Fix name for michaelshobbs
2015-07-21 21:04:41 -04:00
Jose Diaz-Gonzalez
2e1580241c Fix name for michaelshobbs 2015-07-21 14:54:32 -04:00
Jose Diaz-Gonzalez
f9ea2053b9 Fix pluginhook building and update package version 2015-07-21 14:53:57 -04:00
Jose Diaz-Gonzalez
6b67b2d647 Release 0.3.22 2015-07-21 12:18:30 -04:00
Jose Diaz-Gonzalez
385683c76a Merge pull request #1331 from alexkruegger/master
[bugfix] in nginx.conf.template getting from /app directory
2015-07-20 10:50:55 -04:00
alexkruegger
9910fb03da fix bug in nginx.conf.template getting from /app directory 2015-07-20 14:02:44 +03:00
Michael Hobbs
68b3487355 Merge pull request #1324 from progrium/1323_mh-default-checks-docs
update docs to reflect default checks
2015-07-17 08:00:15 -07:00
Michael Hobbs
d2f2bc9ac1 update docs to reflect default checks. rename DOKKU_DEFAULT_WAIT to DOKKU_DEFAULT_CHECKS_WAIT. refs #1323 2015-07-17 07:25:35 -07:00
Felix Wolfsteller
d4ea8520ac In doc: mention alternative to nginx.conf templates: include-dir. 2015-07-16 11:50:45 +02:00
Michael Hobbs
1ce657565f Merge pull request #1319 from MWers/mw-fix-spelling-issues
Spelling fix: 'comma seperated'=>'comma-separated'
2015-07-14 16:29:20 -07:00
Matt Walker
d457ffe7ee Spelling fix: 'comma seperated'=>'comma-separated' 2015-07-14 15:46:32 -07:00
Jose Diaz-Gonzalez
4bdff25969 Merge pull request #1312 from progrium/kilianc_hotfix-#1270
fixes #1270 faulty default container check (uses docker inspect)
2015-07-13 13:22:27 -04:00
Michael Hobbs
c7cb014580 convenience functions for app container state 2015-07-13 09:27:42 -07:00
Michael Hobbs
633c595311 use docker inspect instead of docker ps grep pattern. closes #1281 2015-07-13 09:09:38 -07:00
Kilian Ciuffolo
0424d5a744 fixes #1270 faulty default container check 2015-07-13 09:09:38 -07:00
Jose Diaz-Gonzalez
0a4c22dfea Merge pull request #1278 from progrium/nginx-template-from-app
Nginx template from app
2015-07-13 10:35:42 -04:00
Jose Diaz-Gonzalez
f27cbe1325 Merge pull request #1313 from progrium/1309_mh-verify-app-in-deploy
verify we have an app when deploy is called
2015-07-13 10:35:22 -04:00
Jose Diaz-Gonzalez
68b12ab46f Merge pull request #1298 from SonicHedgehog/fix-check-root
Fix check-deploy skipping the root path
2015-07-13 10:31:21 -04:00
Jose Diaz-Gonzalez
8905387d16 Merge pull request #1311 from progrium/kilianc_hotfix-#1259
ignore protocol of Dockerfile EXPOSE (refs: #1280)
2015-07-12 20:06:38 -04:00
Jose Diaz-Gonzalez
ca1b17ea8d Use nginx.conf.template as the template name 2015-07-12 20:06:21 -04:00
Jose Diaz-Gonzalez
007946f52a Use simplified method for retrieving a container id 2015-07-12 20:02:29 -04:00
Michael Hobbs
b0ca3aadb0 verify we have an app when deploy is called. fixes #1309 2015-07-12 16:59:16 -07:00
Jose Diaz-Gonzalez
1be74988f1 Merge pull request #1310 from progrium/1261_mh-use-global-config
use config:get for checks skipping variables
2015-07-12 19:31:25 -04:00
Michael Hobbs
3e58824377 Merge branch 'master' into kilianc_hotfix-#1259 2015-07-12 16:27:10 -07:00
Michael Hobbs
ee4fca572e mv dockerfile port logic to common function + tests. closes #1280 2015-07-12 15:57:12 -07:00
Michael Hobbs
57b405ce76 use config:get for checks skipping variables 2015-07-12 15:23:51 -07:00
Jose Diaz-Gonzalez
43b179735b Merge pull request #1261 from Flink/bypass-checks-on-demand
Allows to skip checks (all or default)
2015-07-11 16:31:21 -04:00
Jose Diaz-Gonzalez
6895dd9936 Use get_container_ids method to retrieve container for nginx conf 2015-07-11 16:29:25 -04:00
Assaf Arkin
379a2e8908 Added documentation 2015-07-11 15:06:56 -04:00
Assaf Arkin
71b79da262 CHANGED extract nginx.conf.template from project 2015-07-11 15:05:06 -04:00
Jose Diaz-Gonzalez
e985d18454 Merge pull request #1307 from progrium/1287-release-docs
Add release documentation. Closes #1287
2015-07-11 15:01:00 -04:00
Jose Diaz-Gonzalez
972cad7717 Add release documentation. Closes #1287
[ci skip]
2015-07-11 15:00:37 -04:00
Jose Diaz-Gonzalez
6f6a3e4715 Merge pull request #1306 from progrium/1177-clarify-installation
Clarify web/cli installation docs. Closes #1177. Closes #1170
2015-07-11 14:44:19 -04:00
Jose Diaz-Gonzalez
815bc326a4 Clarify web/cli installation docs. Closes #1177. Closes #1170
[ci skip]
2015-07-11 14:43:50 -04:00
Jakob Krigovsky
25c107b164 Add checks-root test app to tests.mk 2015-07-11 14:39:25 +02:00
Jakob Krigovsky
7c02c6d31d Add test app checks-root 2015-07-11 13:58:55 +02:00
Jakob Krigovsky
3218e2b076 Allow for test apps that should fail deployment 2015-07-11 13:58:52 +02:00
Jakob Krigovsky
5f03518ec8 Fix check-deploy skipping the root path
The root path, `/`, was treated as an invalid URL because it didn’t
contain any characters after the slash.
2015-07-11 13:46:17 +02:00
Michael Hobbs
4629a9909b Merge pull request #1291 from progrium/1261_mh-config-args-refactor
initial pass at config plugin arguments refactor
2015-07-10 07:55:18 -07:00
Jose Diaz-Gonzalez
16a0ca5f70 Merge pull request #1302 from econya/master
in nginx doc, mention where original templates are found by default.
2015-07-10 10:28:15 -04:00
Jose Diaz-Gonzalez
5192bb62fd Merge pull request #1301 from mixxorz/add-reset-mtime-plugin-list
Add reset mtime plugin list
2015-07-10 10:21:22 -04:00
Felix Wolfsteller
f68b126bc9 fix typo 2015-07-10 12:22:07 +02:00
Felix Wolfsteller
bf1ff080b6 in nginx conf mention how to apply template changes (i assume deploy is the answer). 2015-07-10 12:21:29 +02:00
Felix Wolfsteller
bff273d625 in nginx doc, mention where original templates are found by default. 2015-07-10 12:08:29 +02:00
mixxorz
ae2779e38c Fixed missing author links 2015-07-10 11:23:49 +08:00
mixxorz
4de6bbfb29 Added reset-mtime plugin to plugins.md 2015-07-10 11:21:43 +08:00
Michael Hobbs
7ffca93ba8 Merge pull request #1299 from SonicHedgehog/x-forwarded-proto-https
Set X-Forwarded-Proto header if TLS is enabled when running checks
2015-07-09 16:39:08 -07:00
Michael Hobbs
fd187ec837 [ci skip] remove unnecessary comments and update docs 2015-07-09 13:22:12 -07:00
Michael Hobbs
eebcfd85ab fix deprecated comments and include *-buildstep pluginhooks for point release 2015-07-09 13:15:57 -07:00
Jakob Krigovsky
a60dfd3b5e Set X-Forwarded-Proto header if TLS is enabled when running checks 2015-07-09 22:03:29 +02:00
Michael Hobbs
ab2539e894 Merge branch 'master' into 1091_mh-switch-to-herokuish 2015-07-09 13:00:44 -07:00
Michael Hobbs
8ea88c85b6 Merge pull request #1300 from progrium/1294_mh-fix-urls-output
fix urls command when NO_VHOST=1 + tests
2015-07-09 12:58:44 -07:00
Michael Hobbs
64d76724e5 fix typo. good thing we have a test suite. :P 2015-07-09 12:35:43 -07:00
Michael Hobbs
e21b730089 remove dead test file 2015-07-09 12:31:58 -07:00
Michael Hobbs
033a267573 fix urls command when NO_VHOST=1 + tests. fixes #1294 2015-07-09 12:12:58 -07:00
Jose Diaz-Gonzalez
39d993b411 Merge pull request #1296 from Flink/docker-auto-volumes-plugin
Add docker-auto-volumes to plugins
2015-07-09 11:57:48 -04:00
Loïc Guitaut
54b46066ff Add docker-auto-volumes to plugins 2015-07-09 12:26:59 +02:00
Michael Hobbs
039cfdc7ba make ports tests more stable 2015-07-08 11:18:41 -07:00
Michael Hobbs
27b79222c1 catch test setup errors 2015-07-08 09:42:10 -07:00
Michael Hobbs
059ebcd9fc build stack from master 2015-07-08 09:17:29 -07:00
Michael Hobbs
710c6f4e88 don't run dokku again on --* args in config plugin 2015-07-07 12:31:57 -07:00
Michael Hobbs
a84397895a initial pass at config plugin arguments refactor 2015-07-06 19:41:17 -07:00
Michael Hobbs
1668f3bbc6 rename *-herokuish pluginhooks to *-buildpack 2015-07-06 12:45:37 -07:00
Michael Hobbs
f99f9cd5d7 fix typo 2015-07-06 12:42:44 -07:00
Michael Hobbs
2e9bb4eed1 need to call /build for herokuish 2015-07-06 12:41:54 -07:00
Michael Hobbs
a801592b56 [ci skip] update missed doc refs to buildstep 2015-07-06 12:41:54 -07:00
Michael Hobbs
0840d8fd1f initial pass at switching to herokuish. closes #1091 2015-07-06 12:41:54 -07:00
Michael Hobbs
aa55f027a4 Merge pull request #1289 from progrium/mh-fix-random-test-failure
don't background cleanup
2015-07-06 07:01:10 -07:00
Michael Hobbs
0b9ac9a727 don't background cleanup 2015-07-05 21:08:47 -07:00
Michael Hobbs
cbbe7ca557 Merge pull request #1285 from alessio/pr-fix-events-docs-filename
Rename dokku-events-logs.md according to index.md
2015-07-05 19:07:25 -07:00
Alessio Treglia
ecabbc166e Rename dokku-events-logs.md according to index.md
Presently the following link is dangling:
- http://progrium.viewdocs.io/dokku/dokku-events-logs
2015-07-05 18:32:56 +01:00
Kilian Ciuffolo
5f8b2d291c fixes #1259 now ignores protocol of Dockerfile EXPOSE 2015-07-04 10:37:22 -07:00
Jose Diaz-Gonzalez
ce9dabf384 Merge pull request #1282 from progrium/josegonzalez-patch-1
Move primecache to deprecated plugins
2015-07-04 03:28:56 -04:00
Jose Diaz-Gonzalez
53e962cd73 Move primecache to deprecated plugins
[ci skip]
2015-07-04 03:28:47 -04:00
Jose Diaz-Gonzalez
5aada53945 Merge pull request #1277 from progrium/gzip-templates
Gzip templates
2015-07-03 18:23:50 -04:00
Jose Diaz-Gonzalez
06ba11d433 Merge pull request #1279 from progrium/docs-receive-branch
Add docs for `receive-branch` hook. Refs #1149
2015-07-03 17:12:14 -04:00
Jose Diaz-Gonzalez
1223602679 Add docs for receive-branch hook. Refs #1149
[ci skip]
2015-07-03 17:11:53 -04:00
Jose Diaz-Gonzalez
35ff3fa5ca Merge pull request #1149 from mlebkowski/feature/receive-branch
pluginhook to receive branches different than master
2015-07-03 17:07:31 -04:00
Jose Diaz-Gonzalez
2d6054605e Remove non-standard redirects 2015-07-03 16:41:17 -04:00
krishna rokhale
62d1d41bc5 removing new lines. 2015-07-03 16:40:23 -04:00
krishna rokhale
adfa13235d added two more cases to SSL template and gzip as default in templates. 2015-07-03 16:40:23 -04:00
Jose Diaz-Gonzalez
fd27ca022c Merge pull request #1276 from progrium/docs-plugins
Docs plugins
2015-07-03 16:30:43 -04:00
Jose Diaz-Gonzalez
9f73b90a13 Reorder plugins
[ci skip]
2015-07-03 16:29:30 -04:00
Jose Diaz-Gonzalez
9c124e236f Deprecate a few plugins
[ci skip]
2015-07-03 16:28:49 -04:00
Jose Diaz-Gonzalez
4c45c00236 Merge pull request #825 from andrewsomething/multikey
Add support for multiple keys in the installer.
2015-07-03 13:39:35 -04:00
Jose Diaz-Gonzalez
7ceac5787b Minor fixes to the logging docs
[ci skip]
2015-07-03 13:06:47 -04:00
Jose Diaz-Gonzalez
1814a52d60 Merge pull request #1273 from alessio/pr-events-docs
Add docs for the events plugin
2015-07-03 13:01:21 -04:00
Jose Diaz-Gonzalez
e1044199c7 Merge pull request #1254 from kilianc/feature/custom-start-cmd
added DOKKU_DOCKERFILE_START_CMD support
2015-07-03 12:54:24 -04:00
Alessio Treglia
76e718df56 Cosmetic fix 2015-07-03 17:18:15 +01:00
Alessio Treglia
f1fda75e3d Extend events docs 2015-07-03 17:16:48 +01:00
Alessio Treglia
934cddbcda Fix potential ambiguity 2015-07-03 16:43:12 +01:00
Michael Hobbs
483ca9627f Merge pull request #1274 from progrium/1271_mh-fix-ls
parse correct section of path for dokku ls container type
2015-07-03 07:48:09 -07:00
Michael Hobbs
0e53a76a1a [ci skip] ensure we parse the correct section of the string. closes #1271 2015-07-03 07:47:30 -07:00
Alessio Treglia
8acb596fed Update index.md
Add logging.md reference.
2015-07-03 12:09:45 +01:00
Alessio Treglia
601d85f8e6 Create logging.md
Needless to say, this need review.
2015-07-03 12:07:38 +01:00
Alessio Treglia
3e6bcedb51 Update plugins.md
Move dokku-events from the "Dokku Features" stanza to the "Deprecated
Plugins" one as it's now part of the core set of components.
2015-07-03 11:52:12 +01:00
Kilian Ciuffolo
5ced063d3d added docs 2015-07-02 17:47:58 -07:00
Jose Diaz-Gonzalez
4d30fdfb0e Release 0.3.21 2015-07-02 18:54:45 -04:00
Jose Diaz-Gonzalez
7954f186df Merge pull request #1269 from progrium/josegonzalez-docker-buildstep
Peg lxc-docker in buildstep to 1.6.2
2015-07-02 18:48:43 -04:00
Jose Diaz-Gonzalez
a284a805e0 Peg lxc-docker in buildstep to 1.6.2
[ci skip]
2015-07-02 18:48:39 -04:00
Michael Hobbs
2698ce62e2 Merge pull request #1256 from alessio/pr-dokku-events
Implement events logging feature
2015-07-01 14:09:38 -07:00
Alessio Treglia
0ed0201b90 Use d-neg condition to prevent unexpected failures 2015-07-01 19:48:09 +01:00
Alessio Treglia
89d1acaa38 Revert "Fix double negative statement"
This reverts commit 54ed3c1f2b.
2015-07-01 19:47:38 +01:00
Jose Diaz-Gonzalez
d211223f58 Release 0.3.20 2015-07-01 14:43:20 -04:00
Alessio Treglia
54ed3c1f2b Fix double negative statement
This is mostly for consistency with its own install script.
2015-07-01 19:20:53 +01:00
Alessio Treglia
91c691a806 Create dokku's /var/log/dokku/ private namespace
Rename dokku.log to events.log.
Refresh tests accordingly.
2015-07-01 18:25:11 +01:00
Alessio Treglia
172e71cac6 Merge branch 'master' into pr-dokku-events 2015-07-01 17:50:09 +01:00
Jose Diaz-Gonzalez
c4540701fd Merge pull request #1264 from progrium/josegonzalez-lxc-docker
Require lxc-docker-1.6.2
2015-07-01 12:05:14 -04:00
Alessio Treglia
1d4b9a19a8 Fix test case expected output 2015-07-01 10:11:28 +01:00
Alessio Treglia
efc55bd195 Attempt to fix circleci build failure
Parse output and check return code after running test commands
with the 'run' utility.
2015-07-01 09:15:08 +01:00
Jose Diaz-Gonzalez
74fa016bc1 Pin to 1.6.2
Refs #1263

[ci skip]
2015-06-30 16:59:37 -04:00
Jose Diaz-Gonzalez
5668f76cdd Install specific version of docker [ci skip] 2015-06-30 15:52:21 -04:00
Jose Diaz-Gonzalez
7e1e0ebb80 Require lxc-docker <= 1.6.2
1.7.0 Has issues with `docker ps` output, breaking all plugins

[ci-skip]
2015-06-30 14:06:01 -04:00
Alessio Treglia
b24e78257c Fix horrible typo 2015-06-30 17:34:15 +01:00
Alessio Treglia
b380bde9f3 Add small test suite for events logging 2015-06-30 12:05:35 +01:00
Loïc Guitaut
c316f59f4f Allows to skip checks (all or default)
Setting `DOKKU_SKIP_ALL_CHECKS` globally or for a given app will skip
all checks.
Setting `DOKKU_SKIP_DEFAULT_CHECKS` globally or for a given app will skip
default checks only.
2015-06-29 17:21:31 +02:00
Alessio Treglia
69aba06361 Handle log rotation
As requested by @josegonzalez.
2015-06-28 23:25:50 +01:00
Jose Diaz-Gonzalez
976c0be189 Merge pull request #1257 from progrium/josegonzalez-ssl-logs
Split nginx ssl logs by $APP
2015-06-27 12:55:44 -04:00
Jose Diaz-Gonzalez
e2e36a5045 Add logging to :80 stanza 2015-06-27 12:24:27 -04:00
Alessio Treglia
16e4001677 Restart rsyslog once installed
Seems that a mere reload doesn't work.
2015-06-27 10:20:07 +01:00
Alessio Treglia
fb5d3a06f0 Attempt to fix SC2046 2015-06-26 18:01:40 +01:00
Alessio Treglia
da3b00a894 Get rid of cruft leftover 2015-06-26 17:57:43 +01:00
Alessio Treglia
466670d804 Quote `find' statement to prevent word splitting
This should fix ShellCheck SC2046 error.
2015-06-26 16:37:01 +01:00
Jose Diaz-Gonzalez
6bb513f12c Split nginx ssl logs by $APP
Refs #1158
2015-06-26 11:03:29 -04:00
Alessio Treglia
8e7916131c Double quote $@ in plugins/20_events/install too 2015-06-26 15:25:57 +01:00
Alessio Treglia
a858bc8f81 Double quote $@ array expansions 2015-06-26 15:18:38 +01:00
Alessio Treglia
f5e213e390 Add missing DOKKU_RSYSLOG_FILTER in install script
It had gone lost while porting the original 3rd party plugin.
2015-06-26 15:12:55 +01:00
Alessio Treglia
e9a73442e2 Fix missing 'fi' in plugins/20_events/install 2015-06-26 15:11:42 +01:00
Alessio Treglia
783bb02b2c Implement events logging feature
Record events (i.e. pluginhook's calls) as syslog entries and
provide a shortcut command to display the last part of the log
file.

A brief summary of the changes follows:

dokku:
 - New DOKKU_EVENTS_LOGFILE envvar to hold logfile location.

plugins/20_events/commands:
 - events output log entries, a tail's follow-like mode is
   provided too.
 - events:[on|off] enables/disables logging.
 - events:list lists events that are logged.

plugins/20_events/hook:
 - Generic hook that writes log entries. All the events are
   registered via symlink to this script.

plugins/common/functions:
 - dokku_log_event() writes log entries via logger.
 - dokku_log_pluginhook_call() formats log entries and writes
   them via dokku_log_event().
2015-06-26 14:47:18 +01:00
Kilian Ciuffolo
4a4ae9cb71 not fail if DOKKU_DOCKERFILE_START_CMD is not set 2015-06-25 18:05:03 -07:00
Kilian Ciuffolo
74164c2266 added DOKKU_DOCKERFILE_START_CMD support 2015-06-25 15:17:28 -07:00
Maciej Łebkowski
259f8507ca pluginhook to receive branches different than master 2015-06-25 18:00:11 +02:00
Jose Diaz-Gonzalez
48eca101f1 Merge pull request #1252 from progrium/1139-vagrant-docs-fix
Fix ssh port for vagrant installation. Closes #1139. [ci skip]
2015-06-25 11:22:36 -04:00
Jose Diaz-Gonzalez
0e63b4e069 Fix ssh port for vagrant installation. Closes #1139. [ci skip] 2015-06-25 11:22:17 -04:00
Jose Diaz-Gonzalez
cd8292f7fa Merge pull request #1251 from progrium/nginx-restarts
Fallback to using /etc/init.d/nginx reload directly to restart nginx
2015-06-25 11:15:39 -04:00
Jose Diaz-Gonzalez
626cd958a5 Fallback to using /etc/init.d/nginx reload directly to restart nginx. Closes #1165. Refs #1247 2015-06-25 10:38:47 -04:00
Jose Diaz-Gonzalez
15bd9db79c Merge pull request #1250 from progrium/1201-sglebs
SSL documentation is misleading
2015-06-25 10:08:25 -04:00
Marcio Marchini
114cecc911 SSL documentation is misleading
fixes #1194
[ci skip]
2015-06-25 10:07:25 -04:00
Jose Diaz-Gonzalez
2a469df5e4 Merge pull request #1207 from rockymadden/client-appname-as-arg-bug
Fixed bug with client commands taking verb, appname, and also arguments.
2015-06-25 10:06:02 -04:00
Michael Hobbs
4d162aa209 Merge pull request #1245 from arthurschreiber/patch-1
Support config variables containing `\n`
2015-06-24 12:32:47 -07:00
Arthur Schreiber
b40a86a2fc Add a testcase 2015-06-24 11:22:48 +02:00
Jose Diaz-Gonzalez
cc8b1fccc1 Release 0.3.19 2015-06-23 21:40:45 -04:00
Jose Diaz-Gonzalez
e674591567 Merge pull request #1246 from progrium/call-apt-get
Ensure we call apt-get before installing packages
2015-06-23 21:37:57 -04:00
Jose Diaz-Gonzalez
b39b0d4c78 Ensure we call apt-get before installing packages 2015-06-23 20:59:34 -04:00
Arthur Schreiber
0da389e8af Further fixes for config values containing newlines. 2015-06-23 23:53:10 +02:00
Arthur Schreiber
182ae4a50a Support config variables containing \n 2015-06-23 23:41:34 +02:00
Michael Hobbs
1aee972a82 Merge pull request #1237 from zyegfryed/patch-1
Typo (at at -> at)
2015-06-19 07:44:33 -07:00
Sébastien Fievet
b3269e3c95 Typo (at at -> at) 2015-06-19 10:23:44 +02:00
Michael Hobbs
c0f8764292 [ci skip] clarify phases in docker-options plugin 2015-06-17 08:12:46 -07:00
Michael Hobbs
6ebb897150 Merge pull request #1232 from progrium/1231_mh-dockerfile-build-cache-control
allow passing of docker build options and document dockerfile deployment. closes #1231
2015-06-15 16:22:31 -07:00
Michael Hobbs
ba4e87cb8b [ci skip] clean up documentation language 2015-06-15 09:09:49 -07:00
Michael Hobbs
ea66619f3c allow passing of docker build options and document dockerfile deployment. closes #1231 2015-06-15 09:00:33 -07:00
Michael Hobbs
62906cd542 Merge pull request #1227 from Flink/dockerfile-build-without-cache
Use --no-cache when building Dockerfile
2015-06-11 13:37:45 -07:00
Loïc Guitaut
9a71fff3f1 Use --no-cache when building Dockerfile
Since `docker build` is only invoked when actually building a new image
from a Dockerfile, using `--no-cache` allows to have an updated image
even if the Dockerfile hasn't changed.
This works well with Dockerfiles using `git` or packages referencing
latest versions instead of "static" ones.
2015-06-11 12:05:07 +02:00
Jose Diaz-Gonzalez
8880a9ce84 Merge pull request #1224 from lmars/docs-update
Update plugin-creation.md
2015-06-10 12:46:19 -04:00
Lewis Marshall
e61e6e94af Update plugin-creation.md
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2015-06-09 23:34:54 +01:00
Jose Diaz-Gonzalez
d08cec5913 Merge pull request #1218 from progrium/mh-add-logspout-plugin
add dokku-logspout plugin
2015-06-06 14:37:54 -04:00
Michael Hobbs
473f28b0c3 [ci skip] add dokku-logspout plugin 2015-06-05 15:58:07 -07:00
Michael Hobbs
dda2ac03ee Merge pull request #1217 from kirushanth-sakthivetpillai/fix_broken_ssl_wildcard_redirect
Fix broken ssl wildcard redirect
2015-06-05 13:33:36 -07:00
Kirushanth Sakthivetpillai
db6e71b7d6 Update nginx.ssl.conf.template
use nginx $host variable intead of $ssl_server_nam (which may be *.example.com) which does bogus redirects
2015-06-05 15:01:22 -04:00
Michael Hobbs
daeea6ba13 Merge pull request #1206 from rockymadden/patch-1
Handle for installs in /usr/local/bin and the like.
2015-06-02 10:45:41 -07:00
Jose Diaz-Gonzalez
0bfa25f73e Merge pull request #1212 from progrium/mh-dont-install-docker-in-ci
let circleci dictate docker install (fixes master)
2015-05-27 18:03:29 -04:00
Michael Hobbs
b35190101c let circleci dictate docker install 2015-05-27 13:19:28 -07:00
Jose Diaz-Gonzalez
2ceed0cbdf Merge pull request #1210 from cddr/split-nginx-logs
[Fixes #1158] Split nginx logs by $APP
2015-05-25 23:23:52 -04:00
Andy Chambers
eedb05d656 [Fixes #1158] Split nginx logs by $APP
* nginx access logs to /var/log/nginx/${APP}-access.log
 * nginx error logs to /var/log/nginx/${APP}-error.log
2015-05-24 23:59:17 -07:00
Rocky Madden
587de65441 When parsing args when handling verbs, appname can be included as an argument causing bugs with commands that accept a verb, appname, and also arguments. 2015-05-22 18:21:54 -06:00
Rocky Madden
7a6450f0f0 Fixed lint issue. 2015-05-22 17:07:54 -06:00
Rocky Madden
a90090bacd Handle for installs in /usr/local/bin and the like. 2015-05-22 16:58:26 -06:00
Jose Diaz-Gonzalez
3bf68616ad Merge pull request #1204 from 3onyc/bootstrap-fix
Fix bootstrap.sh, install curl when it's missing, make curl follow redirects, don't suppress stderr
2015-05-22 04:04:23 -04:00
3onyc
450f9f19b2 Make curl follow redirects, and don't suppress its output in bootstrap.sh 2015-05-22 08:50:37 +02:00
3onyc
f17b799638 Ensure curl is installed by bootstrap.sh if it's missing 2015-05-22 08:50:23 +02:00
Michael Hobbs
6e0eb5938a Merge pull request #1202 from progrium/1185_mh-filter-wildcard-server-name
filter out literal wildcard when deploying an unrelated domain. closes #1185
2015-05-20 06:43:14 -07:00
Michael Hobbs
af38e4f25a filter out literal wildcard when deploying an unrelated domain. closes #1185 2015-05-19 17:58:02 -07:00
Michael Hobbs
b6b8f4ddc1 Merge pull request #1200 from progrium/mh-fix-lint-1198
fix lintball from #1198
2015-05-19 09:47:18 -07:00
Michael Hobbs
140f5a4939 fix lintball from #1198 2015-05-19 09:39:27 -07:00
Michael Hobbs
f86a6704bd Merge pull request #1198 from 3onyc/fix-preinst
Check web_config before key_file (Fixes #1196)
2015-05-19 09:37:27 -07:00
3onyc
c2c18af425 Check web_config before key_file (Fixes #1196) 2015-05-19 15:11:06 +02:00
Michael Hobbs
c5a74fac90 Merge pull request #1193 from progrium/1187_mh-docker-opts-over-ssh
handle docker opts over ssh without escaping quotes. closes #1187
2015-05-18 12:16:08 -07:00
Michael Hobbs
43869dd48d Merge pull request #1118 from progrium/mh-ps-scale
container-level scaling
2015-05-18 11:27:28 -07:00
Michael Hobbs
bd0b14692a lintball 2015-05-18 10:27:16 -07:00
Michael Hobbs
a785bf82e6 handle docker opts over ssh without escaping quotes. closes #1187 2015-05-18 09:01:12 -07:00
Michael Hobbs
1f6badc6a1 lintball fix 2015-05-18 08:46:42 -07:00
Jose Diaz-Gonzalez
0816ee7575 Merge pull request #1180 from sherbondy/patch-1
Update docker-options.md
2015-05-18 10:50:38 -04:00
Michael Hobbs
0d2e5f1a14 Merge branch 'master' into mh-ps-scale 2015-05-17 17:45:01 -07:00
Jose Diaz-Gonzalez
7dd52ef1fc Merge pull request #1192 from alessio/alessio-dokku-events
Add reference to dokku-events plugin
2015-05-17 19:39:41 -04:00
Alessio Treglia
347366b6e4 Add reference to dokku-events plugin 2015-05-17 22:20:46 +01:00
Jose Diaz-Gonzalez
3639f16137 Merge pull request #1168 from cjblomqvist/pr/1155
Better, actually working, git-rev plugin
2015-05-16 14:32:22 -04:00
Jose Diaz-Gonzalez
eac3eba50e Merge pull request #1179 from trsc/prevent_dismissal_of_urls_in_checks_file
prevent dismissal of URLs in CHECKS file that contain query params
2015-05-16 14:30:21 -04:00
Jose Diaz-Gonzalez
5606a308b6 Release 0.3.18 2015-05-16 14:10:59 -04:00
Jose Diaz-Gonzalez
9980b74688 Merge pull request #1190 from progrium/minor-vagrant-fixes
Fix docker gpg key installation
2015-05-16 13:43:07 -04:00
Jose Diaz-Gonzalez
414b1fd744 Merge pull request #1171 from 3onyc/debconf
[RFC] Use debconf for package configuration
2015-05-16 13:41:47 -04:00
Jose Diaz-Gonzalez
b99e26811b Merge pull request #1189 from vincentfretin/patch-7
wait 30 seconds and not 30 minutes
2015-05-16 13:41:17 -04:00
Vincent Fretin
2e69ff6041 wait 30 seconds and not 30 minutes 2015-05-16 18:20:50 +02:00
3onyc
d9a989d6b0 Use debconf to allow for command-line or unattended installation 2015-05-15 17:43:40 +02:00
Jose Diaz-Gonzalez
75180f7f9b [ci skip] ensure we follow redirects and use ssl when grabbing the docker gpg key
Also install curl when running `vagrant up dokku-deb`
2015-05-12 15:47:12 -04:00
Jose Diaz-Gonzalez
fc466e2c05 [ci skip] Fix FORWARDED_PORT 2015-05-12 14:27:49 -04:00
Jose Diaz-Gonzalez
a54f9ebc7c Merge pull request #1172 from progrium/1169_mh-fix-empty-nonssl-vhosts
unify default and custom nginx template processing
2015-05-12 10:33:01 -04:00
Ethan Sherbondy
1da6cd6b3c Update docker-options.md
My changes may not be quite correct, but as far as I can tell, DOCKER_OPTIONS now requires specifying a phase explicitly.
Also updated references to `--link` since `-link` has been deprecated in Docker.
2015-05-11 20:59:37 -04:00
Michael Hobbs
c5337cf6a2 include output when overriding nginx template 2015-05-11 12:00:44 -07:00
Jose Diaz-Gonzalez
b0189049b7 Merge pull request #1178 from jagandecapri/patch-1
Update plugins.md
2015-05-11 11:16:46 -04:00
Jagatheesan Jack
fc4699dee9 Update plugins.md
Update plugins.md with another Bower/Gulp plugin.
2015-05-11 21:31:33 +08:00
Andreas Follmann
6eefcbb87c prevent dismissal of URLs in CHECKS file that contain query params 2015-05-11 15:31:28 +02:00
Jose Diaz-Gonzalez
d9334900fb Merge pull request #1173 from progrium/josegonzalez-badges
[ci skip] standardize readme badges
2015-05-07 01:30:29 -04:00
Jose Diaz-Gonzalez
f92d8d9a6a [ci skip] standardize readme badges 2015-05-07 01:30:00 -04:00
Michael Hobbs
b836c1f65a use regex when filtering nonssl vhosts. process custom templates in the same manner as default templates. closes #1169 2015-05-06 16:49:37 -07:00
cjblomqvist
cb1aac75fb Better, actually working, git-rev plugin
The previous one broke deployment on first deployment and was always one (relative deploys) REV behind when "working".
2015-05-04 11:34:13 +02:00
Michael Hobbs
4aedb6507a Merge branch 'master' into mh-ps-scale 2015-04-30 10:32:29 -07:00
Jose Diaz-Gonzalez
02277cc411 Merge pull request #1150 from cjblomqvist/patch-1
Add monit plugin
2015-04-30 07:35:29 -04:00
Jose Diaz-Gonzalez
495994daf0 Merge pull request #1153 from econya/readme-how-to-contribute
Add README-section: how to contribute
2015-04-30 07:35:09 -04:00
cjblomqvist
56d0af02c4 Update plugins.md 2015-04-30 09:51:30 +02:00
cjblomqvist
1a70dd1707 Update plugins.md 2015-04-30 09:51:14 +02:00
Jose Diaz-Gonzalez
e9ddde8a82 improve contribution section in README as proposed by josegonzalez. 2015-04-30 08:39:08 +02:00
Michael Hobbs
da92419023 Merge pull request #1151 from LTe/docker-stop
Do not kill docker container with SIGKILL
2015-04-29 13:57:40 -07:00
Piotr Niełacny
4aa970ace8 Do not kill docker container with SIGKILL
When we will use `kill` command on `docker` main process will receive
`SIGKILL` signal. This will result in immediate termination of
processes. We need to send a signal `SIGTERM` to main process and give
the opportunity to close application in correct way.
2015-04-29 16:00:16 +02:00
Felix Wolfsteller
a36aaab686 add section about contribution to README 2015-04-29 10:52:38 +02:00
Felix Wolfsteller
c1d901723d add section about curl timeout issues when pulling buildpack stuff while deploying. 2015-04-29 10:40:41 +02:00
cjblomqvist
952ff31189 Add monit plugin 2015-04-28 15:53:32 +02:00
Jose Diaz-Gonzalez
713a8d4f31 Merge pull request #1146 from progrium/1142_mh-domains-no-redeploy
don't re-deploy on domains:add. allow multple domains on command line. closes #1142
2015-04-27 22:11:01 -04:00
Jose Diaz-Gonzalez
42712f8896 Merge pull request #1148 from TheEmpty/patch-1
Add information about 444 for nginx in default_sever.
2015-04-27 21:35:39 -04:00
Mohammad El-Abid
e0adfd035f Add information about 444 for nginx in default_sever. 2015-04-27 10:00:48 -04:00
Michael Hobbs
379ee525a8 Merge pull request #1144 from protonet/master
Allow git-remote with different port
2015-04-26 11:00:50 -07:00
Andreas Litt
b9e7a09f4c Merge pull request #1 from progrium/1144_mh-test-git-remote-offport
add test for off-port git remote
2015-04-26 19:12:56 +02:00
Michael Hobbs
a6c7cc50ce test off port git remote 2015-04-25 10:01:01 -07:00
Michael Hobbs
981e857ab1 add sshd config for off-port testing 2015-04-25 10:01:01 -07:00
Michael Hobbs
c8c4a6a0c6 pass through return code when calling destroy_app. allow custom git remote 2015-04-25 10:01:01 -07:00
Andreas Litt
383deb2b1b exec git-receive-pack with correct path 2015-04-25 10:01:01 -07:00
Andreas Litt
9fdff11687 remove leading '/' from APP-Name. 2015-04-25 10:01:01 -07:00
Michael Hobbs
2f0f2889db need to restart now 2015-04-24 15:41:32 -07:00
Michael Hobbs
dce031d38d don't re-deploy on domains:add. allow multple domains on command line. closes #1142 2015-04-24 15:41:32 -07:00
Michael Hobbs
31fafe55d3 Merge pull request #1145 from progrium/1135_mh-docker-options-over-ssh
allow docker-options over ssh. plus test. closes #1135
2015-04-24 15:40:45 -07:00
Michael Hobbs
833f308d2f Merge pull request #1147 from progrium/mh-parallelize-tests-plus-1-container
Utilize all 4 free CircleCI containers
2015-04-24 15:36:53 -07:00
Michael Hobbs
0c715d4b39 more test efficiencies and cleanup 2015-04-24 15:05:21 -07:00
Michael Hobbs
a529f6fce8 lintball 2015-04-24 14:02:44 -07:00
Michael Hobbs
0d838d1248 split up unit-tests and use 4 containers (they're free) 2015-04-24 13:52:14 -07:00
Michael Hobbs
3d2af158ff allow docker-options over ssh. plus test. closes #1135 2015-04-24 12:10:02 -07:00
Michael Hobbs
673d43b532 output containers to be stopped and killed. attempt a kill on old containers after we attempt to stop them 2015-04-24 11:32:14 -07:00
Michael Hobbs
290745d324 only validate and restart nginx if we're deployed. use REGEX when handling SSL and NON-SSL hosts 2015-04-24 11:31:27 -07:00
Michael Hobbs
a18fa7afbe we only need the first container here 2015-04-24 11:30:20 -07:00
Michael Hobbs
e9663caf5c updated dokku ls output with container status 2015-04-24 10:49:18 -07:00
Andreas Litt
5968e81b17 exec git-receive-pack with correct path 2015-04-23 15:17:25 +02:00
Andreas Litt
3aa5231f7e remove leading '/' from APP-Name. 2015-04-23 15:04:42 +02:00
Jose Diaz-Gonzalez
3c056527e8 Merge pull request #1140 from NigelThorne/patch-1
Replaced reference to gitreceive with sshcommand as per #746
2015-04-22 19:42:32 -04:00
Nigel Thorne
0fe3d92fd7 Replaced gitreceive with sshcommand as per #746 2015-04-23 09:37:50 +10:00
Jose Diaz-Gonzalez
2b8ea890ad Merge pull request #1138 from chrisbutcher/patch-1
Include tip about using sshcommand acl-add
2015-04-22 18:59:23 -04:00
christopher butcher
9242a5dd31 Include tip about using sshcommand acl-add 2015-04-22 18:05:09 -04:00
Jose Diaz-Gonzalez
d960b9c246 Merge pull request #1137 from YellowApple/patch-1
Safer installation method
2015-04-22 14:48:45 -04:00
Ryan S. Northrup
9f7a33ca3e Safer installation method
Piping the output of `curl` or `wget -O-` to a shell is a very bad idea for multiple reasons; security concerns aside, doing so provides no opportunity for the script's download to finish before execution starts, so if the download is interrupted for some reason (perhaps because of an intermittent network failure), the incompletely-downloaded script will still run with potentially disastrous results.  See [here](http://www.seancassidy.me/dont-pipe-to-your-shell.html) for a more in-depth description.
2015-04-22 11:40:27 -07:00
Michael Hobbs
39dd4fc700 fix typo in output 2015-04-21 23:22:08 -07:00
Michael Hobbs
1fa19591bf sort correctly 2015-04-21 23:14:22 -07:00
Michael Hobbs
7c1ef003b7 set DYNO env var based on proc type 2015-04-21 23:13:47 -07:00
Michael Hobbs
e1f8654a74 attempt to stop containers instead of just killing 2015-04-21 22:21:47 -07:00
Michael Hobbs
c2fa8d14c9 scale web to 1 by default and ignore all others 2015-04-21 22:13:45 -07:00
Michael Hobbs
eb0935a691 make dokku ls pretty 2015-04-21 22:02:21 -07:00
Michael Hobbs
9d504fe93a make sure we cleanup tmp. logging when we hit edge cases 2015-04-21 21:36:03 -07:00
Michael Hobbs
e74c6460fb make semantic sense of _image functions 2015-04-21 20:27:16 -07:00
Michael Hobbs
2cb957d1dd move release_and_deploy to plugin functions. only attempt Procfile copy if we're buildstep based 2015-04-21 20:21:25 -07:00
Michael Hobbs
807e1b97b4 [ci skip] scaling docs 2015-04-21 14:33:28 -07:00
Michael Hobbs
33258663f4 uncomment my accidental comment out 2015-04-21 14:33:28 -07:00
Michael Hobbs
3361a20a30 only check containers running proc named web for now 2015-04-21 14:33:28 -07:00
Michael Hobbs
979c1155c2 add process with no listener 2015-04-21 14:33:28 -07:00
Michael Hobbs
4ae7af091a don't clobber oids when multiple proc types exist 2015-04-21 14:33:28 -07:00
Michael Hobbs
7348d7790c test scaling different proc types 2015-04-21 14:33:28 -07:00
Michael Hobbs
715921c60e comment out skipped test to save time 2015-04-21 14:33:28 -07:00
Michael Hobbs
636e139e4a only balance web containers 2015-04-21 14:33:28 -07:00
Michael Hobbs
ddf893bc8a fix rebuildall and restartall 2015-04-21 14:33:28 -07:00
Michael Hobbs
9a704bc656 use test in both cases 2015-04-21 14:33:28 -07:00
Michael Hobbs
d44788721f format multiple scale lines 2015-04-21 14:32:31 -07:00
Michael Hobbs
d88efd5cc4 no need to find beyond a depth of 1. also bombs when the app cache dir is owned by the container user 2015-04-21 14:32:31 -07:00
Michael Hobbs
930987ad02 container/ip/port file cleanup when scaling down. more tests 2015-04-21 14:32:31 -07:00
Michael Hobbs
14cc01dd5b use helper functions 2015-04-21 14:32:31 -07:00
Michael Hobbs
bbc03dbfdd helper functions 2015-04-21 14:32:30 -07:00
Michael Hobbs
d5cc7595fd default web proc. avoid unclear file not found error when procfile is missing 2015-04-21 14:32:30 -07:00
Michael Hobbs
435f7e69eb only attempt copy if image exists 2015-04-21 14:32:30 -07:00
Michael Hobbs
0f8be7c946 fix missing tmpdir prefix 2015-04-21 14:32:30 -07:00
Michael Hobbs
d42bb79d38 handle non-herokuish deploys that don't create Procfiles. i.e. buildpack-nginx 2015-04-21 14:32:30 -07:00
Michael Hobbs
389b5efa06 only release and deploy if we're modifying scale settings 2015-04-21 14:32:30 -07:00
Michael Hobbs
5c85e8bf65 app repo SCALE file takes precedence over local settings 2015-04-21 14:32:30 -07:00
Michael Hobbs
99d2601f2f fix tests 2015-04-21 14:32:30 -07:00
Michael Hobbs
e27d0e6fa5 wrap container id checks and reading into common function that attempts new and old style container id files
aggregate log streams
2015-04-21 14:32:30 -07:00
Michael Hobbs
33f872183e initial pass at container-level scaling 2015-04-21 14:27:23 -07:00
Jose Diaz-Gonzalez
4d7671dee3 Merge pull request #1129 from progrium/validate-nginx
Validate nginx configuration before restarting nginx
2015-04-21 15:49:35 -04:00
Michael Hobbs
f55e047619 negative test for validate_nginx 2015-04-21 11:53:00 -07:00
Michael Hobbs
661b6706de fix verify_app_name to bomb on null app. use it in nginx:build-config 2015-04-21 10:58:11 -07:00
Jose Diaz-Gonzalez
a8f08bd5a8 [ci skip] Add documentation for custom nginx.conf files
Closes #998
Closes #1000
2015-04-21 02:39:05 -04:00
Jose Diaz-Gonzalez
b299f66c28 Validate nginx configuration before reloading nginx. Closes #999 2015-04-21 02:07:27 -04:00
Jose Diaz-Gonzalez
b5495ed0c3 use helper functions instead of echo command 2015-04-21 01:14:10 -04:00
Jose Diaz-Gonzalez
99c9bb2863 Merge pull request #1121 from progrium/josegonzalez-motd
Prompt users to run the web installer via MOTD. Closes #943
2015-04-19 16:55:22 -04:00
Jose Diaz-Gonzalez
d6aa8d59f1 [ci skip] ensure users run dokku-installer as sudo user 2015-04-19 16:55:08 -04:00
Jose Diaz-Gonzalez
d9d3a16e5c Prompt users to run the web installer via MOTD. Closes #943 2015-04-18 03:56:19 -04:00
Jose Diaz-Gonzalez
5105c4f71d Merge pull request #1058 from progrium/packaging
Packaging
2015-04-18 03:30:51 -04:00
Jose Diaz-Gonzalez
23a6656566 [ci skip] ensure we run apt-get update at least once before installing git 2015-04-18 03:23:30 -04:00
Jose Diaz-Gonzalez
a2ed0ef2b6 [ci skip] fix listing issues in bootstrap.sh 2015-04-18 03:23:12 -04:00
Jose Diaz-Gonzalez
e2d3107e8a [ci skip] add raw debian package installation notes 2015-04-18 02:58:34 -04:00
Jose Diaz-Gonzalez
0e5bc10ae7 [ci skip] update advanced installation docs for development 2015-04-18 02:54:32 -04:00
Jose Diaz-Gonzalez
b3053fe392 [ci skip] update upgrade documentation for 0.3.18 2015-04-18 02:48:52 -04:00
Jose Diaz-Gonzalez
12ee6953bb [ci skip] modify bootstrap script to handle installing from a deb package
For branch-based installs, or anything specifying tags below 0.3.13, we install from source.
2015-04-18 02:48:52 -04:00
Jose Diaz-Gonzalez
9dfa7ccee6 [ci skip] Ensure the /root/.ssh directory exists before copying the user's public key into the vm 2015-04-18 02:48:52 -04:00
Jose Diaz-Gonzalez
45e53d3d9d [ci skip] Remove extra install calls 2015-04-18 02:48:52 -04:00
Jose Diaz-Gonzalez
ea7e3dc61d [ci skip] Switch vagrant box to chef/ubuntu-14.04
The current ubuntu cloud image has a bug where networking appears to stall intermittently, making it difficult to interact with the vm
2015-04-18 02:48:52 -04:00
Jose Diaz-Gonzalez
50fe9e39ad [ci skip] Ensure we run apt-get update when installing docker
On certain operating systems, this may not be called if invoking `make install` directly
2015-04-18 02:48:52 -04:00
Jose Diaz-Gonzalez
9312a99664 [ci skip] Install gcc when running make deb-setup 2015-04-18 02:48:52 -04:00
Jose Diaz-Gonzalez
d8f69746bb [ci skip] Ensure man-db is installed as a dependency 2015-04-18 02:48:52 -04:00
Jose Diaz-Gonzalez
e45db108d8 Merge pull request #1120 from progrium/josegonzalez-irc-shield
Add freenode shield to readme
2015-04-18 02:24:52 -04:00
Jose Diaz-Gonzalez
845c7e7dea Merge pull request #1119 from joshco/feature/zerodt-docs
Logging info suggesting tuned CHECKS
2015-04-18 01:40:10 -04:00
Josh Cohen
e33d17b7dd updated text from @savant 2015-04-18 05:38:23 +00:00
Jose Diaz-Gonzalez
96c6d46dd1 Add freenode shield to readme 2015-04-18 01:03:25 -04:00
Josh Cohen
30f9ab740d Logging info suggesting tuned CHECKS 2015-04-17 23:25:43 +00:00
Jose Diaz-Gonzalez
5224a6c678 Merge pull request #1111 from 3onyc/bug-pre-build-dockerfile-hook
Call pre-build-dockerfile before docker build
2015-04-14 16:01:06 -04:00
3onyc
bc8750ebe3 Call pre-build-dockerfile before docker build 2015-04-14 20:46:19 +02:00
Jose Diaz-Gonzalez
aee2d9ca64 Release 0.3.17 2015-04-14 12:38:44 -04:00
Jose Diaz-Gonzalez
1a151ddabe Merge pull request #1056 from joshco/feature/retries
Review: Feature/retries
2015-04-13 17:18:00 -04:00
Josh Cohen
b5eef489fd linting fixes 2015-04-13 20:22:14 +00:00
Jose Diaz-Gonzalez
580bab491f Merge pull request #1107 from Benjamin-Dobell/master
Added Dokku Graduate to the list of known plugins
2015-04-11 17:24:08 -04:00
Benjamin Dobell
41db33696f Added Dokku Graduate to the list of known plugins 2015-04-12 03:35:36 +10:00
Josh Cohen
33eca97c87 Merge branch 'feature/retries' of github.com:joshco/dokku into feature/retries 2015-04-11 01:11:11 +00:00
Josh Cohen
cc565661e3 fix linting issues
rename UNCHECKED -> FAILEDCHECKS
2015-04-11 01:10:14 +00:00
Michael Hobbs
6225a4113c Merge pull request #1102 from kblcuk/master
Sourcing app-specific ENV during check-deploy
2015-04-09 09:10:18 -07:00
Alexei Mikhailov
b388c2ce1e Sourcing app-specific ENV during check-deploy, which gone missing in 052e3e88c8. 2015-04-09 18:54:08 +03:00
Jose Diaz-Gonzalez
d16a5aede6 Merge pull request #1097 from progrium/1041_mh-use-config-set-no-restart
use config:set-norestart in domains plugin. config:get for dockerfile port. closes #1041
2015-04-08 18:06:32 -04:00
Michael Hobbs
62774b156d use config:set-norestart in domains plugin. config:get for dockerfile port. closes #1041 2015-04-07 20:49:34 -07:00
Jose Diaz-Gonzalez
59b9e5335b Merge pull request #1075 from Flink/dokku-client-ssh-tty
TTY and Compression for SSH
2015-04-07 18:34:54 -04:00
Loïc Guitaut
d701c99c72 TTY option for SSH
When using commands requiring a TTY (such as Rails console), this
script won’t work.
So enabling a TTY resolves the issue.
2015-04-08 00:29:00 +02:00
Josh Cohen
132c0b1c81 Merge remote-tracking branch 'origin/master' into feature/retries 2015-04-07 18:27:55 +00:00
Josh Cohen
4e6a980bc6 update documentation for ATTEMPTS change 2015-04-07 11:02:34 -04:00
Josh Cohen
95334ed3fe Merge branch 'feature/retries' of github.com:joshco/dokku into feature/retries 2015-04-07 14:54:56 +00:00
Josh Cohen
61270967c1 Change "RETRIES" to (MAX) "ATTEMPTS" as this better reflects behavior.
ATTEMPTS=0 means don't run the checks.  Useful if you want to skip the checks and can be overridden by DOKKU_CHECKS_ATTEMPTS
ATTEMPTS=1 means run only once
2015-04-07 14:51:49 +00:00
Jose Diaz-Gonzalez
705c04504c Merge pull request #1088 from progrium/1083_mh-dockerfile-noexpose
support dockerfiles without expose command. closes #1083
2015-04-03 15:56:58 -04:00
Jose Diaz-Gonzalez
2aeb298663 Merge pull request #1065 from progrium/mh-dev-env-bugs
minor dev env cleanup
2015-04-03 15:18:59 -04:00
Jose Diaz-Gonzalez
7df1642e4a Merge pull request #1060 from progrium/nginx-conf-template
Add .template suffix to nginx configuration templates. Refs #1054
2015-04-03 15:18:29 -04:00
Jose Diaz-Gonzalez
29023927f5 Merge pull request #1081 from progrium/1063_mh-test-env-sans-newline
force testing .env with no newline and actually fix #1025 and #1026. closes #1063
2015-04-03 15:18:17 -04:00
Jose Diaz-Gonzalez
6ac59dcdfc Merge pull request #1084 from awendt/avoid-port-collisions
Make port forwarding configurable
2015-04-03 15:18:00 -04:00
Michael Hobbs
c2053d5322 support dockerfiles without expose command. closes #1083 2015-04-03 12:13:39 -07:00
Michael Hobbs
5c938fee8a Merge pull request #1087 from progrium/mh-docker-options-ni-exit
make docker-options adhere to DOKKU_NOT_IMPLEMENTED_EXIT pattern
2015-04-03 11:32:24 -07:00
Michael Hobbs
ba33c161f5 make docker-options adhere to DOKKU_NOT_IMPLEMENTED_EXIT pattern 2015-04-03 10:51:23 -07:00
Jose Diaz-Gonzalez
6374178046 Merge pull request #1082 from progrium/mh-test-updates
test cleanup with slight performance boost
2015-04-02 11:23:02 -04:00
André Wendt
295c897b7e Make port forwarding configurable 2015-04-02 09:27:10 +02:00
Jose Diaz-Gonzalez
814c2a39c5 Merge pull request #1080 from progrium/1062_mh-docker-options
initial pass at including docker-options plugin. closes #1062
2015-04-02 00:57:07 -04:00
Michael Hobbs
7e7eb1dc87 docs update 2015-04-01 17:50:40 -07:00
Michael Hobbs
4e472c39e3 uniform unit test labels 2015-04-01 17:44:34 -07:00
Michael Hobbs
6d0b4ef4ec test cleanup with slight performance boost 2015-04-01 17:30:09 -07:00
Michael Hobbs
1bad26426e force testing .env with no newline and actually fix #1025 and #1026. closes #1063 2015-04-01 13:49:55 -07:00
Michael Hobbs
df8f4fb882 initial pass at including docker-options plugin. closes #1062 2015-04-01 12:57:06 -07:00
Jose Diaz-Gonzalez
89af9cf5db Merge pull request #1079 from rorykoehler/correcting-post-install-link
corrected configuration link in bootstrap.sh
2015-04-01 11:45:00 -04:00
Rory
0f4ee909d5 corrected configuration link in bootstrap.sh 2015-04-01 13:44:49 +02:00
Jose Diaz-Gonzalez
48132aa658 Merge pull request #1077 from Flink/dokku-psql-single-container-plugin
Add dokku-psql-single-container to plugins
2015-03-30 17:31:02 -04:00
Loïc Guitaut
af924efe17 Add dokku-psql-single-container to plugins 2015-03-30 23:24:34 +02:00
Jose Diaz-Gonzalez
79366216cc Merge pull request #1074 from Flink/dokku-client-better-remote-detection
Better detection of dokku remote
2015-03-30 10:54:25 -04:00
Loïc Guitaut
61136e2591 Better detection of dokku remote
Previously this script was matching for a remote named 'dokku' even
when DOKKU_HOST is provided and completely custom. I have a case where
I have 2 remotes with dokku, one on a staging server and another on a
production server.
So by matching for 'dokku@$DOKKU_HOST' instead, the script can determine
correctly which remote to use.
2015-03-30 11:25:33 +02:00
Jose Diaz-Gonzalez
5ecfc7bb91 Merge pull request #1064 from progrium/mh-testing-docs
[ci skip] document test suite
2015-03-30 01:33:26 -04:00
Jose Diaz-Gonzalez
020215ac0a Merge pull request #1068 from matiaskorhonen/rc.local-fix
Fixes escaping in the rc.local script in the Linode StackScript
2015-03-29 18:30:27 -04:00
Matias Korhonen
bb54f845aa Fixes escaping in the rc.local script
`uname -r` was getting executed before the kernel change
2015-03-29 18:40:23 +03:00
Jose Diaz-Gonzalez
802c183b56 Merge pull request #1067 from martinAnsty/docs-nginx-wording
Fix nginx docs wording around config template eg
2015-03-27 18:57:44 -04:00
Martin Ansty
c4d0d37113 Fix nginx docs wording around config template eg 2015-03-27 22:38:13 +00:00
Michael Hobbs
2b59c4b8eb [ci skip] document test suite 2015-03-27 14:36:40 -07:00
Michael Hobbs
e1672b2764 call make stack in subprocess 2015-03-27 14:26:21 -07:00
Michael Hobbs
b6ce856acb set DEBIAN_FRONTEND appropriately to avoid warnings 2015-03-27 14:25:52 -07:00
Josh
b33aebcae2 sanitize example app name 2015-03-26 19:13:45 -04:00
Josh Cohen
f90c7b9524 docs tweak 2015-03-26 18:32:50 -04:00
Josh Cohen
4a0c0eab25 add documentation 2015-03-26 18:29:39 -04:00
Jose Diaz-Gonzalez
50f7b4236b Add .template suffix to nginx configuration templates. Refs #1054 2015-03-26 14:33:27 -04:00
Jose Diaz-Gonzalez
af626069dd Release 0.3.16 2015-03-25 01:03:51 -04:00
Jose Diaz-Gonzalez
be533692fd Merge pull request #1057 from progrium/deb-packaging
Deb packaging
2015-03-25 00:38:24 -04:00
Josh
48f76bcfef Indentation
Indentation for new outer loop
2015-03-24 23:26:31 -04:00
Josh Cohen
3b252d43c6 Add RETRIES feature to checks.
The system will loop through checks RETRIES times until they succeed.
if they do not eventually succeed, it will fail the deployment
2015-03-25 03:17:44 +00:00
Michael Hobbs
2949b620d8 Merge pull request #1051 from Flink/dokku-airbrake-deploy-plugin
Add dokku-airbrake-deploy to plugins
2015-03-23 14:41:43 -07:00
Loïc Guitaut
3d7e7028fd Add dokku-airbrake-deploy to plugins 2015-03-23 22:26:45 +01:00
Jose Diaz-Gonzalez
9293572e41 Merge pull request #1049 from ebeigarts/dokku-slack
Change Slack Notifications link
2015-03-23 10:53:46 -04:00
Edgars Beigarts
cec2802df2 Change Slack Notifications link 2015-03-23 13:29:08 +02:00
Jose Diaz-Gonzalez
d6c5b648f2 Merge pull request #1047 from progrium/1044_mh-show-logs-on-deploy
show logs on deploy success and failure
2015-03-20 16:17:58 -04:00
Michael Hobbs
77257c484f show logs on deploy success and failure. closes #1044 2015-03-20 12:32:49 -07:00
Jose Diaz-Gonzalez
95ae41b2fd Switch all gpg key retrieval to use docker.com 2015-03-19 21:08:31 -04:00
Jose Diaz-Gonzalez
aee8ada6d0 Copy the public key into place instead of moving it
This gets around reprovisioning issues
2015-03-19 20:07:32 -04:00
Jose Diaz-Gonzalez
6f52853049 Ensure we always have apt-transport-https available
On certain distributions, this package is not automatically installed
2015-03-19 20:05:50 -04:00
Jose Diaz-Gonzalez
077b7cee6e Set dokku version during post installation 2015-03-19 20:04:48 -04:00
Jose Diaz-Gonzalez
23b35a03b4 Merge pull request #1043 from progrium/1015_mh-upstart-docker-per-docs
use upstart config from docker docs. closes #1015
2015-03-19 19:47:11 -04:00
Michael Hobbs
f9b0f3ad34 use upstart config from docker docs. closes #1015 2015-03-19 16:12:33 -07:00
Michael Hobbs
65af77e1bc Merge pull request #1042 from progrium/1005_mh-add-xip-test
Update to Support xip.io wildcard DNS as a VHOST
2015-03-19 13:16:59 -07:00
Michael Hobbs
c83fbad205 xip.io style vhosts with tests. closes #1005 2015-03-19 11:23:00 -07:00
Alex Vidal
3b1e0ceb51 Support xip.io wildcard DNS as a VHOST
http://xip.io

xip.io is a service by Basecamp that provides a wildcard DNS service on the public internet. Any <ip address>.xip.io will return a DNS response for the IP address, same with <subdomain>.<ip address>.xip.io.

The domains plugin in dokku uses a regex to match IP4 and IP6 addresses in the VHOST file, and disables VHOST support if found. This PR changes those patterns to require that the VHOST entry **ends with** the IP address.

This is a gist where my VHOST setting is "127.0.0.1.xip.io" that demonstrates the original output, linked directly to the line from `plugins/domains/commands`: https://gist.github.com/anonymous/c529177f20b36beda80d#file-debug-log-L1373
2015-03-19 11:23:00 -07:00
Jose Diaz-Gonzalez
3caec44eac Merge pull request #1009 from progrium/993_mh-inspect-port-always
extract first port from Dockerfile and set config variable for use in deploy phase. closes #993
2015-03-19 13:54:35 -04:00
Michael Hobbs
767b45ae56 use config:set-norestart 2015-03-19 08:09:11 -07:00
Michael Hobbs
1a7586cd03 don't use config:set 2015-03-19 07:54:45 -07:00
Michael Hobbs
2834ce1f1a extract first port from Dockerfile and set config variable for use in deploy phase. closes #993 2015-03-19 07:54:45 -07:00
Jose Diaz-Gonzalez
fafa33e40d Merge pull request #1036 from progrium/908_mh-configset-norestart
create config set/unset without restart. closes #908
2015-03-19 10:52:31 -04:00
Michael Hobbs
3ce5df90bf document config:set-norestart and config:unset-norestart 2015-03-19 07:48:27 -07:00
Jose Diaz-Gonzalez
f1406fd93d Merge pull request #1038 from progrium/1020_mh-simple-check-deploy
default container check. closes #1020
2015-03-19 10:18:31 -04:00
Michael Hobbs
fdec668646 Merge pull request #1040 from ebeigarts/dokku-slack
Add dokku-slack plugin information
2015-03-19 06:04:41 -07:00
Edgars Beigarts
48fef51f76 Add dokku-slack plugin information 2015-03-19 10:55:50 +02:00
Michael Hobbs
72c829e29b default container check. closes #1020 2015-03-17 12:17:33 -07:00
Michael Hobbs
6cb770bf1c create config set/unset without restart. closes #908 2015-03-17 09:49:19 -07:00
Jose Diaz-Gonzalez
bdce8f6f05 Merge pull request #1035 from Flink/dokku-http-auth-plugin
Add dokku-http-auth to plugins
2015-03-17 12:21:21 -04:00
Loïc Guitaut
c7ef040e8c Add dokku-http-auth to plugins 2015-03-16 23:57:06 +01:00
Michael Hobbs
ee039fe4f1 lintball. disable SC1001 2015-03-16 12:43:34 -07:00
Jose Diaz-Gonzalez
7a5942e1ac Merge pull request #1032 from cameron-martin/patch-2
Updated dokku-installer to use relative path.
2015-03-16 14:35:46 -04:00
Cameron Martin
be6a19c210 Updated dokku-installer to use relative path. 2015-03-16 18:29:38 +00:00
Michael Hobbs
986e8f7b25 Merge pull request #1029 from broadly/checks-enhancements
ADDED several enhancements for CHECKS file:
2015-03-14 22:05:20 -07:00
Michael Hobbs
fffa6a1bc5 Merge pull request #1031 from progrium/mh-fix-circleci
CI upgraded to 1.5.0. downgrading seems to break things?
2015-03-14 19:22:49 -07:00
Michael Hobbs
a375eb3ec3 CI upgraded to 1.5.0. downgrading seems to break things? 2015-03-14 18:41:18 -07:00
Assaf Arkin
052e3e88c8 ADDED several enhancements for CHECKS file:
- Specify how long to wait before running first check
- Specify timeout for each check
- Check specific hosts, e.g. http://signin.example.com
- Check both HTTP and HTTPS resources
2015-03-14 10:13:36 -07:00
Jose Diaz-Gonzalez
00e0187ad1 Merge pull request #1028 from Flink/dokku-rails-logs-plugin
Add rails-logs to plugins
2015-03-13 21:14:13 -04:00
Loïc Guitaut
fbc2e22dd6 Add rails-logs to plugins 2015-03-14 01:40:03 +01:00
Jose Diaz-Gonzalez
86c11f1068 Merge pull request #1010 from progrium/mh-client-test-fix
[client unit-test] don't run create/destroy twice. actually clean up from create
2015-03-11 04:24:09 -04:00
Jose Diaz-Gonzalez
110d8a4863 Merge pull request #1026 from progrium/1025_mh-newlines-and-such
ensure we have newlines around our config. closes #1025
2015-03-11 04:24:01 -04:00
Michael Hobbs
bc00b5bfa8 Merge pull request #1027 from nickstenning/add-webhooks-plugin
Add webhooks plugin to documentation
2015-03-10 07:33:33 -07:00
Nick Stenning
3ab828a362 Add webhooks plugin to documentation 2015-03-10 15:27:54 +01:00
Michael Hobbs
88cd81e390 ensure we have newlines around our config. closes #1025 2015-03-09 19:32:05 -07:00
Michael Hobbs
42ee978549 Merge pull request #1013 from lmars/fix-urls
Fix URL schemes in `dokku urls` output
2015-03-09 12:05:25 -07:00
Michael Hobbs
b468c2e09e Merge pull request #1008 from lmars/fix-nginx-multiple-ssl-vhosts
Support multiple domains using a wildcard TLS certificate
2015-03-09 12:05:20 -07:00
Jose Diaz-Gonzalez
2922a95ff6 Merge pull request #1022 from Flink/patch-1
Add dokku-maintenance to plugins
2015-03-08 20:34:47 -04:00
Lewis Marshall
9202f110ab Fix wildcard TLS domain detection
As per RFC 2818 [0], a CN of *.dokku.me will only match direct
subdomains of dokku.me, not sub-subdomains like www.test.dokku.me, but
Dokku currently enables TLS for subdomains of all levels.

I have changed the regex from .*\.dokku\.me to [^.]*\.dokku\.me so TLS
is only enabled for direct subdomains.

[0] - http://tools.ietf.org/html/rfc2818#section-3.1

Signed-off-by: Lewis Marshall <lewis@lmars.net>
2015-03-08 21:32:31 +00:00
Jose Diaz-Gonzalez
054ccfe3fd Merge pull request #1018 from progrium/1017_mh-more-robust-arg-parsing
confine arg shifting to between dokku and command. closes #1017
2015-03-06 20:10:29 -05:00
Michael Hobbs
2fb48c414b confine arg shifting to between dokku and command. closes #1017 2015-03-06 11:58:35 -08:00
Loïc Guitaut
c4125f9e47 Add dokku-maintenance to plugins 2015-03-06 18:53:35 +01:00
Michael Hobbs
dc36e6008c Merge pull request #1004 from progrium/1002_mh-dockerfile-envvar-quoting
remove quoting from dockerfile env. closes #1002
2015-03-06 08:06:51 -08:00
Lewis Marshall
3a7e1bfa16 Fix URL schemes in dokku urls output
Previously, the presence of TLS certificates would cause `dokku urls` to
output all https URLs, even for domains which were not configured to use
TLS.

This change introduces a URLS file in the app's directory which contains
the URLs with schemes based on whether they have been configured to use
TLS in the nginx config.

Signed-off-by: Lewis Marshall <lewis@lmars.net>
2015-03-01 01:29:38 +00:00
Michael Hobbs
482b680e16 [client unit-test] don't run create/destroy twice. actually clean up from create 2015-02-25 19:47:45 -08:00
Lewis Marshall
a4d79e2de9 Support multiple domains using a wildcard TLS certificate
Previous to this change, each TLS domain would be written to nginx.conf
using the nginx.ssl.conf template (lines 69-73) but with an empty
"server_name" directive (because NOSSL_SERVER_NAME was not set).

This would then become irrelevant because nginx.conf would get truncated
on line 88, and a single parsing of the template would then be written to
nginx.conf on line 89, meaning only the last TLS domain would be set up to
actually use TLS.

This patch changes this behaviour so that all TLS domains get added to
nginx.conf using the nginx.ssl.conf template (which includes redirecting
HTTP -> HTTPS), and all non-TLS domains get added using the nginx.conf
template, so do not get redirected to a TLS domain.

Signed-off-by: Lewis Marshall <lewis@lmars.net>
2015-02-26 01:58:17 +00:00
Lewis Marshall
6b973a9565 Refactor nginx tests
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2015-02-26 01:24:39 +00:00
Jose Diaz-Gonzalez
53f9974f6f Merge pull request #1001 from sekjun9878/patch-1
Add sekjun9878/dokku-redis-plugin to plugins.md
2015-02-24 19:42:37 -05:00
Michael Hobbs
fb8f08d280 remove quoting from dockerfile env. closes #1002 2015-02-24 11:56:54 -08:00
Jose Diaz-Gonzalez
5dafee84ba Merge pull request #1003 from progrium/mh-fix-cleanup
remove quoting around cleanup and disable lint for those lines. also make cleanup test more robust
2015-02-24 14:33:41 -05:00
Michael Hobbs
f366a37cd1 remove quoting around cleanup and disable lint for those lines. also make cleanup test more robust 2015-02-24 10:41:02 -08:00
Michael Yoo
64d4af160b Add sekjun9878/dokku-redis-plugin to plugins.md 2015-02-22 18:50:46 +10:30
Jose Diaz-Gonzalez
70e1e5d14d Merge pull request #996 from pmvieira/minor-typo-fix
Minor typo fix in the pluginhooks documentation
2015-02-20 12:51:35 -05:00
Jose Diaz-Gonzalez
7cdc2a6e49 Merge pull request #994 from alessio/develop
Fix quoting.
2015-02-20 12:51:26 -05:00
Pedro Vieira
26ae97eea2 Minor typo fix in the pluginhooks documentation 2015-02-20 15:11:19 +00:00
Alessio Treglia
f90d298027 Fix quoting.
- Should prevent tests failure.
2015-02-20 11:26:33 +00:00
Jose Diaz-Gonzalez
8f9ccf9b0b Merge pull request #992 from progrium/josegonzalez-doc-link-fix
[ci skip] fix digital ocean docs
2015-02-19 18:20:57 -05:00
Jose Diaz-Gonzalez
f0f363da4c [ci skip] fix digital ocean docs
Closes #991
2015-02-19 18:20:48 -05:00
Jose Diaz-Gonzalez
0e6c978d62 Merge pull request #967 from alessio/develop
Really clean-up containers and images a-la-Docker
2015-02-19 14:54:00 -05:00
Jose Diaz-Gonzalez
07ae5190c3 Merge pull request #987 from techniq/patch-1
Improve Dockerfile example/test
2015-02-19 13:54:42 -05:00
Jose Diaz-Gonzalez
3cfadb9c9b Merge pull request #986 from progrium/josegonzalez-static-buildpack
Switch to yabawock's static nginx buildpack
2015-02-19 13:50:23 -05:00
Jose Diaz-Gonzalez
886acfaf39 Merge pull request #989 from progrium/more-clients
More clients
2015-02-19 01:19:07 -05:00
Jose Diaz-Gonzalez
59dc7c0deb [ci skip] note that the easiest client to use is the bash one (zero extra dependencies) 2015-02-19 01:18:31 -05:00
Jose Diaz-Gonzalez
4c53911993 [ci skip] add a few more clients 2015-02-19 01:18:16 -05:00
Jose Diaz-Gonzalez
909f86a393 Merge pull request #988 from progrium/docs-minor-changes
Docs minor changes
2015-02-19 00:54:20 -05:00
Jose Diaz-Gonzalez
c7bde60966 [ci skip] add "Where To Get Help" section 2015-02-19 00:53:52 -05:00
Jose Diaz-Gonzalez
1cba586e90 Add an entry for dokku-toolbelt 2015-02-19 00:44:36 -05:00
Jose Diaz-Gonzalez
51d704c123 [ci skip] fix link to advanced installation docs 2015-02-19 00:33:37 -05:00
Jose Diaz-Gonzalez
3837cb42cf [ci skip] add a section on deprecated plugins 2015-02-19 00:32:59 -05:00
Sean Lynch
6dfc90d388 Improve Dockerfile example/test
Placing `COPY` (or `ADD`) of the application directory after the `RUN apt-get install ...` statements will allow the layers created from those statements to be retrieved from docker's cache on subsequent runs.
2015-02-19 00:07:12 -05:00
Jose Diaz-Gonzalez
3a6f2eca82 Switch to yabawock's static nginx buildpack
The new herokuish branch of buildstep requires changes to the buildpack, but this buildpack should be compatible with the old buildstep.
2015-02-18 18:31:11 -05:00
Jose Diaz-Gonzalez
0ed0e8d458 Merge pull request #984 from progrium/docs-minor-changes
Docs minor changes
2015-02-18 02:37:49 -05:00
Jose Diaz-Gonzalez
19a10e3455 [ci skip] do not use deprecated dokku delete command 2015-02-18 02:35:34 -05:00
Jose Diaz-Gonzalez
c475bfdc24 [ci skip] add STACK_URL reference to make it clear how to customize the buildstep source 2015-02-18 02:35:14 -05:00
Jose Diaz-Gonzalez
6240aaa605 [ci skip] Clarify that the user needs sudo access to install dokku. Closes #961 2015-02-18 02:34:49 -05:00
Jose Diaz-Gonzalez
05b1421027 Merge pull request #983 from progrium/installation-changes
Installation changes
2015-02-18 02:27:58 -05:00
Jose Diaz-Gonzalez
0822f12226 [ci skip] Consolidate advanced-installation instructions and simplify the install guide
Also move vagrant instructions into their own file
2015-02-18 02:26:12 -05:00
Jose Diaz-Gonzalez
914757360b [ci skip] add digitalocean-specific installation instructions 2015-02-18 02:25:41 -05:00
Jose Diaz-Gonzalez
485068479c [ci skip] add experimental linode stackscript 2015-02-18 02:24:50 -05:00
Jose Diaz-Gonzalez
724ec8e0a4 Merge pull request #982 from progrium/client-docs
[ci skip] Add documentation for existing clients. Closes #977
2015-02-18 02:11:23 -05:00
Jose Diaz-Gonzalez
5c5039a533 [ci skip] Add documentation for existing clients. Closes #977 2015-02-18 02:10:42 -05:00
Jose Diaz-Gonzalez
230066fc98 Merge pull request #981 from progrium/remove-old-files
Remove old files
2015-02-18 01:53:02 -05:00
Jose Diaz-Gonzalez
9b409bf628 [ci skip] remove unused s3cfg
This is not necessary given our move away from travis
2015-02-18 01:52:38 -05:00
Jose Diaz-Gonzalez
826e08bea9 [ci skip] remove unused travis.yml file
We are now using CircleCI for testing dokku
2015-02-18 01:52:10 -05:00
Jose Diaz-Gonzalez
ff9e149465 Merge pull request #980 from progrium/pluginhook-docs
Pluginhook docs
2015-02-18 01:50:12 -05:00
Jose Diaz-Gonzalez
0bb8fd0b8e [ci skip] separate out plugin creation documentation 2015-02-18 01:49:42 -05:00
Jose Diaz-Gonzalez
77bea6e040 [ci skip] Add documentation for most pluginhooks
The rest can be added at a later date, or are duplicative of other pluginhooks
2015-02-18 01:49:25 -05:00
Jose Diaz-Gonzalez
f6ca187a5e [ci skip] reorder documentation index page 2015-02-18 01:46:03 -05:00
Jose Diaz-Gonzalez
afc492e23f Merge pull request #978 from progrium/jg-docker-deps
[ci skip] Add apparmor and cgroup-lite as pre-dependencies for dokku
2015-02-16 23:02:44 -05:00
Jose Diaz-Gonzalez
859e400587 [ci skip] Add apparmor and cgroup-lite as pre-dependencies for dokku
Certain operating systems do not have these packages by default and they are required by lxc-docker
2015-02-16 23:02:02 -05:00
Alessio Treglia
d79966af05 Cleanup unit test 2015-02-13 14:18:07 +00:00
Alessio Treglia
7d5813f0a7 Merge branch 'master' into develop 2015-02-13 11:39:50 +00:00
Jose Diaz-Gonzalez
9c15f89a35 Merge pull request #975 from progrium/971-mh-simplify-ssl-nginx
simplify SSL hostname handling and avoid overwriting variables. refs #971
2015-02-12 18:22:57 -05:00
Michael Hobbs
12777d9bf0 simplify SSL hostname handling and avoid overwriting variables. refs #971 2015-02-12 13:27:47 -08:00
Jose Diaz-Gonzalez
64fa098d2c Merge pull request #974 from progrium/mh-cleaner-pipefail-guard
don't use set to guard against pipefail
2015-02-11 21:52:53 -05:00
Michael Hobbs
043b055558 don't use set to guard against pipefail 2015-02-11 17:48:55 -08:00
Jose Diaz-Gonzalez
870ca86ba6 Release 0.3.15 2015-02-11 17:12:59 -05:00
Jose Diaz-Gonzalez
df936fb057 Merge pull request #962 from progrium/debian-building
Update debian package building due to manage generation changes
2015-02-10 14:40:05 -05:00
Jose Diaz-Gonzalez
3f0b3f8385 Merge pull request #966 from djelic/master
handle upgrade in debian/preinst script
2015-02-10 13:19:13 -05:00
Jose Diaz-Gonzalez
c90c6b3f45 Merge pull request #964 from progrium/963-mh-dont-allow-short-args-globally
only look for long args in global space. allows for short args in plugins. closes #963
2015-02-10 13:17:30 -05:00
Alessio Treglia
7e25e74779 Fix typo. 2015-02-10 14:16:39 +00:00
Alessio Treglia
0992719e3d Remove unnecessary call to sudo. 2015-02-10 12:52:29 +00:00
Alessio Treglia
97ef925243 Simplify images cleanup too. Reviewed containers cleanup.
- Images cleanup is a common practice taken from
  https://docs.docker.com/reference/commandline/cli/#filtering_1
2015-02-10 12:29:09 +00:00
Alessio Treglia
1842c19a03 Slightly improve "cleanup".
- Use docker ps to filter containers by status to avoid building
  such a long pipe.
2015-02-10 12:21:42 +00:00
David Jelic
d5ceda6da7 handle upgrade in debian/preinst script 2015-02-10 11:47:20 +01:00
Michael Hobbs
e5fb746a7f only look for long args in global space. allows for short args in plugins. closes #963 2015-02-09 16:59:07 -08:00
Jose Diaz-Gonzalez
7c7896029c Update debian package building due to manage generation changes 2015-02-09 13:24:38 -05:00
Jose Diaz-Gonzalez
8b7b2107f4 Merge pull request #960 from progrium/mh-style-refactor
use consistent bash shebang. closes #959
2015-02-09 02:37:28 -05:00
Michael Hobbs
ef583eef66 use consistent bash shebang. closes #959 2015-02-08 22:34:35 -08:00
Jose Diaz-Gonzalez
c2fa43384c Merge pull request #954 from progrium/mh-dockerfile-support
dockerfile support
2015-02-08 17:38:22 -05:00
Michael Hobbs
179a5e611b introduce pre/post-build-buildstep and pre/post-release-buildstep 2015-02-07 17:56:01 -08:00
Michael Hobbs
7357df7c9d first pass at dockerfile support 2015-02-07 17:56:01 -08:00
Jose Diaz-Gonzalez
122df4cdaf Merge pull request #957 from progrium/mh-dokku-shell
implement dokku shell and ls (by @plietar). refs #312
2015-02-07 19:49:52 -05:00
Michael Hobbs
1cfb1fc3fc implement dokku shell and ls (by @plietar). refs #312 2015-02-07 14:46:17 -08:00
Michael Hobbs
b10120af12 Merge pull request #955 from progrium/mh-small-style-refactor
quick style refactor
2015-02-07 14:40:04 -08:00
Michael Hobbs
7af7355441 Merge pull request #956 from progrium/mh-comment-out-skipped-unit-tests
comment out skipped tests as we pay the cost for setup() and teardown() anyway
2015-02-07 14:38:18 -08:00
Michael Hobbs
a9c1ed0c6d [ci skip] comment out skipped tests as we pay the cost for setup() and teardown() anyway 2015-02-07 14:37:30 -08:00
Michael Hobbs
e931930faa implement parallel_runner to make ci faster 2015-02-07 14:12:05 -08:00
Michael Hobbs
66f7fa3192 lintball 2015-02-07 11:49:35 -08:00
Michael Hobbs
959c51eb50 refactor function defs to be posix-like. remove usage of force positional argument in tests. support --force like arguments in client" 2015-02-07 11:35:04 -08:00
Jose Diaz-Gonzalez
c4ef29173c Merge pull request #952 from progrium/951-mh-document-args-over-ssh
[ci skip] document cli args over ssh. closes #951
2015-02-07 12:34:24 -05:00
Michael Hobbs
fe3e079a93 [ci skip] rename -rm to --rm for DOKKU_RM_CONTAINER 2015-02-07 09:28:09 -08:00
Michael Hobbs
57acf3b295 [ci skip] document cli args over ssh. closes #951 2015-02-06 21:59:34 -08:00
Jose Diaz-Gonzalez
6f92385608 Merge pull request #950 from progrium/mh-count-code-only
do not count blank lines
2015-02-06 17:42:26 -05:00
Michael Hobbs
f5bceb955c [ci skip] do not count blank lines 2015-02-06 14:37:55 -08:00
Jose Diaz-Gonzalez
c35a024d39 Release 0.3.14 2015-02-06 14:06:29 -05:00
Michael Hobbs
a02f32e985 Merge pull request #949 from progrium/mh-common-functions
first stab at a common functions library. include argument parsing and a few definitions wired up. closes #932. closes #945
2015-02-06 10:48:03 -08:00
Michael Hobbs
9164740117 rename log functions with dokku_log_ prefix 2015-02-06 08:28:14 -08:00
Michael Hobbs
371ba99540 include echo functions that don't print when quiet arg is passed 2015-02-05 12:38:59 -08:00
Michael Hobbs
6ad65dd9b4 first stab at a common functions library. include argument parsing and a few definitions wired up. closes #932. closes #945 2015-02-05 11:32:46 -08:00
Jose Diaz-Gonzalez
72a58bbda3 Merge pull request #927 from progrium/906-mh-docker-args-phase-pluginhooks
support both docker-args PHASE and docker-args-PHASE for the time being. closes #906
2015-02-04 11:13:14 -05:00
Michael Hobbs
30d660335f Merge pull request #941 from progrium/931-mh-source-glabal-env-deploy-run
source global env prior to app env. closes #931
2015-02-04 07:32:12 -08:00
Jose Diaz-Gonzalez
d891e2214a Merge pull request #942 from progrium/mh-clojure-test-app
test clojure app
2015-02-03 20:43:07 -05:00
Michael Hobbs
1c02ef9674 test clojure app 2015-02-03 16:46:04 -08:00
Michael Hobbs
b48464a7e2 Merge pull request #925 from progrium/mh-ps-rebuild
implement rebuild command that reuses git_archive_all
2015-02-03 14:56:44 -08:00
Michael Hobbs
5fb30ab934 source global env prior to app env. closes #931 2015-02-03 13:47:20 -08:00
Jose Diaz-Gonzalez
89df6eeded Merge pull request #936 from progrium/929-mh-conditionally-run-buildstack
only execute build stack if we have access to /var/run/docker.sock. closes #929
2015-02-03 15:47:47 -05:00
Jose Diaz-Gonzalez
2a4caf95b4 Merge pull request #938 from vincentfretin/patch-6
enable ssl_prefer_server_ciphers
2015-02-03 15:46:43 -05:00
Jose Diaz-Gonzalez
edfb2ab990 Merge pull request #940 from progrium/mh-valid-composer-json
use valid composer json with specified php runtime
2015-02-03 15:46:34 -05:00
Michael Hobbs
bf7b44f215 use valid composer json with specified php runtime 2015-02-03 08:57:44 -08:00
Vincent Fretin
955f95e899 enable ssl_prefer_server_ciphers
Since we create /etc/nginx/nginx.conf we don't have "ssl_prefer_server_ciphers on" option enabled anymore, enable it in dokku.conf
2015-02-03 09:52:18 +01:00
Michael Hobbs
14bff0679f only execute build stack if we have access to /var/run/docker.sock. closes #929 2015-02-02 15:46:57 -08:00
Jose Diaz-Gonzalez
2dad1afa57 Merge pull request #933 from progrium/930-mh-nginx-sslcrt-docs
[ci skip] remove references to .pem. closes #930
2015-02-02 11:56:54 -05:00
Michael Hobbs
e8118d1af8 [ci skip] remove references to .pem. closes #930 2015-02-02 08:56:06 -08:00
Jeff Lindsay
9b6322e96b Update index.md
clarifying multitenancy
2015-02-01 14:08:49 -06:00
Michael Hobbs
1b22f69b9e support both docker-args PHASE and docker-args-PHASE for the time being. closes #906 2015-01-29 18:33:20 -08:00
Michael Hobbs
be8e4ab014 Merge pull request #926 from dyson/patch-1
Update Troubleshooting link in README.md.
2015-01-28 18:38:48 -08:00
Dyson Simmons
ce89c021ab Update Troubleshooting link in README.md. 2015-01-29 13:36:12 +11:00
Michael Hobbs
c96d139f54 use flock when (re)building/deploying 2015-01-28 16:18:57 -08:00
Michael Hobbs
ef369eb02f really make circle fail unit tests before trying deploy tests 2015-01-27 16:33:36 -08:00
Michael Hobbs
9f985077c7 implement rebuild command that reuses git_archive_all 2015-01-27 15:00:00 -08:00
Jose Diaz-Gonzalez
2a756ff3a4 Merge pull request #922 from progrium/921-mh-use-tty-to-detect-tty
use tty cmd to detect if we have one. closes #921
2015-01-25 21:45:13 -05:00
Michael Hobbs
4ad0c3022e use tty cmd to detect if we have one. closes #921 2015-01-24 20:00:11 -08:00
Jose Diaz-Gonzalez
013eafd8df Merge pull request #917 from progrium/649-mh-resolvconf-doc
[ci skip] document resolvconf troubleshooting step. closes #649
2015-01-23 16:15:38 -05:00
Michael Hobbs
d871d2f292 [ci skip] document resolvconf troubleshooting step. closes #649 2015-01-23 13:05:11 -08:00
Jose Diaz-Gonzalez
c5f0639267 Merge pull request #915 from progrium/650-mh-nginx-default-site-docs
[ci skip] document default sites in nginx. closes #650
2015-01-22 20:33:02 -05:00
Jose Diaz-Gonzalez
f99915b682 Merge pull request #916 from progrium/841-mh-troubleshooting-build-phase
[ci skip] document build phase troubleshooting suggestions. closes #841. closes #911.
2015-01-22 20:32:43 -05:00
Michael Hobbs
a1acc5e1fd [ci skip] document build phase troubleshooting suggestions. closes #841. closes #911. 2015-01-22 16:59:07 -08:00
Michael Hobbs
d8c564d926 [ci skip] document default sites in nginx. closes #650 2015-01-22 16:18:47 -08:00
Michael Hobbs
55892d7743 Merge pull request #914 from progrium/552-913-conditional-tty-on-run
conditionally set interactive and tty on dokku run
2015-01-21 18:22:44 -08:00
Michael Hobbs
3e100e3002 conditionally set interactive and tty on dokku run.
closes #552
closes #913
2015-01-21 13:49:46 -08:00
Jose Diaz-Gonzalez
40d1f22d74 Merge pull request #907 from vincentfretin/patch-5
Don't use -o pipefail for plugin
2015-01-20 14:48:19 -05:00
Vincent Fretin
b81a6c398d document issue with 'set -eo pipefail' option 2015-01-19 08:55:19 +01:00
Jose Diaz-Gonzalez
b8851a66cf Merge pull request #894 from progrium/dokku-client
Dokku client
2015-01-18 17:43:09 -05:00
Michael Hobbs
2ff2ca55c1 drop support for create/delete in favor of standard apps:create and apps:destroy 2015-01-17 16:24:50 -08:00
Jose Diaz-Gonzalez
fb3492c824 Merge pull request #905 from vincentfretin/patch-4
robv/dokku-elasticsearch not compatible with latest version
2015-01-17 13:53:23 -05:00
Vincent Fretin
32f47d31b2 robv/dokku-elasticsearch not compatible with latest version 2015-01-17 15:30:54 +01:00
Jose Diaz-Gonzalez
fbc96d92b5 Merge pull request #904 from progrium/mh-nullglob-in-ps-restartall
prevent error on restartall when no apps deployed
2015-01-17 04:11:45 -05:00
Michael Hobbs
666f2d7434 add random app generator in bash. support create and delete verbs. tested on bash 4.3.18 and 3.2.53 2015-01-16 18:46:55 -08:00
Michael Hobbs
d7830fa730 prevent error on restartall when no apps deployed 2015-01-16 17:41:32 -08:00
Jose Diaz-Gonzalez
00babb5ff5 Merge pull request #887 from progrium/debian-packaging
Debian packaging
2015-01-16 18:50:25 -05:00
Michael Hobbs
161111aab5 lintball client. add tests. add help message 2015-01-16 15:19:14 -08:00
Michael Hobbs
cb39110904 new assertion for a specific exit status 2015-01-16 15:18:24 -08:00
Michael Hobbs
c7bd7119b8 assert on intermediate steps 2015-01-16 14:59:01 -08:00
Michael Hobbs
fda3a08c83 shellcheck dokku_client with specific exclusion 2015-01-16 14:58:41 -08:00
Michael Hobbs
55c2b0fd62 allow force override 2015-01-16 14:57:49 -08:00
Jose Diaz-Gonzalez
e35493e248 unquote variables 2015-01-16 17:07:51 -05:00
Jose Diaz-Gonzalez
ca9443669f Separate package_cloud target from packer build 2015-01-16 17:05:35 -05:00
Jose Diaz-Gonzalez
dc64759a97 Use doublequotes to prevent whitespace problems 2015-01-16 16:57:26 -05:00
Jose Diaz-Gonzalez
45120c5e43 Pull DOKKU_HOST from dokku remote host if not otherwise set 2015-01-16 16:57:26 -05:00
Jose Diaz-Gonzalez
7f99fcb844 Use double-square brackets in if test 2015-01-16 16:57:26 -05:00
Jose Diaz-Gonzalez
d8fa69c5f4 formatting 2015-01-16 16:57:26 -05:00
Jose Diaz-Gonzalez
1eb01db8f9 Add ability to alias dokku_client.sh as dokku command locally 2015-01-16 16:57:26 -05:00
Jose Diaz-Gonzalez
aec4543b61 Properly retrieve and parse the app name from git remote 2015-01-16 16:57:26 -05:00
Jose Diaz-Gonzalez
3e05a8c8ac formatting 2015-01-16 16:57:26 -05:00
Jose Diaz-Gonzalez
0af71abe12 Exit with exit code from ssh command 2015-01-16 16:57:26 -05:00
Jose Diaz-Gonzalez
34895630fd Add DOKKU_TRACE support to turn on command tracing 2015-01-16 16:57:25 -05:00
Jose Diaz-Gonzalez
cd65704c5e Force usage of bash to run command 2015-01-16 16:57:25 -05:00
Jose Diaz-Gonzalez
f293e9026d Better dokku-client bash formatting 2015-01-16 16:57:25 -05:00
Jose Diaz-Gonzalez
8f21a38160 Add a release target to make 2015-01-16 16:56:16 -05:00
Jose Diaz-Gonzalez
077c6a1b89 Add a packer.json file to automate building Digital Ocean Images from debian packages 2015-01-16 16:52:50 -05:00
Jose Diaz-Gonzalez
3d49dbb1a7 Add debian package package to readme 2015-01-16 16:52:50 -05:00
Jose Diaz-Gonzalez
4656e80ab8 Move dokku-installer start to postinst
Performing the start in preinst meant that the required dokku-installer.rb file was not yet in position.
2015-01-16 16:52:50 -05:00
Jose Diaz-Gonzalez
87b7a74cf0 Copy the id_rsa.pub key to the vm where possible
This allows dokku-installer to automatically list the public key in it's UI
2015-01-16 16:52:50 -05:00
Jose Diaz-Gonzalez
20bb7caef4 Change dokku-installer.rb path to the contrib directory
This should avoid issues when testing via vagrant where the /root/dokku directory is not yet mounted. This is also more correct for cloud-installs
2015-01-16 16:52:50 -05:00
Jose Diaz-Gonzalez
d9026a9974 Remove configuration files if they already exist 2015-01-16 16:52:50 -05:00
Jose Diaz-Gonzalez
2b9a31f06d Add empty virtualmachine for testing purposes 2015-01-16 16:52:50 -05:00
Jose Diaz-Gonzalez
3fdc1d20b6 Only start the dokku-installer if it's not already running
Upgrades from previous - fresh - dokku versions will fail if the dokku-installer is already running.
2015-01-16 16:52:50 -05:00
Jose Diaz-Gonzalez
0fcc541e4f Force remove sites-enabled directory, even when empty 2015-01-16 16:52:50 -05:00
Jose Diaz-Gonzalez
8fba61e212 Fix go build command 2015-01-16 16:52:50 -05:00
Jose Diaz-Gonzalez
9c68bda9b4 Fix temporary directory creation 2015-01-16 16:52:50 -05:00
Jose Diaz-Gonzalez
9e396a1b42 Add a few items to the gitignore 2015-01-16 16:52:50 -05:00
Jose Diaz-Gonzalez
92610f347f Add new Vagrant machines for both installation from deb (dokku-deb) and building debian packages (build) 2015-01-16 16:52:50 -05:00
Jose Diaz-Gonzalez
b6767f8efc Add new make targets to build and install dokku debian packages 2015-01-16 16:52:50 -05:00
Jose Diaz-Gonzalez
8c8745ca4c Merge pull request #903 from progrium/mh-reorder-circle-tasks
move shorter running tests into pre test phase
2015-01-16 16:51:36 -05:00
Jose Diaz-Gonzalez
992ac973cc Merge pull request #902 from progrium/install-help2man
Install help2man
2015-01-16 16:47:57 -05:00
Michael Hobbs
7d9adaffc3 move shorter running tests into pre test phase 2015-01-16 13:04:27 -08:00
Michael Hobbs
78238785ba help2man needs dokku in place to get output 2015-01-16 13:03:48 -08:00
Jose Diaz-Gonzalez
6e7c887d5f Install help2man 2015-01-16 15:26:57 -05:00
Jose Diaz-Gonzalez
6b80d1e0f2 Merge pull request #899 from joliv/master
Use help2man to automatically generate man pages
2015-01-16 15:23:14 -05:00
Jose Diaz-Gonzalez
19871fe81d Merge pull request #900 from progrium/mh-nginx-ssl-san-hostname
support extracting SANs from SSL certificates and adding them to nginx config
2015-01-16 15:22:15 -05:00
Jose Diaz-Gonzalez
514d66f40d Merge pull request #891 from progrium/keep-old
Keep existing configuration files when installing nginx. Refs #886
2015-01-16 15:19:57 -05:00
Jose Diaz-Gonzalez
22088f5d82 Merge pull request #897 from progrium/mh-ps-plugin
initial pass at a ps plugin
2015-01-16 14:59:12 -05:00
Jose Diaz-Gonzalez
59baadef06 Merge pull request #901 from misto/patch-1
Pull new tags when upgrading to update VERSION
2015-01-16 12:27:29 -05:00
Mirko Stocker
cb6213adee Pull new tags when upgrading to update VERSION
During an upgrade, the output of `git describe --tags` is written to the VERSION file, so we need to pull the tags otherwise it looks like we're running an old version.
2015-01-16 11:25:20 +01:00
Michael Hobbs
40e628778b revive deploy:all with deprecation warning 2015-01-15 15:43:03 -08:00
Michael Hobbs
6cd89fa72a support extracting SANs from SSL certificates and adding them to nginx config 2015-01-15 12:08:27 -08:00
joliv
2d96bd2939 Add "Options:" header to help text
Makes it easier to be parsed by `help2man`
2015-01-15 12:13:55 -05:00
joliv
cbba084cb8 Use help2man to automatically generate man pages 2015-01-15 11:28:28 -05:00
Jose Diaz-Gonzalez
31c6444dae Merge pull request #898 from joliv/master
Update man page for 0.3.13
2015-01-15 11:04:23 -05:00
joliv
d6ad9f0e85 Update man page for 0.3.13
Some new commands, one deprecated, and a warning at the bottom that the page may not always be up-to-date.
2015-01-15 10:56:50 -05:00
Michael Hobbs
e760e1cc92 implement ps:restartall. closes #82 #218 2015-01-14 16:37:49 -08:00
Michael Hobbs
9490889411 allow ps to be used by plugins that support pre container actions 2015-01-14 16:25:13 -08:00
Michael Hobbs
17d78856e0 skip one ps test as circleci does not yet support docker exec 2015-01-14 16:24:09 -08:00
Michael Hobbs
376e1d3411 ps docs 2015-01-14 16:23:02 -08:00
Jose Diaz-Gonzalez
a0c5c4576e Merge pull request #896 from progrium/515-docker-args-in-build-phase
add docker-args pluginhook call to build phase
2015-01-14 19:10:24 -05:00
Michael Hobbs
61e154899b use ps:restart for config and domains plugins 2015-01-14 15:25:53 -08:00
Michael Hobbs
c0028f122b initial pass at a ps plugin 2015-01-14 15:19:58 -08:00
Jose Diaz-Gonzalez
22fd0aa7f0 Merge pull request #895 from progrium/644-mh-document-priv-submods
document deploying private git submodules. closes #644
2015-01-14 16:15:57 -05:00
Michael Hobbs
08bcebbd17 [ci skip] document deploying private git submodules. closes #644 2015-01-14 13:12:10 -08:00
Michael Hobbs
78967eedd7 add docker-args pluginhook call to build phase 2015-01-14 11:31:48 -08:00
Jose Diaz-Gonzalez
cc4fda235c Merge pull request #892 from progrium/vagrant-docs
Change where the ssh config PORT is setup
2015-01-14 03:52:03 -05:00
Jose Diaz-Gonzalez
d6c369cfdf Change where the ssh config PORT is setup and add a note about using vagrant ssh-config to verify it. Closes #795 2015-01-13 23:27:31 -05:00
Jose Diaz-Gonzalez
55129cb9f6 Keep existing configuration files when installing nginx. Refs #886 2015-01-13 22:42:33 -05:00
Jose Diaz-Gonzalez
2e220da491 Release 0.3.13 2015-01-11 22:30:52 -05:00
Michael Hobbs
e0c49ec724 [ci skip] fix missing strings in deploy tests output 2015-01-11 16:30:13 -08:00
Jose Diaz-Gonzalez
938a16de53 Merge pull request #880 from progrium/879-mh-port-based-fix
disable VHOST deployment if global VHOST file is missing and an app domain has not been added
2015-01-11 18:14:55 -05:00
Michael Hobbs
80d13c0005 allow users to add a domain to an app if there is no global vhost 2015-01-11 14:35:02 -08:00
Jose Diaz-Gonzalez
d1f358c6fb Merge pull request #885 from progrium/883-mh-node-packagejson-only-test
test deploy node app without procfile
2015-01-10 12:17:54 -05:00
Michael Hobbs
f5f7b8dd7e test deploy node app without procfile 2015-01-09 21:52:41 -08:00
Jose Diaz-Gonzalez
795da11d24 Merge pull request #884 from progrium/mh-rename-nginx-listen-vars
IP and PORT are likely to get clobbered. rename them
2015-01-09 17:17:47 -05:00
Michael Hobbs
c63be44989 IP and PORT are likely to get clobbered. rename them 2015-01-09 12:12:52 -08:00
Jose Diaz-Gonzalez
17271b6132 Merge pull request #881 from jomo/patch-1
troubleshooting typo: 64 != 46
2015-01-09 12:06:40 -05:00
jomo
82b700d635 troubleshooting typo: 64 != 46 2015-01-09 17:37:45 +01:00
Michael Hobbs
da465a61dd disable VHOST deployment if global VHOST file is missing 2015-01-08 15:58:08 -08:00
Michael Hobbs
875da5211f Merge pull request #876 from vincentfretin/patch-3
give CACHE_PATH env variable for forward compatibility with herokuish
2015-01-08 12:22:19 -08:00
Jose Diaz-Gonzalez
fc8e8484c6 Merge pull request #877 from progrium/mh-authors
add MH to AUTHORS
2015-01-07 16:38:27 -05:00
Michael Hobbs
7ebdcaa2e5 [ci skip] not sure if this is kept up-to-date anymore 2015-01-07 12:42:31 -08:00
Vincent Fretin
8e5c8c0832 give CACHE_PATH environment variable for forward compatibility with herokuish
herokuish defaults to /tmp/cache, so the build cache don't work without giving the CACHE_PATH environment variable. You can test it with buildstep herokuish branch. cc @progrium
2015-01-07 19:04:40 +01:00
Jose Diaz-Gonzalez
4abccf0119 Merge pull request #874 from progrium/869-add-missing-docs
Add advanced installation docs that were removed in #706. Closes #869
2015-01-07 01:45:26 -05:00
Jose Diaz-Gonzalez
dd9ef4866c Add advanced installation docs that were removed in #706. Closes #869 2015-01-07 00:43:08 -05:00
Jose Diaz-Gonzalez
8502881633 Merge pull request #868 from expa/mh-circle-ci
use circleci for automated testing
2015-01-06 23:44:15 -05:00
Michael Hobbs
43e9e6ddb6 disable wercker 2015-01-06 18:46:29 -08:00
Michael Hobbs
471a5fa087 badge readme 2015-01-06 18:38:39 -08:00
Jose Diaz-Gonzalez
f95ad79fc4 Merge pull request #873 from progrium/870-mh-bind-ip-on-domains-change
support pre deployment usage of domains plugin. fixes interface binding issue
2015-01-06 16:14:02 -05:00
Michael Hobbs
896ce50c93 support pre deployment usage of domains plugin. fixes interface binding issue 2015-01-06 12:42:21 -08:00
Jose Diaz-Gonzalez
cbbc63d0f8 Merge pull request #872 from progrium/832-mh-enable-multi-test
fix/enable multi buildpack test
2015-01-06 14:52:07 -05:00
Michael Hobbs
1f73b58340 enable multi buildpack test 2015-01-06 11:20:22 -08:00
Michael Hobbs
881a700e99 attempt to use make install 2015-01-05 17:39:33 -08:00
Michael Hobbs
9d81dda524 try circle again 2015-01-05 17:03:06 -08:00
Jose Diaz-Gonzalez
566cc15081 Merge pull request #864 from progrium/860-mh-bind-to-internal-ip
bind docker container to internal port if using vhosts
2015-01-05 19:58:18 -05:00
Michael Hobbs
f1827a86a4 add docs for network interface binding logic 2015-01-05 16:28:48 -08:00
Jose Diaz-Gonzalez
fc1762156d Merge pull request #867 from progrium/862-mh-test-make-output
silent grep stderr. closes #862
2015-01-05 17:33:29 -05:00
Michael Hobbs
343ee24c46 silent grep stderr. closes #862 2015-01-05 13:13:43 -08:00
Michael Hobbs
441d212ef2 add ipv6 detection for external port binding 2015-01-05 10:47:20 -08:00
Jose Diaz-Gonzalez
bc072e1db3 Merge pull request #858 from progrium/857-disable-server-tokens
Disable server tokens in nginx. Closes #857
2015-01-03 22:12:22 -05:00
Jose Diaz-Gonzalez
ab7f9f1161 Move server_tokens off to the global nginx conf 2015-01-03 21:41:18 -05:00
Michael Hobbs
e95d1e8602 add test to validate server_tokens is off 2015-01-02 17:21:57 -08:00
Michael Hobbs
948d7902f2 bind docker container to internal port if using vhosts 2015-01-02 16:27:19 -08:00
Jose Diaz-Gonzalez
8535900f9d Merge pull request #859 from progrium/829-docker-args-command
Pass command being executed when retrieving DOCKER_ARGS via pluginhook.
2015-01-01 21:16:44 -05:00
Jose Diaz-Gonzalez
152b060901 Merge pull request #861 from progrium/587-custom-dokku-root
Default DOKKU_ROOT to ~dokku if unspecified. Closes #587
2015-01-01 21:00:20 -05:00
Jose Diaz-Gonzalez
464ef4d879 Default DOKKU_ROOT to ~dokku if unspecified. Closes #587 2015-01-01 20:38:55 -05:00
Jose Diaz-Gonzalez
156e987300 Merge pull request #863 from progrium/fix-composer-app
Add missing properties to the php composer.json
2015-01-01 20:38:33 -05:00
Jose Diaz-Gonzalez
8abb9ec408 Add missing properties to the php composer.json
This avoids errors in deploying the test app. Composer recently updated to require this for all projects (which appears to be a bug).
2015-01-01 20:14:41 -05:00
Jose Diaz-Gonzalez
97734cc242 Merge pull request #815 from abossard/patch-1
I made a wordpress installation helper
2015-01-01 15:16:31 -05:00
Jose Diaz-Gonzalez
93a01fb763 Pass command being executed when retrieving DOCKER_ARGS via pluginhook. Closes #829 2015-01-01 15:14:47 -05:00
Jose Diaz-Gonzalez
2a51301a5d Disable server tokens in nginx. Closes #857 2015-01-01 15:03:43 -05:00
Jose Diaz-Gonzalez
1d6d5755d4 Release 0.3.12 2014-12-29 16:56:23 -05:00
Jose Diaz-Gonzalez
6fed503024 Merge pull request #846 from progrium/mh-default-ssl-vhost-from-cert
add certificate CN to app VHOST if it's not already
2014-12-25 00:57:39 -05:00
Jose Diaz-Gonzalez
95914d1c13 Merge pull request #850 from progrium/mh-test-deploy-scala
test scala deployment
2014-12-24 14:23:28 -05:00
Jose Diaz-Gonzalez
92c18fa664 Merge pull request #849 from cjoudrey/checks-docs
Add docs for CHECKS
2014-12-24 13:59:09 -05:00
Christian Joudrey
7bd5df0e25 Add docs for CHECKS 2014-12-24 12:33:47 -05:00
Michael Hobbs
9b5abeac4d test scala deployment 2014-12-23 23:54:52 -08:00
Michael Hobbs
de09260c33 add certificate CN to app VHOST if it's not already 2014-12-23 23:08:22 -08:00
Jose Diaz-Gonzalez
7cf28ee01f Merge pull request #847 from leonardodino/patch-1
Update bootstrap.sh: new docs url
2014-12-23 22:47:14 -05:00
Leonardo Dino
e04b90c416 missed the advanced installation link
it’s linked in the instalation page, but it’s broken.
2014-12-23 22:31:29 -03:00
Leonardo Dino
5e1b5b2900 Update bootstrap.sh: new docs url
move to viewdocs.io
2014-12-23 22:16:20 -03:00
Jose Diaz-Gonzalez
416dac6d2b Release 0.3.11 2014-12-23 17:17:36 -05:00
Jose Diaz-Gonzalez
9a04104bb9 Merge pull request #844 from progrium/mh-fix-ssl-urls
build app urls based on wildcard ssl or app ssl
2014-12-23 17:13:40 -05:00
Michael Hobbs
43fe6edb04 build app urls based on wildcard ssl or app ssl 2014-12-23 13:52:50 -08:00
Michael Hobbs
3a850fa05e fix typo in nickname. aka i cannot spell 2014-12-23 05:31:27 -08:00
Jose Diaz-Gonzalez
097bdecfac Merge pull request #839 from progrium/mh-irc-build-notifications
notify irc on builds
2014-12-23 01:30:56 -05:00
Michael Hobbs
1d4cc0b991 notify irc on builds 2014-12-22 22:07:43 -08:00
Jose Diaz-Gonzalez
3e62b1acce Merge pull request #838 from expa/mh-build-env-special-chars
quote build_env vars
2014-12-23 00:35:53 -05:00
Michael Hobbs
c2911c94a8 quote build_env vars 2014-12-22 15:52:54 -08:00
Jose Diaz-Gonzalez
f5a5f7702b Merge pull request #833 from expa/mh-fix-orphaned-app-image
auto remove the cache dir cleanup container
2014-12-22 10:22:47 -05:00
Jose Diaz-Gonzalez
5f2a5fe2bc Merge pull request #821 from expa/mh-unit-tests
use wercker for automated testing
2014-12-22 10:21:17 -05:00
Michael Hobbs
50208862b2 revert to florianheinemann's nginx buildpack for static sites 2014-12-21 14:51:42 -08:00
Michael Hobbs
283432f214 domains plugin unit tests and fix for errant substring match 2014-12-21 14:51:42 -08:00
Michael Hobbs
d1e94f6c91 use buildpack fork that preserves CHECKS file location 2014-12-21 14:51:42 -08:00
Michael Hobbs
dbb6560b1e fix static site test 2014-12-21 14:51:42 -08:00
Michael Hobbs
f3535292b3 reference issues for disabled deploy tests 2014-12-21 14:51:42 -08:00
Michael Hobbs
568902302b echo out deploy test type correctly 2014-12-21 14:51:42 -08:00
Michael Hobbs
cddcf997e1 make sure we test the check-deploy plugin 2014-12-21 14:51:42 -08:00
Michael Hobbs
f2bd2b8541 nullglob. closes: #822 2014-12-21 14:51:42 -08:00
Michael Hobbs
6bb01404ec poor lint fix choice. let's not do that. 2014-12-21 14:51:42 -08:00
Michael Hobbs
e8b4bd5a89 lintball 2014-12-21 14:51:42 -08:00
Michael Hobbs
2695d957ac add wercker status to readme 2014-12-21 14:51:41 -08:00
Michael Hobbs
051b286a62 disable multipack buildpack test for now 2014-12-21 14:51:41 -08:00
Michael Hobbs
67b7fa6263 handle config with spaces over ssh 2014-12-21 14:51:41 -08:00
Michael Hobbs
c697c65508 WIP 2014-12-21 14:51:41 -08:00
Michael Hobbs
85f9bb3aae disable SC2143 2014-12-21 14:51:41 -08:00
Michael Hobbs
c5c0ae00ba show logs in deploy tests 2014-12-21 14:51:41 -08:00
Michael Hobbs
0dec01c324 fix php test 2014-12-21 14:51:41 -08:00
Michael Hobbs
3827e38caa set nullglob 2014-12-21 14:51:41 -08:00
Michael Hobbs
14a7cac686 update php and static tests 2014-12-21 14:51:41 -08:00
Michael Hobbs
9322200eae lintball 2014-12-21 14:51:41 -08:00
Michael Hobbs
ee32b05a36 test against both buildstep release and master 2014-12-21 14:51:41 -08:00
Michael Hobbs
3b41d6d16f create build env for both dokku and new style buildpacks 2014-12-21 14:51:41 -08:00
Jose Diaz-Gonzalez
8aef43b3ae Release 0.3.8 2014-12-21 14:51:41 -08:00
Jose Diaz-Gonzalez
e45455b73f Ensure makefiles are properly formatted 2014-12-21 14:51:41 -08:00
Joel Van Horn
356acdd08d Point users to upgrade guides 2014-12-21 14:51:41 -08:00
Michael Hobbs
f9b7d5378d lintball in build-env 2014-12-21 14:51:41 -08:00
Michael Hobbs
58d0bc983a don't use bats for deploy tests 2014-12-21 14:51:41 -08:00
Michael Hobbs
81aefba305 fix multipack app deploy test 2014-12-21 14:51:41 -08:00
Michael Hobbs
8f5c5d5ae2 reference opened issue with buildstep 2014-12-21 14:51:40 -08:00
Michael Hobbs
8025657a38 save error in output if curl errors 2014-12-21 14:51:40 -08:00
Michael Hobbs
779808f832 make sure we set the default VHOST to match test env 2014-12-21 14:51:40 -08:00
Michael Hobbs
d3e18d3362 fix failure output 2014-12-21 14:51:40 -08:00
Michael Hobbs
606bbda66c make tests work 2014-12-21 14:51:40 -08:00
Michael Hobbs
3706392e65 test with wercker 2014-12-21 14:51:40 -08:00
Michael Hobbs
ab7c313411 Merge pull request #835 from expa/mh-fix-substring-match
[domains] make sure we match the specific string in VHOST
2014-12-21 14:51:25 -08:00
Michael Hobbs
f797ff77f4 make sure we match the specific string in VHOST 2014-12-21 13:57:45 -08:00
Michael Hobbs
c2736c7c7a auto remove the cache dir cleanup container 2014-12-20 17:20:32 -08:00
Jose Diaz-Gonzalez
af671b2aba Release 0.3.10 2014-12-19 15:17:17 -05:00
Jose Diaz-Gonzalez
45b2f87b15 Merge pull request #831 from progrium/nginx-docs
Nginx docs
2014-12-19 15:13:14 -05:00
Jose Diaz-Gonzalez
3d6727a1b8 Add documentation for configuring the nginx domains and vhosts 2014-12-19 15:10:10 -05:00
Jose Diaz-Gonzalez
bf4781a5d7 Use shell keyword for codeblock guard 2014-12-19 15:09:38 -05:00
Michael Hobbs
2d48d81d09 Merge pull request #828 from andrewsomething/port
Display the port for an app when falling back to the ip address.
2014-12-18 14:10:11 -08:00
Andrew Starr-Bochicchio
294b419da5 Display the port for an app when falling back to the ip address. 2014-12-17 21:20:18 -05:00
Jose Diaz-Gonzalez
f1bfb3ed3a Merge pull request #827 from expa/mh-mv-default-vhost-to-core
Handle IP only access
2014-12-17 19:53:59 -05:00
Michael Hobbs
56472bd08c VHOST fallback 2014-12-16 23:01:32 -08:00
Michael Hobbs
e99e2201cb mv default VHOST creation to core install 2014-12-16 20:25:44 -08:00
Jose Diaz-Gonzalez
5bf1ba7ed7 Merge pull request #783 from progrium/nginx-cleanup
New domains plugin and nginx extension
2014-12-16 17:15:30 -05:00
Andrew Starr-Bochicchio
f808c8efe4 Add support for multiple keys in the installer. 2014-12-16 16:48:28 -05:00
Jose Diaz-Gonzalez
5d014d0a8e Merge pull request #823 from expa/nginx-cleanup
show URLS with scheme. now with bug fixes!!!
2014-12-16 16:26:47 -05:00
Michael Hobbs
59f047bb45 include SSL_VHOSTS in NOSSL_SERVER_NAME so we can redirect from http to https on the secure hostname as well 2014-12-16 12:15:10 -08:00
Michael Hobbs
1b208778f3 bugfixes
- don't match substrings in VHOSTS
 - handle case where NOSSL_SERVER_NAME is \' \'
 - rebuild nginx config on ssl import
 - prevent cwd errors after we rm the temp dir
2014-12-15 18:10:14 -08:00
Michael Hobbs
a6cdae5abf reset VHOST to default upon domains:clear 2014-12-15 18:04:00 -08:00
Michael Hobbs
50115d3640 print out urls with scheme 2014-12-15 18:02:57 -08:00
Michael Hobbs
78d3921a6f don't break other nginx plugins like nginx-alt 2014-12-15 13:15:40 -08:00
Jose Diaz-Gonzalez
23d4224beb Merge pull request #818 from expa/nginx-cleanup
rebuild nginx config on domain change
2014-12-14 18:31:43 -05:00
Michael Hobbs
4e0670f1ac rebuild nginx config on domain change 2014-12-12 17:53:30 -08:00
Jose Diaz-Gonzalez
0bd8d71bb9 Release 0.3.9 2014-12-12 09:58:02 -05:00
Jose Diaz-Gonzalez
12ee9bc3e7 Merge pull request #816 from progrium/build-env-docs
Add documentation for user-env feature
2014-12-12 09:56:46 -05:00
Jose Diaz-Gonzalez
a991c450be Remove user-env-compile plugins from docs 2014-12-12 09:55:41 -05:00
Jose Diaz-Gonzalez
a900aa45d6 Add documentation for the recent build-env feature addition 2014-12-12 09:54:26 -05:00
Jose Diaz-Gonzalez
3c8b3cedea Merge pull request #814 from progrium/dokku-env-vars
Source files in $DOKKU_ROOT/.dokkurc directory and add `dokku trace` command
2014-12-12 09:25:51 -05:00
Andre Bossard
2464bc0458 I made a wordpress installation helper
It's not a plugin though
2014-12-12 15:22:05 +01:00
Jose Diaz-Gonzalez
dec8056ef5 Link to gist.github.com 2014-12-12 01:10:10 -05:00
Jose Diaz-Gonzalez
784e2cfd5e Add a note about enabling dokku trace via the cli 2014-12-12 01:09:59 -05:00
Jose Diaz-Gonzalez
b9b9d6303a Add a dokku trace command to allow easy toggling of the DOKKU_TRACE option 2014-12-12 01:07:43 -05:00
Jose Diaz-Gonzalez
39912ce5db Allow sourcing in any file in .dokkurc
This allows us to configure dokku env-vars individually. Such a feature is useful if a developer would like to enable or disable DOKKU_TRACE without parsing a dokkurc file.
2014-12-12 01:07:08 -05:00
Jose Diaz-Gonzalez
7d8ec62a86 Merge pull request #787 from progrium/build-env
Official user-env-compile plugin
2014-12-11 21:15:45 -05:00
Jose Diaz-Gonzalez
8cd4863126 Merge pull request #813 from expa/build-env
build-env todos
2014-12-11 18:18:26 -05:00
Michael Hobbs
7c8feb9e0d build-env todos 2014-12-11 14:56:25 -08:00
Jose Diaz-Gonzalez
d6ef5e3447 Merge pull request #812 from expa/build-env
create build env for both dokku and new style buildpacks
2014-12-11 16:33:28 -05:00
Michael Hobbs
498e250e2e link to commit id and line in comment 2014-12-11 12:52:04 -08:00
Michael Hobbs
7d5e0ba5aa create build env for both dokku and new style buildpacks 2014-12-11 12:05:55 -08:00
Jose Diaz-Gonzalez
a7b8eb5581 Merge pull request #811 from abossard/patch-1
Please increase the server_names_hash_bucket_size
2014-12-11 10:22:44 -05:00
Andre Bossard
79788e5690 Please increase the server_names_hash_bucket_size
I use Dokku in a private environment with very long hostname.... 64 was always a lot to short.
2014-12-11 09:59:13 +01:00
Jose Diaz-Gonzalez
ae61ef3f1e Add backup support to nginx.conf.template files 2014-12-11 02:40:20 -05:00
Jose Diaz-Gonzalez
1d45ca0cdd Add backup export/import hooks for associated VHOST files 2014-12-11 02:38:08 -05:00
Jose Diaz-Gonzalez
b4c864bea7 Use sed to indent output of dokku url command 2014-12-11 02:34:24 -05:00
Jose Diaz-Gonzalez
01e7f1cdb6 Output *all* hosts on multiple lines 2014-12-11 02:34:08 -05:00
Jose Diaz-Gonzalez
0865ff3f79 Use updated VHOST file instead of URL file when outputting the current URL to an app
Note that this may include more than one URL to an app
2014-12-11 02:16:52 -05:00
Jose Diaz-Gonzalez
11b126a845 Do not overwrite URL file 2014-12-11 02:14:52 -05:00
Jose Diaz-Gonzalez
605ba27eeb Use a one-liner for the "Configuring" echo statement 2014-12-11 02:12:46 -05:00
Jose Diaz-Gonzalez
8109c9c569 Delete the VHOST file, not the URL file, when NO_VHOST is set
The URL file is useful for understanding what port docker decided to host our app internally on.
2014-12-11 02:10:49 -05:00
Jose Diaz-Gonzalez
9111902542 Fix issue where VHOST was not properly being set
The URL file is being rewritten on every deploy by `dokku deploy` and thus that file was incorrect. Instead, we just reuse the old logic from the nginx-vhosts plugin to handle creation of the VHOST file
2014-12-11 02:09:54 -05:00
Jose Diaz-Gonzalez
4955f9c600 Fix test for file 2014-12-11 01:36:44 -05:00
Jose Diaz-Gonzalez
976dc3009c Use a normal conditional 2014-12-11 01:36:44 -05:00
Jose Diaz-Gonzalez
0b4b2b29a8 Add missing env var 2014-12-11 01:36:44 -05:00
Jose Diaz-Gonzalez
e84526490e Move VHOST file creation to a single domains:setup command
This helps remove duplication and also ensures that all hosts have a proper setup after running `make copyfiles`

Note that this command is not exposed in help as it is not generally useful to developers
2014-12-11 01:36:44 -05:00
Jose Diaz-Gonzalez
66171551d8 Add domains plugin as written in https://github.com/jtangelder/dokku-nginx-alt
This plugin conforms to the heroku api for setting and removing domains. Note that it does not yet update the URL file for a given application.
2014-12-11 01:36:44 -05:00
Jose Diaz-Gonzalez
f23809e75f Implement the ability to set multiple server names for a given application
Adding a hostname to the $APP/VHOST file will enable it as a virtualhost for the application.

In addition, any hostname set that matches an associated ssl certificate will also be set as an ssl host. Note that if a hostname does not have a matching SSL host, then it will result in an erroring application.

For the moment, running `dokku url` on an app may not correctly display the current hostnames for said app.
2014-12-11 01:36:44 -05:00
Jose Diaz-Gonzalez
b967514c55 Allow overriding of the nginx.conf template via nginx.conf.template 2014-12-11 01:36:44 -05:00
Jose Diaz-Gonzalez
a6c34ddd6f Use a template to create an application's nginx.conf 2014-12-11 01:36:44 -05:00
Jose Diaz-Gonzalez
8f0e794893 Remove extra dash 2014-12-11 01:36:44 -05:00
Jose Diaz-Gonzalez
68a1d1af38 one-liner 2014-12-11 01:36:44 -05:00
Jose Diaz-Gonzalez
eeff3d52eb Combine calls to restart nginx into a single command 2014-12-11 01:36:44 -05:00
Jose Diaz-Gonzalez
8aa196c660 Remove extra reload command 2014-12-11 01:36:44 -05:00
Jose Diaz-Gonzalez
d9d66c58ab Fix reference to $APP 2014-12-08 22:16:05 -05:00
Jose Diaz-Gonzalez
155f4e9aba Release 0.3.8 2014-12-08 22:14:03 -05:00
Jose Diaz-Gonzalez
1bfbdb449b Merge pull request #808 from progrium/proper-editorconfig
Ensure makefiles are properly formatted
2014-12-08 22:12:21 -05:00
Jose Diaz-Gonzalez
b3ca3368e8 Ensure makefiles are properly formatted 2014-12-08 22:12:04 -05:00
Jose Diaz-Gonzalez
04921d6876 Merge pull request #807 from progrium/799-force-nginx-conf
#799: Force nginx conf
2014-12-08 22:05:17 -05:00
Jose Diaz-Gonzalez
a915b8888f Ensure ruby is installed when running the dokku-installer 2014-12-08 21:57:10 -05:00
Jose Diaz-Gonzalez
129a5fd33d Force install a default nginx.conf. Closes #799 2014-12-08 21:20:54 -05:00
Jose Diaz-Gonzalez
e567ce1a90 Merge pull request #806 from progrium/fix-remote-user
Dokku pushes now happen as the dokku user, not git. Refs #796
2014-12-08 20:59:22 -05:00
Jose Diaz-Gonzalez
489f131ffc Dokku pushes now happen as the dokku user, not git. Refs #796 2014-12-08 20:58:50 -05:00
Jose Diaz-Gonzalez
45ec8df7be Merge pull request #805 from ademuk/patch-1
Fixed import-ssl server.crt/key check
2014-12-08 20:36:18 -05:00
Adem Gaygusuz
469d1e3f49 Fix crt/key check 2014-12-09 00:37:47 +00:00
Jose Diaz-Gonzalez
7ca2f49d78 Merge pull request #801 from joelvh/patch-1
Point users to upgrade guides
2014-12-02 08:55:48 -05:00
Joel Van Horn
69176d2d9a Point users to upgrade guides 2014-12-02 00:33:44 -05:00
Jose Diaz-Gonzalez
ad030b21d4 Merge pull request #796 from progrium/795-better-docs
795 better docs
2014-11-27 15:13:31 -05:00
Jose Diaz-Gonzalez
8c8f5e17f1 Tell users to change directory to dokku before running vagrant up. Refs #795 2014-11-27 15:10:33 -05:00
Jose Diaz-Gonzalez
e0b994c415 Standardize on dokku.me as the test hostname. Refs #795 2014-11-27 15:09:46 -05:00
Jose Diaz-Gonzalez
a12b1e2b56 Release 0.3.7 2014-11-25 15:46:48 -05:00
Jose Diaz-Gonzalez
590c5fc017 Merge pull request #789 from mmerickel/fix.deploy-vhost 2014-11-25 15:44:19 -05:00
Michael Merickel
ee5c35dd9d do not output message when creating ENV file
This fixes a bug introduced when deploying apps where the
nginx-vhosts plugin runs ``dokku config:get $APP NO_VHOST``. The initial
run of this actually was creating the ``ENV`` file and dumping to
stdout the value "NO_VHOST=-----> Creating /home/dokku/foo/ENV". This
was obviously no good because nginx-vhosts was considering this to be a
value of true.

I've modified this to simply not return anything when the value does not
exist. A better update may be to output the messages to stderr instead
of stdout.
2014-11-25 15:43:36 -05:00
Jose Diaz-Gonzalez
42a1363996 Merge pull request #788 from mmerickel/fix.apps-plugin
fix apps plugin issues in 0.3.6
2014-11-25 13:28:17 -05:00
Michael Merickel
4ae8cf8180 fix search for apps if DOKKU_ROOT is a symlink 2014-11-25 11:56:05 -06:00
Michael Merickel
aef3a68d2b fix app plugin that was always searching for empty app name 2014-11-25 11:55:25 -06:00
Jose Diaz-Gonzalez
6ddc7275dd First pass at official user-env-compile plugin
- Uses ENV and APP/ENV files
- Supports old BUILD_ENV files (which are likely in wide-use)
- Allows user's to override globals with app-specific configuration

Closes #284
Closes #683
Closes #763

Refs #503
Refs #678
2014-11-25 11:24:58 -05:00
Jose Diaz-Gonzalez
58ca13e838 Release 0.3.6 2014-11-25 10:44:32 -05:00
Jose Diaz-Gonzalez
7c2f21fd2a Merge pull request #782 from progrium/simplified-config
Simplified config
2014-11-24 13:17:27 -05:00
Jose Diaz-Gonzalez
887637fb6b Merge pull request #785 from lsde/master
fix missing semicolon in nginx config
2014-11-24 10:33:26 -05:00
Jonas Svatos
c706344a94 fix missing semicolon in nginx config 2014-11-24 13:22:50 +01:00
Jose Diaz-Gonzalez
a1bbc1ec4d Release 0.3.5 2014-11-24 02:17:50 -05:00
Jose Diaz-Gonzalez
793f1b6058 Merge pull request #784 from progrium/no-vhost-hotfix
Fix NO_VHOST check
2014-11-24 02:16:39 -05:00
Jose Diaz-Gonzalez
20977fc2a2 Fix NO_VHOST check
It used to check if NO_VHOST is unset or set to the empty string
It now checks if NO_VHOST is set to a non-empty string
2014-11-24 02:16:21 -05:00
Jose Diaz-Gonzalez
6cad7ef8f4 Release 0.3.4 2014-11-23 23:37:18 -05:00
Jose Diaz-Gonzalez
407436b4cc Exit 0 if there is no configuration
heroku config:get exits 0 in this case
2014-11-23 23:32:42 -05:00
Jose Diaz-Gonzalez
04dbe31919 Unify the way in which all error messages are specified
Other parts of dokku use one-liners where possible, so these parts should as well
2014-11-23 23:32:42 -05:00
Jose Diaz-Gonzalez
56185fc1c2 Correct plugin example
$APP is not available until after the if guards
2014-11-23 23:32:42 -05:00
Jose Diaz-Gonzalez
303bd77226 Simplify if statement 2014-11-23 23:32:42 -05:00
Jose Diaz-Gonzalez
c6e39c08f0 Simplify env var checking in config plugin
All checks are now done within the commands, and we only need to ensure the config file exists.
2014-11-23 23:32:42 -05:00
Jose Diaz-Gonzalez
12194e2cc8 Add proper error handling to each config command 2014-11-23 23:32:42 -05:00
Jose Diaz-Gonzalez
a3b3a6a12a Unify missing app error messages 2014-11-23 23:32:42 -05:00
Jose Diaz-Gonzalez
c6f80bcf55 Merge pull request #781 from expa/master
use DOKKU_IMAGE (i.e. progrium/buildstep)
2014-11-23 23:27:34 -05:00
Michael Hobbs
4d8c7033a9 use DOKKU_IMAGE (i.e. progrium/buildstep) 2014-11-23 19:58:12 -08:00
Michael Hobbs
d2547c4233 Merge pull request #3 from progrium/master
merge from upstream v0.3.2
2014-11-23 19:56:41 -08:00
Jose Diaz-Gonzalez
4fa567dbe3 Merge pull request #780 from progrium/778-better-error-message
Output error message when a command is not found. Closes #778
2014-11-23 21:05:08 -05:00
Jose Diaz-Gonzalez
463f725872 Use git-* as a pluginhook prefix 2014-11-23 21:02:40 -05:00
Jose Diaz-Gonzalez
aa1c7f6fa4 Move git-upload-pack command to git plugin
Also use the same APP escaping as used for other git commands.
2014-11-23 20:47:15 -05:00
Jose Diaz-Gonzalez
5f6f73ff22 Merge pull request #722 from wrboyce-git-pull 2014-11-23 20:40:08 -05:00
Will Boyce
ad497191df Add git pull support 2014-11-23 20:39:57 -05:00
Jose Diaz-Gonzalez
53c58ec8b9 Merge pull request #777 from feature/improve-core 2014-11-23 20:32:21 -05:00
Thomas Boerger
9eab9ed1e1 Replaced hard coded plugins path
To be able to switch the plugin path i have removed the hard coded
plugin path from the catch all section of the switch within the main
dokku executable.
2014-11-23 20:32:13 -05:00
Thomas Boerger
3faa37b2e1 Keep environment for sudo
To be able to set some other environment variables even if dokku gets
called from a different user we have to keep the environment with sudo
intact, so i added the -E option.
2014-11-23 20:32:13 -05:00
Jose Diaz-Gonzalez
fd55e8d41b Merge pull request #669 from ohardy/master 2014-11-23 20:29:12 -05:00
Olivier Hardy
303bc18265 Handle dokku plugins-update command 2014-11-23 20:22:26 -05:00
Jose Diaz-Gonzalez
2141435ce1 Rename DOKKU_CONTROLLER to DOKKU_HOST 2014-11-23 19:54:10 -05:00
Jose Diaz-Gonzalez
03e5248256 Merge pull request #659 from Xe/client
contrib: add dokku client shell script
2014-11-23 19:53:26 -05:00
Jose Diaz-Gonzalez
d307a5b8ec Output error message when a command is not found. Closes #778
Plugins with commands will need to implement a catch-all command that exits with the `DOKKU_NOT_IMPLEMENTED_EXIT`` code (10). This signals to dokku that a given plugin has indeed not executed anything for a plugin (which may not always be the case).

Using plugins that do not implement this pattern will result in those plugins silencing the error message.
2014-11-23 18:09:11 -05:00
Jose Diaz-Gonzalez
1e5a904747 Merge pull request #779 from progrium/minor-formatting
Minor bash formatting changes
2014-11-23 16:49:21 -05:00
Jose Diaz-Gonzalez
a46582225a Merge pull request #751 from webhippie/feature/improvements
Partial openSUSE support
2014-11-23 16:47:36 -05:00
Jose Diaz-Gonzalez
8bc3d372ec Minor bash formatting changes 2014-11-23 16:42:21 -05:00
Thomas Boerger
14b1743c2a Added openSUSE support
I have done the first steps to get dokku running for other distros like
openSUSE. I have simply replaced the important places within the core
plugins with a check for DOKKU_DISTRO that gets exported by dokku
itself. It just replaces the apt-get and service start/restart/reload
functionality with the openSUSE counterparts.
2014-11-23 11:37:58 +01:00
Thomas Boerger
2d776292c3 Added environment variable for base container
In order to be able to use a different base image i have added another
environment variable where everybody can switch the used base container
for the applications directly through the environment variable
DOKKU_IMAGE or with the help of the dokkurc configuration.
2014-11-23 11:34:29 +01:00
Jose Diaz-Gonzalez
f0fe32a9c6 Merge pull request #776 from joliv/master
Update man page for new commands
2014-11-22 23:21:25 -05:00
joliv
c4f5b3e219 Update man page for new commands 2014-11-22 22:09:11 -05:00
Jose Diaz-Gonzalez
e7219c0346 Release 0.3.2 2014-11-22 18:02:06 -05:00
Jose Diaz-Gonzalez
842ae10b74 Merge pull request #775 from progrium/plugin-help
Add PLUGIN:help command to each plugin
2014-11-22 17:58:24 -05:00
Jose Diaz-Gonzalez
cfc7c41e47 Add PLUGIN:help command to each plugin 2014-11-22 17:52:46 -05:00
Jose Diaz-Gonzalez
c7af391c06 Merge pull request #774 from progrium/254-nginx-hostname-hook
Add the ability to customize an app's hostname using nginx-hostname pluginhook
2014-11-22 17:19:38 -05:00
Jose Diaz-Gonzalez
4754f241f2 Add the ability to customize an app's hostname using the nginx-hostname pluginhook
Closes #254
2014-11-22 17:18:33 -05:00
Jose Diaz-Gonzalez
fd1678b576 Remove reference to no-vhost plugin that is now in core 2014-11-22 16:50:06 -05:00
Jose Diaz-Gonzalez
7f730d0697 Merge pull request #773 from progrium/485-native-no-vhost
Disable nginx vhosts via `dokku config:set myapp NO_VHOST=1`. Closes #485
2014-11-22 16:44:05 -05:00
Jose Diaz-Gonzalez
69f360864f Disable nginx vhosts via dokku config:set myapp NO_VHOST=1. Closes #485 2014-11-22 16:42:55 -05:00
Jose Diaz-Gonzalez
16fd7ebc6b Merge pull request #772 from progrium/518-import-ssl
Import ssl certificates
2014-11-22 16:23:24 -05:00
Jose Diaz-Gonzalez
19609f7078 Import ssl certificates
Also ensures output is stored in proper tls directory

Closes #518
2014-11-22 16:19:06 -05:00
Jose Diaz-Gonzalez
a24c1bcc92 Merge pull request #771 from progrium/doc-changes
Doc changes
2014-11-22 15:38:43 -05:00
Jose Diaz-Gonzalez
47811f60f4 Ensure tables have proper width 2014-11-22 15:37:42 -05:00
Jose Diaz-Gonzalez
ab01206351 Better formatting of plugin tables 2014-11-22 15:37:29 -05:00
Michael Hobbs
fd0bafa7d9 Merge pull request #2 from progrium/master
merge from upstream
2014-11-22 10:25:33 -08:00
Jose Diaz-Gonzalez
ac84ef68cc Change tables to be left aligned 2014-11-17 17:11:00 -05:00
Jose Diaz-Gonzalez
5caf2ab6e3 Reorganized list of available datastore plugins 2014-11-17 17:03:22 -05:00
Jose Diaz-Gonzalez
11bff42180 Merge pull request #766 from progrium/sort-apps
Sort output of apps command
2014-11-16 19:20:39 -05:00
Jose Diaz-Gonzalez
bf4876107d Sort output of apps command 2014-11-16 19:14:51 -05:00
Jose Diaz-Gonzalez
2ec17a4033 Merge pull request #765 from progrium/ignore-tls-directory
Ignore tls directory
2014-11-16 13:10:17 -05:00
Jose Diaz-Gonzalez
d36249f51a Ignore tls directory when listing out apps 2014-11-16 13:08:00 -05:00
Jose Diaz-Gonzalez
b011e54dca Skip tls directory in deploy:all hack 2014-11-16 13:00:33 -05:00
Jose Diaz-Gonzalez
b68a8da2ce Do not allow users to delete the tls directory 2014-11-16 13:00:07 -05:00
Jose Diaz-Gonzalez
a421dbf063 Merge pull request #675 from expa/mh-broadly-wait-to-retire
port wait-to-retire from broadly/dokku
2014-11-16 12:56:51 -05:00
Jose Diaz-Gonzalez
00a8370b7d Release 0.3.1 2014-11-16 12:36:31 -05:00
Jose Diaz-Gonzalez
647b215738 Update HISTORY.md for 0.3.0 2014-11-16 12:19:29 -05:00
Jose Diaz-Gonzalez
3e224cc723 Merge pull request #579 from neam/include-nginx-conf.d
Plugin nginx-vhosts includes files in folder nginx.conf.d
2014-11-16 07:19:24 -05:00
Fredrik Wollsén
26a9e2fbf2 Update plugins list - VHOSTS Custom Configuration required core PR was made available in dokku core 0.3.1 2014-11-16 13:18:26 +02:00
Fredrik Wollsén
580f89e63b Plugin nginx-vhosts includes files in folder nginx.conf.d 2014-11-16 13:14:24 +02:00
Jose Diaz-Gonzalez
614a310bbf Merge pull request #762 from progrium/custom
Update template for dokku docs
2014-11-16 04:20:00 -05:00
Jose Diaz-Gonzalez
99304ac3d9 Update template for dokku docs 2014-11-16 04:18:34 -05:00
Jose Diaz-Gonzalez
403843832f Merge pull request #761 from progrium/add-registry-plugin
Add dokku-registry to list. Closes #716
2014-11-16 03:04:52 -05:00
Jose Diaz-Gonzalez
7d9aa7c492 Add dokku-registry to list. Closes #716 2014-11-16 03:04:26 -05:00
Jose Diaz-Gonzalez
33eca3bf39 Merge pull request #760 from progrium/formatting
Formatting
2014-11-16 03:01:04 -05:00
Jose Diaz-Gonzalez
aefa11db8b Add editorconfig to dokku
This should help dokku contributors force proper formatting on their contributions
2014-11-16 03:00:32 -05:00
Jose Diaz-Gonzalez
52774536ca Standardize installer on 2 spaces 2014-11-16 02:59:42 -05:00
Jose Diaz-Gonzalez
0f6ca81afd Update dokku-installer version to v0.3.0 2014-11-16 02:59:28 -05:00
Jose Diaz-Gonzalez
44201a66d9 Add set -eo statement to nginx-vhosts/dependencies 2014-11-16 02:59:07 -05:00
Jose Diaz-Gonzalez
7b361e564f Use 2 spaces for formatting bash
Also remove extra trailing newlines
2014-11-16 02:58:52 -05:00
Jose Diaz-Gonzalez
f13c1031c7 Ensure there is a newline after calling set -e 2014-11-16 02:54:54 -05:00
Jose Diaz-Gonzalez
bca8aa3923 Merge pull request #759 from progrium/apps-plugin
Create an `apps` core plugin.
2014-11-16 02:36:01 -05:00
Jose Diaz-Gonzalez
4b9433052f Create an apps core plugin.
This creates the following commands:

- apps
- apps:create <app>
- apps:destroy <app>

It also:

- makes `delete` an alias for `apps:destroy`
- adds confirmation to `apps:destroy`
- allows a developer to remove apps that have been created via apps:create but have not been deployed

Refs #87
Refs #543
Refs #586
Closes #599
Refs #655
Refs #656
Refs #685
Closes #757
2014-11-16 02:30:39 -05:00
Jose Diaz-Gonzalez
d0ceee5b3b Merge pull request #758 from progrium/621-permissions
Make ENV file readable only from dokku user. Closes #621
2014-11-16 00:27:07 -05:00
Jose Diaz-Gonzalez
913af9b641 Make ENV file readable only from dokku user. Closes #621 2014-11-16 00:26:12 -05:00
Jose Diaz-Gonzalez
f03c0c5440 Merge pull-request #617 from markstos/document-bootstrap 2014-11-16 00:16:51 -05:00
Mark Stosberg
96b348e880 Document what bootstrap.sh is doing. 2014-11-16 00:16:33 -05:00
Jose Diaz-Gonzalez
8a5b954bda Merge pull request #607 from fbochu/master
Use PLUGIN_PATH in dokku default case.
2014-11-16 00:13:48 -05:00
Jose Diaz-Gonzalez
b766654b4f Merge pull request #359 from plietar/rm-plugins
Remove plugins before copying them again.
2014-11-15 23:34:42 -05:00
Jose Diaz-Gonzalez
af0005196a Standardize the way in which we set variables 2014-11-15 23:32:30 -05:00
Jose Diaz-Gonzalez
c3df79f369 Merge pull-request #702 from jazzzz/config-spaces 2014-11-15 22:12:10 -05:00
Jose Diaz-Gonzalez
0f31ff1f24 Add a set of spaces to prefix config variables when setting them 2014-11-15 22:11:55 -05:00
Ludovic Perrine
043a1a01c5 Fixed setting config values with spaces over SSH 2014-11-15 22:03:54 -05:00
Ludovic Perrine
361011ec69 Added test for config with spaces 2014-11-15 22:03:54 -05:00
Ludovic Perrine
5dbc864060 Handle config values with spaces 2014-11-15 22:03:54 -05:00
Jose Diaz-Gonzalez
ac5f9a707c Merge pull request #755 from progrium/vagrant-dokku-installer
Setup dokku-installer within Vagrant VM on first provision
2014-11-15 20:25:13 -05:00
Jose Diaz-Gonzalez
d4235304ee Merge pull request #699 from tombell/suppress-git-archive-all-output
Actually suppress the output from `git_archive_all`
2014-11-15 20:23:57 -05:00
Jose Diaz-Gonzalez
a2d1d8c065 Setup dokku-installer within Vagrant VM on first provision 2014-11-15 20:14:01 -05:00
Jose Diaz-Gonzalez
190c50b694 Merge pull request #754 from progrium/remove-12-04 2014-11-15 16:59:01 -05:00
Jose Diaz-Gonzalez
ad516d6bf5 Remove all references to Ubuntu 12.04. Refs #238
We no longer test against 12.04 VMs
2014-11-15 16:57:59 -05:00
Jose Diaz-Gonzalez
a9ef99fe3d Merge pull request #573 from Prelang/command-instead-of-which 2014-11-15 16:40:42 -05:00
Erik Nomitch
592c95eaeb Use command instead of which for apt-get existential check in bootstrap.sh 2014-11-15 16:38:40 -05:00
Jose Diaz-Gonzalez
179305eea1 Release 0.3.0 2014-11-15 15:36:02 -05:00
Jose Diaz-Gonzalez
a9010d8af0 Merge pull request #718 from Coaxial/patch-1
Update vagrant installation instructions
2014-11-15 15:33:58 -05:00
Jose Diaz-Gonzalez
a5aab1e637 Merge pull request #749 from vincentfretin/master
Fix app certificate directory in backup-import/export
2014-11-12 12:29:43 -05:00
Jose Diaz-Gonzalez
1406a41448 Merge pull request #746 from vincentfretin/patch-1
replace gitreceive by sshcommand in example url
2014-11-12 12:29:23 -05:00
Jose Diaz-Gonzalez
9d49cd3f4f Merge pull request #750 from th4t/master
Remove unintended phrase repetition in installation.md
2014-11-12 12:29:11 -05:00
Vladislav Supalov
e771b94b3b Remove unintended phrase repetition in installation.md. 2014-11-12 11:00:34 +01:00
Vincent Fretin
977d00efb4 The app certificates directory was renamed to tls in e2135a2c5f 2014-11-11 16:13:35 +01:00
Jeff Lindsay
470755babe Merge pull request #748 from vincentfretin/patch-2
fix dokku development blog link
2014-11-11 09:04:02 -06:00
vincentfretin
9f52d02c30 fix dokku development blog link
http://progrium.com/dokku doesn't exist anymore. The blog is really at http://progrium.com/blog, but http://progrium.com is by default on the blog, so let's use this link.
2014-11-11 15:57:06 +01:00
vincentfretin
1cea737891 replace gitreceive by sshcommand in example url 2014-11-11 12:24:35 +01:00
Jose Diaz-Gonzalez
55e43cccc6 Merge pull request #745 from rcarmo/patch-1
Update README.md
2014-11-06 17:13:22 -05:00
Rui Carmo
a9d5516e04 Update README.md
Sorry, that typo was getting to me :)
2014-11-06 22:05:35 +00:00
Jose Diaz-Gonzalez
c05488b7c6 Merge pull request #735 from andrewsomething/master
Redirect to the app deployment docs on success.
2014-11-01 12:51:33 -04:00
Andrew Starr-Bochicchio
2b21fa3ed9 Redirect to the app deployment docs on success. 2014-10-31 17:52:58 -04:00
Jeff Lindsay
c092dd1719 deis sponsorship 2014-10-28 11:25:45 -05:00
Jose Diaz-Gonzalez
16095d0d79 Merge pull request #664 from alexernst/fix/hostname-url
Don't overwrite $APP/URL modified by plugins in post-deploy hook
2014-10-21 10:34:17 -04:00
Jose Diaz-Gonzalez
71a34f6ff1 Merge pull request #724 from ghostbar/patch-2
Fixing tabs issue
2014-10-20 11:34:57 -04:00
Jose-Luis Rivas
4eecfcb825 Fixing tabs issue
Sorry
2014-10-20 10:34:34 -05:00
Jose Diaz-Gonzalez
92ec836341 Merge pull request #723 from ghostbar/patch-1
Let the user know it's on the `stack` target
2014-10-20 08:02:16 -04:00
Jose-Luis Rivas
8231926eaa Let the user know it's on the stack target
Since curl is running quietly it may give the impression that the installation hanged with the last message on the terminal being: "sleep 2 # give docker a moment i guess". In my case I thought it gave it a huge moment and not 2 seconds. It wasn't until the third time that I actually checked the processes on the machine and saw there it was curl downloading stuff quietly.
2014-10-20 01:35:59 -05:00
Jose Diaz-Gonzalez
c828612480 Merge pull request #721 from wrboyce/master
Fix `plugins-install-dependencies` [fixes #720]
2014-10-19 23:45:28 -04:00
Will Boyce
65c499e439 Fix plugins-install-dependencies [fixes #720] 2014-10-18 02:23:33 +01:00
Pierre
3def960bf0 Update vagrant installation instructions
Avoids 
```
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
```
that can occur on certain Vagrant images. Since we need readonly anyway, might as well use HTTPS instead of SSH.
2014-10-16 18:59:32 -04:00
Jose Diaz-Gonzalez
b8b364fd91 Merge pull request #717 from kristofsajdak/patch-1
Update plugins.md
2014-10-16 10:24:51 -04:00
kristofsajdak
d8d759aea9 Update plugins.md 2014-10-16 09:21:38 +02:00
Jose Diaz-Gonzalez
1663a153a6 Merge branch 'dependencies_hook' 2014-10-16 01:21:21 -04:00
Stafford Brunk
e94b46cb0c Add a dependencies hook for plugin dependency management 2014-10-16 01:19:38 -04:00
Jose Diaz-Gonzalez
10b5ee0321 Merge branch 'patch-1' 2014-10-16 00:50:06 -04:00
Jose Diaz-Gonzalez
2d737dc554 Env vars only set at run time. Closes #555 2014-10-16 00:45:55 -04:00
Jose Diaz-Gonzalez
9fb14d9f28 Merge branch 'fix-variable-name' 2014-10-16 00:42:01 -04:00
Cameron Martin
44cf7f09f9 Fixed variable name.
RESTART_APP was initialized as RESTART.
2014-10-16 00:41:55 -04:00
Jose Diaz-Gonzalez
2f818b81ee Merge branch 'fix-port-ip' 2014-10-16 00:37:24 -04:00
Ludovic Perrine
4cea884f16 Fixed port removal when docker is start with --ip with an IP other than 0.0.0.0 2014-10-16 00:37:11 -04:00
Jose Diaz-Gonzalez
0e590796c0 Merge branch 'check-config-changes' 2014-10-16 00:33:10 -04:00
Ludovic Perrine
0ec9ecad08 Restart app only if config changed 2014-10-16 00:30:07 -04:00
Jose Diaz-Gonzalez
5f5e05bba6 Merge branch 'install_man-db' 2014-10-16 00:08:13 -04:00
protomouse
59e078440d Explicitly install man-db
Dokku requires mandb, but the man-db package is not part of the
minimal Ubuntu base - so install it.
2014-10-16 00:07:51 -04:00
Jose Diaz-Gonzalez
83feec8398 Merge pull request #698 from tombell/clean-up-help
Make `help` command output more consistent
2014-10-15 23:33:34 -04:00
Jose Diaz-Gonzalez
2d0271547d Merge pull request #708 from progrium/576-fix-vagrant
576 fix vagrant
2014-10-15 23:31:13 -04:00
Michael Hobbs
09df79cd8b Merge pull request #1 from expa/mh-merge-upstream
merge from upstream
2014-10-09 11:32:18 -07:00
Michael Hobbs
9c0667c51a Merge remote-tracking branch 'upstream/master' into mh-merge-upstream 2014-10-09 11:29:48 -07:00
Jose Diaz-Gonzalez
b9eed22e35 Change targets to vagrant-* 2014-10-06 18:33:03 -04:00
Jose Diaz-Gonzalez
42a999e7cd Merge pull request #709 from rinti/documentation-fixes
various grammar fixes, spell fixes and added missing words
2014-10-06 11:12:28 -04:00
Andreas Bernacca
48efdb83e7 various grammar fixes, spell fixes and added missing words 2014-10-05 22:36:01 +02:00
Jose Diaz-Gonzalez
ab44c915a8 Add a passthru make target for running dokku commands within the vagrant vm 2014-10-04 18:39:31 -04:00
Jose Diaz-Gonzalez
14145eebb1 Simplify the vagrant workflow
- Moved from wget to cloning the repository
- Add acl-add command to Make
- Modify the docs to use the new methodology
2014-10-04 18:39:31 -04:00
Jose Diaz-Gonzalez
a67c2c927d Fix issue where certain hosts will not have add-apt-repository installed due to missing packages 2014-10-04 18:39:31 -04:00
Jose Diaz-Gonzalez
c5026cafa1 Ensure curl is installed before using command 2014-10-04 18:39:31 -04:00
Jose Diaz-Gonzalez
a748e123be Silence curl stderr progress output 2014-10-04 18:39:31 -04:00
Jose Diaz-Gonzalez
2e5f88b285 Use -qq flag on apt-get to quiet installations of packages 2014-10-04 18:39:28 -04:00
Jose Diaz-Gonzalez
b848accd56 Merge pull request #706 from progrium/docs
Consolidate documentation for viewthedocs
2014-10-04 05:03:59 -04:00
Jose Diaz-Gonzalez
002269a664 Consolidate readme/wiki docs into organized docs folder 2014-10-04 05:01:34 -04:00
Jose Diaz-Gonzalez
fae98dabd4 Merge pull request #703 from jazzzz/help-with-no-parameter
Display help when invoking dokku with no parameter
2014-10-04 03:12:21 -04:00
Jose Diaz-Gonzalez
e1740cda18 Merge pull request #701 from jazzzz/fix-key-format
Fixed key format check
2014-10-02 18:34:15 -04:00
Ludovic Perrine
ab3e00297c Display help when invoking dokku with no parameter 2014-10-02 17:36:29 +02:00
Ludovic Perrine
42df908c65 Fixed key format check 2014-10-02 12:13:09 +02:00
Tom Bell
42c9d7aaa6 Actually suppress the output from the git commands 2014-09-30 21:08:23 +01:00
Tom Bell
d9952bcae8 Make help output more consistent 2014-09-30 19:48:06 +01:00
Jose Diaz-Gonzalez
a69f63c98c Merge pull request #696 from progrium/revert-657-CNAME_option
Revert "Add CNAME option"
2014-09-29 23:46:51 -04:00
Jose Diaz-Gonzalez
db7e36e0ca Revert "Add CNAME option" 2014-09-29 23:44:23 -04:00
Michael Hobbs
5fcba7e288 port 'wait_to_retire' from broadly/dokku 2014-09-02 18:18:14 -07:00
Alex Ernst
22beb6c007 move post-deploy hook
Write $DOKKU_ROOT/$APP/URL before post-deploy hook.
2014-08-22 12:36:20 +02:00
Jeff Lindsay
4e9d797d45 Merge pull request #657 from arthurnn/CNAME_option
Add CNAME option
2014-08-19 16:28:43 -05:00
Jeff Lindsay
07cdab6187 Merge pull request #562 from assaf/zero-downtime
Zero down-time deploy and server checks
2014-08-18 21:08:09 -05:00
Sam Dodrill
939a876348 contrib: add dokku client shell script
This is adapted from the one I use in my shell profile scripts. This
kinda-sorta-maybe acts like the `heroku` or `deis` commands and does
some clever reorganization of data before sending it to the server.

To use the app name generator, install the `elfs` rock from Moonrocks.
2014-08-16 19:05:20 -07:00
Arthur Neves
0cd1839ce8 Add CNAME option
When a repo have a CNAME file, it will use the URL on it to map the server_name on ngnix
2014-08-14 14:43:35 -04:00
Fabien Bochu
22cdc11d57 Use PLUGIN_PATH in dokku default case. 2014-08-13 21:27:47 +02:00
Jeff Lindsay
8760c94143 Merge pull request #628 from voronianski/master
Update Vagrant box to trusty because of raring server issues
2014-08-08 12:49:30 -05:00
Dmitri Voronianski
1feaeecee3 update box to trusty 2014-07-16 15:14:33 +03:00
joliv
d269782812 Updated man page date
I forgot to change it. I even left myself a reminder!
2014-05-10 16:43:21 -04:00
joliv
fde5054e0f Added man page plugin command warning
As of now, the man page does not update when plugins are installed.
2014-05-10 16:32:27 -04:00
rhy-jot
4f5fc58629 Update cipher list
http://blog.cloudflare.com/killing-rc4-the-long-goodbye
2014-05-07 15:10:12 -07:00
Assaf Arkin
00ec004871 Zero down-time deploy and server checks
This change makes Dokku start up the new container, run a set of checks
against it, and only switch traffic over to the new containers if all
checks complete successfully. No requests are dropped during the switch
over.

To specify checks, add a CHECKS file to the root of your project
directory. This is a text file with one line per check. Empty lines and
lines starting with # are ignored.

A check is a relative URL and may be followed by expected content from
the page, for example:

  /about     Our Amazing Team

Even if you don’t use any checks, this change will prevent downtime
during switching from old to new container.

See: https://labnotes.org/zero-downtime-deploy-with-dokku/
2014-04-28 21:28:50 -07:00
rhy-jot
42fee25f2f 13.10 is EOL in ~2 months & there's a successor 2014-04-18 17:36:13 -07:00
rhy-jot
beca39a55a Mention 14.04 & 12.10 sunset 2014-04-18 17:35:43 -07:00
rhy-jot
9ac94abcf0 Merge pull request #544 from jfrazelle/master
dokku.conf
2014-04-15 15:04:55 -07:00
Jessica Frazelle
969aed87c6 double brackets 2014-04-15 09:31:08 -04:00
Jessica Frazelle
2953ed2486 if dokku.conf has not been created, create it 2014-04-14 20:24:18 -04:00
rhy-jot
2f12a371e0 Update stable's version 2014-04-13 10:23:31 -07:00
Paul Lietar
4da4995a18 Only delete core plugins. 2013-11-29 20:57:53 +00:00
Paul Lietar
78591a618b Remove plugins before copying them again.
This way plugins can rename/delete files w/o having old files lying around.
2013-11-29 20:57:53 +00:00
246 changed files with 9917 additions and 900 deletions

16
.editorconfig Normal file
View File

@@ -0,0 +1,16 @@
root = true
[*]
insert_final_newline = true
indent_style = space
indent_size = 2
[Makefile]
insert_final_newline = true
indent_style = tab
indent_size = 4
[*.mk]
insert_final_newline = true
indent_style = tab
indent_size = 4

3
.gitignore vendored
View File

@@ -1,3 +1,6 @@
.vagrant
.DS_Store
stack.tgz
build
tmp
*.deb

38
.s3cfg
View File

@@ -1,38 +0,0 @@
[default]
access_key
secret_key
bucket_location = US
cloudfront_host = cloudfront.amazonaws.com
cloudfront_resource = /2010-07-15/distribution
default_mime_type = binary/octet-stream
delete_removed = False
dry_run = False
encoding = UTF-8
encrypt = False
follow_symlinks = False
force = False
get_continue = False
gpg_command = None
gpg_decrypt = %(gpg_command)s -d --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o %(output_file)s %(input_file)s
gpg_encrypt = %(gpg_command)s -c --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o %(output_file)s %(input_file)s
gpg_passphrase =
guess_mime_type = True
host_base = s3.amazonaws.com
host_bucket = %(bucket)s.s3.amazonaws.com
human_readable_sizes = False
list_md5 = False
log_target_prefix =
preserve_attrs = True
progress_meter = True
proxy_host =
proxy_port = 0
recursive = False
recv_chunk = 4096
reduced_redundancy = False
send_chunk = 4096
simpledb_host = sdb.amazonaws.com
skip_existing = False
socket_timeout = 300
urlencoding_mode = normal
use_https = False
verbosity = WARNING

View File

@@ -1,16 +0,0 @@
---
branches:
only:
- master
script:
- echo "StrictHostKeyChecking=no" >> ~/.ssh/config
- export IP=$(curl -s http://dokku-ci.herokuapp.com/hosts | tail -1)
- git config --global user.email "travis-ci@exmaple.com"
- git config --global user.name "Travis CI"
- git checkout --orphan orphan HEAD
- git commit -am 'orphaned'
- git remote add runner ssh://test@$IP:2022/dokku
- sleep 8
- git push runner orphan:master
notifications:
irc: "chat.freenode.net#dokku"

View File

@@ -1,9 +1,11 @@
# If you're submitting a patch, please add your name here in alphabetical order as part of the patch.
# This file lists all individuals having contributed content to the repository.
#
3onyc <3onyc@x3tech.com>
Alexander <iam.asm89@gmail.com>
Alexander Beletsky <alexander.beletsky@gmail.com>
Alexis Gavoty <kload@kload.fr>
Christian Joudrey <cmallette@gmail.com>
Felipe Coury <felipe.coury@gmail.com>
Jeff Lindsay <progrium@gmail.com>
Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
@@ -11,6 +13,7 @@ Leo Unbekandt <leo@unbekandt.eu>
Ludovic Perrine <jazzzz@gmail.com>
Luigi Maselli <grigio.org@gmail.com>
Martin Weiss <kornnflake@gmail.com>
Michael Hobbs <github@psudo.net>
Paul Lietar <paul@lietar.net>
Rajiv Makhijani <rajiv@blue-tech.org>
rhy-jot <rhy-jot@myeml.net>

View File

@@ -1,8 +1,483 @@
# History
## 0.3.0 (in progress)
## 0.3.26
This release has a few new features, the largest of which is switching from buildstep to herokuish for building containers. Going forward, this should help ensure that built containers are as close to heroku containers as possible, and also allow us to be on the cutting edge of heroku buildpack support. Props to @michaelshobbs for his work on herokuish.
### Bug Fixes
- #1401: @josegonzalez Install apt-transport-https before adding https-backed apt sources
### New Features
- #1128: @michaelshobbs Switch from buildstep to herokuish
- #1399: @basicer Make dokku play nice when there are multiple receive-app hooks
- #1413: @michaelshobbs support comments in DOKKU_SCALE and print contents on deploy
### Documentation
- #1400: @josegonzalez Fix HISTORY.md formatting
- #1410: @josegonzalez Clarify DOKKU_SCALE usage
- #1411: @josegonzalez Clarify `ps:scale` example
## 0.3.25
This release is a bugfix release fixing a broken 0.3.25 apt-get installation.
### Bug Fixes
- #1398 @josegonzalez Revert "Remove `dokku plugins-install` from postinst hook
## 0.3.24
This release is a bugfix release covering dokku packaging.
### Bug Fixes
- #1397: @josegonzalez Use https docker apt repo
- #1394: @josegonzalez Remove `dokku plugins-install` from postinst hook
### Docs Changes
- #1395: @adrianmoya Adding fqdn requirement
## 0.3.23
This release is a bugfix release mostly covering installation and nginx issues. As well, we launched a nicer documentation site [here](http://progrium.viewdocs.io/dokku/). Thanks to all of our contributors for making this a great release!
### Bug Fixes
- #1334: @josegonzalez Fix pluginhook building and update package version
- #1335: @josegonzalez Fix name for michaelshobbs
- #1341: @michaelshobbs Honor $DOKKU_DOCKERFILE_PORT when binding the docker container to an external IP.
- #1357: @michaelshobbs only run domains and nginx config if we have a port and ip
- #1366: @omeid Make bootstrap.sh safe from bad connection
- #1370: @SamuelMarks Switch from /dev/null to -qq, from --silent to -sL, and sudo
- #1380: @emdantrim Removed uses of `sudo` from `bootstrap.sh`
- #1383: @michaelshobbs fix downscaling from 10+
### New Features
- #1292: @michaelshobbs use column to format help output
- #1337: @josegonzalez Update PREBUILT_STACK_URL to latest buildstep release
- #1354: @alessio Log receive-branch pluginhook
- #1359: @michaelshobbs allow DOKKU_WAIT_TO_RETIRE to be defined per app
- #1365: @michaelshobbs support dockerfile images that don't include bash
### Docs Changes
- #1305: @josegonzalez Updated documentation site
- #1321: @fwolfst Mention alternative to nginx.conf templates: include-dir.
- #1346: @michaelshobbs document dokku cleanup and the potential of compat issues
- #1349: @alexkruegger add plugin dokku-app-configfiles
- #1358: @bkniffler Add suggestion for low memory VMs
- #1377: @vkurup Fix link to docs from README
- #1379: @jezdez Deleted old, unmaintained plugins
- #1381: @lunohodov Instructions for using the bash client in shells other than bash
## 0.3.22
This release is a general bugfix release, with improvements to handling of nginx templates and application configuration.
### Bug Fixes
- #825: @andrewsomething Add support for multiple keys in the installer.
- #1274: @michaelshobbs Parse correct section of path for `dokku ls` container type
- #1289: @michaelshobbs Do not background container cleanup
- #1298: @SonicHedgehog Fix check-deploy skipping the root path
- #1300: @michaelshobbs Fix urls command when NO_VHOST=1
- #1310: @michaelshobbs Use config:get for checks skipping variables
- #1311: @michaelshobbs Ignore protocol of Dockerfile EXPOSE (refs: #1280)
- #1312: @michaelshobbs Use docker inspect fordefault container check. Closes #1270
- #1313: @michaelshobbs Verify we have an app when deploy is called. Closes #1309
- #1319: @MWers Spelling fix: 'comma seperated'=>'comma-separated'
- #1331: @alexkruegger Fix retrieval of nginx.conf.template app
### New Features
- #1149: @mlebkowski Add pluginhook to receive branches different than master
- #1254: @kilianc Add DOKKU_DOCKERFILE_START_CMD support
- #1261: @Flink Add the ability to skip checks (all or default)
- #1277: @krokhale Add gzip to nginx templates by default
- #1278: @assaf Add the ability to retrieve nginx template from app
- #1291: @michaelshobbs Refactored interface for managing global/local app configuration
- #1299: @SonicHedgehog Set X-Forwarded-Proto header if TLS is enabled when running checks
### Docs Changes
- #1273: @alessio Add docs for the events plugin
- #1276: @josegonzalez Reorder and deprecate a few plugins
- #1279: @josegonzalez Add docs for `receive-branch` hook. Refs #1149
- #1282: @josegonzalez Move primecache to deprecated plugins
- #1285: @josegonzalez Rename dokku-events-logs.md according to index.md
- #1296: @Flink Add docker-auto-volumes to plugins
- #1301: @mixxorz Add reset mtime plugin list
- #1302: @fwolfst Mention where original nginx templates are found by default.
- #1306: @josegonzalez Clarify web/cli installation docs. Closes #1177. Closes #1170
- #1307: @josegonzalez Add release documentation. Closes #1287
- #1324: @michaelshobbs Update docs to reflect default checks
## 0.3.21
This release fixes an issue with installing buildstep and dokku.
### New Features
- #1256: @alessio Log all dokku events to /var/log/dokku/events.log
### Bug Fixes
- #1269: @josegonzalez Peg lxc-docker in buildstep to 1.6.2
## 0.3.20
This release pegs Dokku to Docker 1.6.2. Docker 1.7.0 introduced changes in `docker ps` which cause incompatibilities with many popular dokku plugins.
### New Features
- #1245: @arthurschreiber Support config variables containing `\n`
- #1257: @josegonzalez Split nginx ssl logs by $APP
### Bug Fixes
- #1207: @rockymadden Fixed bug with client commands taking verb, appname, and also arguments.
- #1251: @josegonzalez Fallback to using /etc/init.d/nginx reload directly to restart nginx
- #1264: @josegonzalez Require lxc-docker-1.6.2
### Docs Changes
- #1252: @josegonzalez Fix ssh port for vagrant installation. Closes #1139. [ci skip]
- #1250: @josegonzalez SSL documentation is misleading
## 0.3.19
### New Features
- #1118: @michaelshobbs Heroku-style Container-Level scaling
- #1210: @cddr Split nginx logs out by $APP
- #1232: @michaelshobbs Allow passing of docker build options and document dockerfile deployment. Closes #1231
### Bug Fixes
- #1179: @follmann Prevent dismissal of URLs in CHECKS file that contain query params
- #1193: @michaelshobbs Handle docker opts over ssh without escaping quotes. closes #1187
- #1198: @3onyc Check web_config before key_file (Fixes #1196)
- #1200: @josegonzalez Fix lintball from #1198
- #1202: @michaelshobbs Filter out literal wildcard when deploying an unrelated domain. Closes #1185
- #1204: @3onyc Fix bootstrap.sh, install curl when it's missing, make curl follow redirects, don't suppress stderr
- #1206: @rockymadden Handle for installs in /usr/local/bin and the like.
- #1212: @michaelshobbs Let circleci dictate docker install (fixes master)
- #1217: @kirushanth-sakthivetpillai Fix broken ssl wildcard redirect
- #1227: @Flink Use --no-cache when building Dockerfile
- #1246: @josegonzalez Ensure we call apt-get before installing packages
### Docs Changes
- #1168: @cjblomqvist [docs] Update git-rev plugin to point to maintained version
- #1180: @sherbondy [docs] Clarify usage around official dokku `docker-options` plugin
- #1192: @alessio [docs] Add reference to dokku-events plugin
- #1218: @michaelshobbs [docs] add dokku-logspout plugin
- #1224: @lmars [docs] Add link from plugin-creation to pluginhooks
- #1237: @zyegfryed [docs] Typo (at at -> at)
## 0.3.18
- #1111: @michaelshobbs Call pre-build-dockerfile before docker build
- #1119: @joshco Logging info suggesting tuned CHECKS
- #1120: @josegonzalez [docs] Add freenode shield to readme
- #1121: @josegonzalez Prompt users to run the web installer via MOTD. Closes #943
- #1129: @josegonzalez Validate nginx configuration before restarting nginx
- #1137: @YellowApple [docs] Safer installation method
- #1138: @chrisbutcher [docs] Include tip about using sshcommand acl-add
- #1140: @NigelThorne [docs] Replaced reference to gitreceive with sshcommand as per #746
- #1144: @protonet Allow git-remote with different port
- #1145: @michaelshobbs allow docker-options over ssh. plus test. closes #1135
- #1146: @michaelshobbs Don't re-deploy on domains:add. allow multple domains on command line. Closes #1142
- #1147: @michaelshobbs Utilize all 4 free CircleCI containers
- #1148: @TheEmpty [docs] Add information about 444 for nginx in default_sever.
- #1150: @cjblomqvist [docs] Add monit plugin
- #1151: @LTe Do not kill docker container with SIGKILL
- #1153: @econya [docs] Add README-section: how to contribute
- #1058: @josegonzalez Move bootstrap script to use debian package where possible
- #1171: @josegonzalez Use debconf for package configuration
- #1172: @michaelshobbs unify default and custom nginx template processing
- #1173: @josegonzalez [docs] standardize readme badges
- #1178: @jagandecapri [docs] Update plugins.md
- #1189: @vincentfretin wait 30 seconds and not 30 minutes
- #1190: @josegonzalez Fix docker gpg key installation
## 0.3.17
- #1056: @joshco New check retries feature
- #1060: @josegonzalez Add .template suffix to nginx configuration templates. Refs #1054
- #1064: @michaelshobbs [docs] Document test suite
- #1065: @michaelshobbs Minor dev env cleanup
- #1067: @martinAntsy Fix nginx docs wording around config template eg
- #1068: @matiaskorhonen Fix escaping in the rc.local script in the Linode StackScript
- #1074: @Flink Better detection of dokku remote in dokku_client.sh
- #1075: @Flink Use TTY option for SSH
- #1077: @Flink [docs] Add dokku-psql-single-container to plugins
- #1079: @rorykoehler Corrected configuration link in bootstrap.sh
- #1080: @michaelshobbs Include official docker-options plugin. closes #1062
- #1081: @michaelshobbs Force testing .env with no newline. Closes #1025, #1026, #1063
- #1082: @michaelshobbs Test cleanup with slight performance boost
- #1084: @awendt Make port forwarding configurable
- #1087: @michaelshobbs Make docker-options adhere to DOKKU_NOT_IMPLEMENTED_EXIT pattern
- #1088: @michaelshobbs Support dockerfiles without expose command. closes #1083
- #1097: @michaelshobbs Use config:set-norestart in domains plugin. config:get for dockerfile port. closes #1041
- #1102: @kblcuk Source app-specific ENV during check-deploy
- #1107: @Benjamin-Dobell [docs] Added Dokku Graduate to the list of known plugins
## 0.3.16
- #974: @michaelshobbs Don't use set to guard against pipefail
- #975: @michaelshobbs Simplify SSL hostname handling and avoid overwriting variables. refs #971
- #978: @michaelshobbs Add apparmor and cgroup-lite as pre-dependencies for dokku debian package
- #980: @josegonzalez [docs] Add documentation for pluginhooks
- #981: @josegonzalez Remove old files
- #982: @josegonzalez [docs] Add documentation for existing clients. Closes #977
- #983: @josegonzalez [docs] Update installation documentation
- #984: @josegonzalez [docs] Clarify installation instructions
- #988: @josegonzalez [docs] Add deprecated plugins section and where to get help
- #989: @josegonzalez [docs] Add more clients
- #986: @josegonzalez Switch to yabawock's static nginx buildpack for tests
- #987: @techniq Improve Dockerfile example/test
- #967: @alessio Really clean-up containers and images a-la-Docker
- #992: @josegonzalez [docs] Fix digital ocean docs. Closes #991
- #994: @alessio Fix quoting in container termination. Closes #249
- #996: @pmvieira [docs] Minor typo fix in the pluginhooks documentation
- #1003: @michaelshobbs Remove quoting around cleanup and disable lint for those lines
- #1001: @sekjun9878 [docs] Add sekjun9878/dokku-redis-plugin to plugins.md
- #1004: @michaelshobbs Remove quoting from dockerfile env. closes #1002
- #1018: @michaelshobbs Confine arg shifting to between dokku and command. closes #1017
- #1022: @Flink [docs] Add dokku-maintenance to plugins
- #1008: @lmars Support multiple domains using a wildcard TLS certificate
- #1013: @lmars Fix URL schemes in `dokku urls` output
- #1027: @nickstenning [docs] Add webhooks plugin to documentation
- #1026: @michaelshobbs Ensure we have newlines around our config. closes #1025
- #1010: @michaelshobbs Don't run create/destroy twice in tests
- #1028: @Flink [docs] Add rails-logs to plugins
- #1031: @michaelshobbs Upgrade docker in CI to 1.5.0
- #1029: @assaf Added several enhancements for CHECKS file:
- Specify how long to wait before running first check
- Specify timeout for each check
- Check specific hosts, e.g. http://signin.example.com
- Check both HTTP and HTTPS resources
- #1032: @cameron-martin Updated dokku-installer to use relative path
- #1035: @Flink [docs] Add dokku-http-auth to plugins
- #1040: @ebeigarts [docs] Add dokku-slack plugin information
- #1038: @michaelshobbs Default container check. closes #1020
- #1036: @michaelshobbs Create config set/unset without restart. closes #908
- #1009: @michaelshobbs Extract first port from Dockerfile and set config variable for use in deploy phase. closes #993
- #1042: @michaelshobbs Update to Support xip.io wildcard DNS as a VHOST
- #1043: @michaelshobbs Use upstart config from docker docs. closes #1015
- #1047: @michaelshobbs Show logs on deploy success and failure
- #1049: @ebeigarts [docs] Change Slack Notifications link
- #1051: @Flink [docs] Add dokku-airbrake-deploy to plugins
- #1057: @josegonzalez Updated deb packaging
## 0.3.15
- #950: @michaelshobbs Do not count blank lines in `make count`
- #952: @michaelshobbs Document cli args over ssh. closes #951
- #954: @michaelshobbs Dockerfile support
- #955: @michaelshobbs Quick style refactor
- #956: @michaelshobbs Comment out skipped tests as we pay the cost for setup() and teardown() anyway
- #957: @michaelshobbs Implement dokku shell and ls (by @plietar). refs #312
- #960: @michaelshobbs Use consistent bash shebang. closes #959
- #962: @josegonzalez Update debian package building due to man page generation changes
- #964: @michaelshobbs Only look for long args in global space. allows for short args in plugins. closes #963
- #966: @djelic handle upgrade in debian/preinst script
## 0.3.14
- #891: @josegonzalez Keep existing configuration files when installing nginx. Refs #886
- #892: @josegonzalez Change documentation on where the ssh config PORT is setup
- #894: @josegonzalez Dokku client improvements
- #895: @michaelshobbs Document deploying private git submodules. Closes #644
- #896: @michaelshobbs Add docker-args pluginhook call to build phase. Closes #515
- #897: @michaelshobbs Official PS plugin
- #898: @joliv Update man page for 0.3.13
- #899: @joliv Use help2man to automatically generate man pages
- #900: @michaelshobbs Support extracting SANs from SSL certificates and adding them to nginx config
- #901: @misto Pull new tags when upgrading to update VERSION
- #904: @michaelshobbs Prevent error on restartall when no apps deployed
- #905: @vincentfretin robv/dokku-elasticsearch not compatible with latest version
- #907: @vincentfretin Don't use -o pipefail for plugin
- #914: @michaelshobbs Conditionally set interactive and tty on dokku run. Closes #552. Closes #913
- #915: @michaelshobbs Document default sites in nginx. Closes #650
- #916: @michaelshobbs Document build phase troubleshooting suggestions. Closes #841. Closes #911.
- #917: @michaelshobbs Document resolvconf troubleshooting step. Closes #649
- #922: @michaelshobbs Use tty cmd to detect if we have one. Closes #921
- #925: @michaelshobbs Implement rebuild command that reuses git_archive_all
- #926: @dyson Update Troubleshooting link in README.md.
- #927: @michaelshobbs Support both docker-args PHASE and docker-args-PHASE. Closes #906
- #933: @michaelshobbs Remove references to .pem. Closes #930
- #936: @michaelshobbs Only execute build stack if we have access to /var/run/docker.sock. Closes #929
- #938: @vincentfretin Enable ssl_prefer_server_ciphers
- #940: @michaelshobbs Use valid composer json with specified php runtime
- #941: @michaelshobbs Source global env prior to app env. Closes #931
- #942: @michaelshobbs Test clojure app
- #949: @michaelshobbs Common functions library with simple argument parsing. Closes #932. Closes #945
## 0.3.13
- #815: @abossard Added wordpress installation helper to plugin index
- #858: @josegonzalez Disable server tokens in nginx. Closes #857
- #859: @josegonzalez Pass command being executed when retrieving DOCKER_ARGS via pluginhook.
- #861: @josegonzalez Default DOKKU_ROOT to ~dokku if unspecified. Closes #587
- #863: @josegonzalez Add missing properties to the php composer.json
- #864: @michaelshobbs bind docker container to internal port if using vhosts
- #867: @michaelshobbs silent grep stderr. closes #862
- #868: @michaelshobbs use circleci for automated testing
- #872: @michaelshobbs fix/enable multi buildpack test
- #873: @michaelshobbs support pre deployment usage of domains plugin. fixes interface binding issue
- #874: @josegonzalez Add advanced installation docs that were removed in #706. Closes #869
- #876: @vincentfretin give CACHE_PATH env variable for forward compatibility with herokuish
- #877: @michaelshobbs add MH to AUTHORS
- #880: @michaelshobbs disable VHOST deployment if global VHOST file is missing and an app domain has not been added
- #881: @jomo troubleshooting typo: 64 != 46
- #884: @michaelshobbs IP and PORT are likely to get clobbered. rename them
- #885: @michaelshobbs test deploy node app without procfile
## 0.3.12
- #846: @michaelshobbs add certificate CN to app VHOST if it's not already
- #847: @leonardodino Update bootstrap.sh: new docs url
- #849: @cjoudrey Add docs for CHECKS
- #850: @michaelshobbs test scala deployment
## 0.3.11
- #821: @michaelshobbs use wercker for automated testing
- #833: @michaelshobbs auto remove the cache dir cleanup container
- #835: @michaelshobbs make sure we match the specific string in VHOST
- #838: @michaelshobbs quote build_env vars to allow for spaces in config
- #839: @michaelshobbs notify irc on builds
- #844: @michaelshobbs build app urls based on wildcard ssl or app ssl
## 0.3.10
- #783: @josegonzalez New domains plugin and nginx extension
- #818: @michaelshobbs rebuild nginx config on domain change
- #827: @michaelshobbs Handle IP only access
- #828: @michaelshobbs Display the port for an app when falling back to the ip address
## 0.3.9
- #787: @josegonzalez/@michaelshobbs Official user-env-compile plugin
- Uses ENV and APP/ENV files
- Supports old `BUILD_ENV` files (which are likely in wide-use)
- Allows user's to override globals with app-specific configuration
- Migrate `$DOKKU_ROOT/BUILD_ENV` to `$DOKKU_ROOT/ENV` if the former exists and the latter does not
- Drop `BUILD_ENV` support in favor of just `ENV` via a `mv` command
- Add default ENV with `CURL_TIMEOUT` and `CURL_CONNECT_TIMEOUT`
- #811: @abossard Increased `server_names_hash_bucket_size` in nginx.conf to 512
- #814: @josegonzalez Source files in $DOKKU_ROOT/.dokkurc directory and add `dokku trace` command
- #816: @josegonzalez Add documentation for user-env feature
## 0.3.8
- #796: @josegonzalez Better vagrant documentation
- #801: @joelvh Point users to upgrade guides
- #805: @ademuk Fixed import-ssl server.crt/key check
- #806: @josegonzalez Dokku pushes now happen as the dokku user, not git. Refs #796
- #807: @josegonzalez Write proper nginx conf upon installation. Closes #799
- #808: @josegonzalez Ensure makefiles are properly formatted
## 0.3.7
- #788: @mmerickel fix apps plugin issues in 0.3.6
- #789: @mmerickel do not output message when creating ENV file
## 0.3.6
- #782: @josegonzalez Simplified config checking
- #785: @lsde fix missing semicolon in nginx config
## 0.3.5
- #784: @josegonzalez Fix NO_VHOST check
## 0.3.4
- #780: @josegonzalez Output error message when a command is not found. Closes #778
- #781: @michaelshobbs use DOKKU_IMAGE (i.e. progrium/buildstep)
## 0.3.3
- #659: @Xe contrib: add dokku client shell script
- #669 @ohardy Handle dokku plugins-update command
- #722: @wrboyce Add `git pull` support with git-pre-pull and git-post-pull hooks
- #751: @tboerger Partial openSUSE support
- #776: @joliv Update man page for new commands
- #777: @tboerger Use PLUGINS_PATH env var and persist environment when running dokku with sudo
- #779: @josegonzalez Minor bash formatting changes
## 0.3.2
- #675: @michaelshobbs port wait-to-retire from broadly/dokku
- #765: @josegonzalez Ignore tls directory when listing apps
- #766: @josegonzalez Sort output of apps command
- #771: @josegonzalez Doc updates
- #518 #772: @nickl- Import ssl certificates
- #773: @alex-sherwin Support a way to not create nginx vhost
- #774: @josegonzalez Add the ability to customize an app's hostname using nginx-hostname pluginhook
## 0.3.1
- 647b2157: @josegonzalez Update HISTORY.md for 0.3.0
- #359: @plietar Remove plugins before copying them again
- #573: @eriknomitch Use command instead of which for apt-get existential check in bootstrap.sh
- #579: @motin Plugin nginx-vhosts includes files in folder nginx.conf.d
- #607: @fbochu Use PLUGIN_PATH in dokku default case
- #617: @markstos Document what bootstrap.sh is doing
- #758: @josegonzalez Make ENV file readable only from dokku user. Closes #621
- #699: @tombell Actually suppress the output from `git_archive_all`
- #702: @jazzzz Allows config:set to set parameters values with spaces
- #754: @josegonzalez Remove all references to Ubuntu 12.04. Refs #238
- #755: @josegonzalez Setup dokku-installer within Vagrant VM on first provision
- #759: @josegonzalez Create an `apps` core plugin
- #760: @josegonzalez Formatting
- #761: @josegonzalez Add dokku-registry to list. Closes #716
- #762: @josegonzalez Update template for dokku docs
## 0.3.0
- Added git submodules support
- 969aed87: @jfrazelle Fix double brackets issue in nginx-vhosts install
- 42fee25f: @rhy-jot Mention 14.04 & 12.10 sunset
- 4f5fc586: @rhy-jot Update cipher list
- #276: @wingrunr21 Add dependencies hook
- #476: @joliv Added man page entry
- #522: @wingrunr21 Improve SSL support and implement SPDY
- #544: @jfrazelle if dokku.conf has not been created, create it
- #555: @jakubholynet Readme fix, Env vars only set at run time
- #562: @assaf Zero down-time deploy and server checks
- #571: @joliv Added man page plugin command
#601: @jazzzz Restart app only if config changed
- #628: @voronianski Update Vagrant box to trusty because of raring server issues
- #632: @jazzzz Fixed port when docker is start with --ip with an IP other than 0.0.0.0
- #654: @cameron-martin Fixed variable name for RESTART
- #664: @alexernst Don't overwrite $APP/URL modified by plugins in post-deploy hook
- #665: @protomouse Explicitly install man-db
- #698: @tombell Help output formatting
- #701: @jazzzz Fix issues with single-letter config:set usage
- #703: @jazzzz Display help when invoking dokku with no parameter
- #706: @josegonzalez Consolidate documentation on viewthedocs
- #709: @rinti Grammar and spelling fixes
- #708: @josegonzalez Simplify vagrant workflow
- #717: @kristofsajdak Add dokku-registry to plugin list
- #718: @Coaxial Use https for installation instructions
- #721: @wrboyce Fix issue in plugins-install-dependencies
- #723: @ghostbar Let users know they are starting buildstep during installation
- #735: @andrewsomething Redirect to the app deployment docs on success.
- #745: @rcarmo Typo
- #746: @vincentfretin replace gitreceive by sshcommand in example url
- #748: @vincentfretin Link to proper blog url
- #749: @vincentfretin Fix app certificate directory in backup-import/export
- #750: @th4t Remove unintended phrase repetition in installation.md
* Added git submodules support
## 0.2.0 (2013-11-24)

122
Makefile
View File

@@ -2,34 +2,82 @@ DOKKU_VERSION = master
SSHCOMMAND_URL ?= https://raw.github.com/progrium/sshcommand/master/sshcommand
PLUGINHOOK_URL ?= https://s3.amazonaws.com/progrium-pluginhook/pluginhook_0.1.0_amd64.deb
STACK_URL ?= https://github.com/progrium/buildstep.git
PREBUILT_STACK_URL ?= https://github.com/progrium/buildstep/releases/download/2014-03-08/2014-03-08_429d4a9deb.tar.gz
DOKKU_ROOT ?= /home/dokku
STACK_URL ?= https://github.com/gliderlabs/herokuish.git
PREBUILT_STACK_URL ?= gliderlabs/herokuish:latest
PLUGINS_PATH ?= /var/lib/dokku/plugins
.PHONY: all install copyfiles version plugins dependencies sshcommand pluginhook docker aufs stack count
# If the first argument is "vagrant-dokku"...
ifeq (vagrant-dokku,$(firstword $(MAKECMDGOALS)))
# use the rest as arguments for "vagrant-dokku"
RUN_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
# ...and turn them into do-nothing targets
$(eval $(RUN_ARGS):;@:)
endif
ifeq ($(CIRCLECI),true)
BUILD_STACK_TARGETS = circleci deps build
else
BUILD_STACK_TARGETS = build-in-docker
endif
.PHONY: all apt-update install copyfiles man-db version plugins dependencies sshcommand pluginhook docker aufs stack count dokku-installer vagrant-acl-add vagrant-dokku
include tests.mk
include deb.mk
all:
# Type "make install" to install.
install: dependencies stack copyfiles plugins version
install: dependencies copyfiles plugin-dependencies plugins version
copyfiles: addman
release: deb-all package_cloud packer
package_cloud:
package_cloud push dokku/dokku/ubuntu/trusty herokuish*.deb
package_cloud push dokku/dokku/ubuntu/trusty sshcommand*.deb
package_cloud push dokku/dokku/ubuntu/trusty pluginhook*.deb
package_cloud push dokku/dokku/ubuntu/trusty rubygem*.deb
package_cloud push dokku/dokku/ubuntu/trusty dokku*.deb
packer:
packer build contrib/packer.json
copyfiles:
cp dokku /usr/local/bin/dokku
mkdir -p /var/lib/dokku/plugins
cp -r plugins/* /var/lib/dokku/plugins
mkdir -p ${PLUGINS_PATH}
find ${PLUGINS_PATH} -mindepth 2 -maxdepth 2 -name '.core' -printf '%h\0' | xargs -0 rm -Rf
find plugins/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read plugin; do \
rm -Rf ${PLUGINS_PATH}/$$plugin && \
cp -R plugins/$$plugin ${PLUGINS_PATH} && \
touch ${PLUGINS_PATH}/$$plugin/.core; \
done
$(MAKE) addman
addman:
mkdir -p /usr/local/share/man/man1
cp dokku.1 /usr/local/share/man/man1/dokku.1
help2man -Nh help -v version -n "configure and get information from your dokku installation" -o /usr/local/share/man/man1/dokku.1 dokku
mandb
version:
git describe --tags > ${DOKKU_ROOT}/VERSION 2> /dev/null || echo '~${DOKKU_VERSION} ($(shell date -uIminutes))' > ${DOKKU_ROOT}/VERSION
git describe --tags > ~dokku/VERSION 2> /dev/null || echo '~${DOKKU_VERSION} ($(shell date -uIminutes))' > ~dokku/VERSION
plugin-dependencies: pluginhook
dokku plugins-install-dependencies
plugins: pluginhook docker
dokku plugins-install
dependencies: sshcommand pluginhook docker stack
dependencies: apt-update sshcommand pluginhook docker help2man man-db
$(MAKE) -e stack
apt-update:
apt-get update
help2man:
apt-get install -qq -y help2man
man-db:
apt-get install -qq -y man-db
sshcommand:
wget -qO /usr/local/bin/sshcommand ${SSHCOMMAND_URL}
@@ -41,32 +89,64 @@ pluginhook:
dpkg -i /tmp/pluginhook_0.1.0_amd64.deb
docker: aufs
apt-get install -qq -y curl
egrep -i "^docker" /etc/group || groupadd docker
usermod -aG docker dokku
curl https://get.docker.io/gpg | apt-key add -
echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list
ifndef CI
curl -sSL https://get.docker.com/gpg | apt-key add -
echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list
apt-get update
ifdef DOCKER_VERSION
apt-get install -y lxc-docker-${DOCKER_VERSION}
apt-get install -qq -y lxc-docker-${DOCKER_VERSION}
else
apt-get install -y lxc-docker
apt-get install -qq -y lxc-docker-1.6.2
endif
sleep 2 # give docker a moment i guess
endif
aufs:
lsmod | grep aufs || modprobe aufs || apt-get install -y linux-image-extra-`uname -r`
ifndef CI
lsmod | grep aufs || modprobe aufs || apt-get install -qq -y linux-image-extra-`uname -r` > /dev/null
endif
stack:
ifeq ($(shell test -e /var/run/docker.sock && touch -c /var/run/docker.sock && echo $$?),0)
ifdef BUILD_STACK
@docker images | grep progrium/buildstep || (git clone ${STACK_URL} /tmp/buildstep && docker build -t progrium/buildstep /tmp/buildstep && rm -rf /tmp/buildstep)
@echo "Start building herokuish from source"
docker images | grep gliderlabs/herokuish || (git clone ${STACK_URL} /tmp/herokuish && cd /tmp/herokuish && IMAGE_NAME=gliderlabs/herokuish BUILD_TAG=latest VERSION=master make -e ${BUILD_STACK_TARGETS} && rm -rf /tmp/herokuish)
else
@docker images | grep progrium/buildstep || curl -L ${PREBUILT_STACK_URL} | gunzip -cd | docker import - progrium/buildstep
ifeq ($(shell echo ${PREBUILT_STACK_URL} | egrep -q 'http.*://' && echo $$?),0)
@echo "Start importing herokuish from ${PREBUILT_STACK_URL}"
docker images | grep gliderlabs/herokuish || curl --silent -L ${PREBUILT_STACK_URL} | gunzip -cd | docker import - gliderlabs/herokuish
else
@echo "Start pulling herokuish from ${PREBUILT_STACK_URL}"
docker images | grep gliderlabs/herokuish || docker pull ${PREBUILT_STACK_URL}
endif
endif
endif
count:
@echo "Core lines:"
@cat dokku bootstrap.sh | wc -l
@cat dokku bootstrap.sh | sed 's/^$$//g' | wc -l
@echo "Plugin lines:"
@find plugins -type f | xargs cat | wc -l
@find plugins -type f -not -name .DS_Store | xargs cat | sed 's/^$$//g' | wc -l
@echo "Test lines:"
@find tests -type f | xargs cat | wc -l
@find tests -type f -not -name .DS_Store | xargs cat | sed 's/^$$//g' | wc -l
dokku-installer:
apt-get install -qq -y ruby
test -f /var/lib/dokku/.dokku-installer-created || gem install rack -v 1.5.2 --no-rdoc --no-ri
test -f /var/lib/dokku/.dokku-installer-created || gem install rack-protection -v 1.5.3 --no-rdoc --no-ri
test -f /var/lib/dokku/.dokku-installer-created || gem install sinatra -v 1.4.5 --no-rdoc --no-ri
test -f /var/lib/dokku/.dokku-installer-created || gem install tilt -v 1.4.1 --no-rdoc --no-ri
test -f /var/lib/dokku/.dokku-installer-created || ruby contrib/dokku-installer.rb onboot
test -f /var/lib/dokku/.dokku-installer-created || service dokku-installer start
test -f /var/lib/dokku/.dokku-installer-created || service nginx reload
test -f /var/lib/dokku/.dokku-installer-created || touch /var/lib/dokku/.dokku-installer-created
vagrant-acl-add:
vagrant ssh -- sudo sshcommand acl-add dokku $(USER)
vagrant-dokku:
vagrant ssh -- "sudo -H -u root bash -c 'dokku $(RUN_ARGS)'"

175
README.md
View File

@@ -1,182 +1,39 @@
# Dokku
# Dokku [![Build Status](https://img.shields.io/circleci/project/progrium/dokku.svg "Build Status")](https://circleci.com/gh/progrium/dokku/tree/master) [![Ubuntu Package](https://img.shields.io/badge/package-ubuntu-brightgreen.svg?style=flat-square "Ubuntu Package")](https://packagecloud.io/dokku/dokku) [![IRC Network](https://img.shields.io/badge/irc-freenode-blue.svg "IRC Freenode")](https://webchat.freenode.net/?channels=dokku) [![Documentation](https://img.shields.io/badge/docs-viewdocs-blue.svg "Viewdocs")](http://progrium.viewdocs.io/dokku/)
Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen.
[![Build Status](https://travis-ci.org/progrium/dokku.png?branch=master)](https://travis-ci.org/progrium/dokku)
Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen. Sponsored by our friends at [Deis](http://deis.io/).
## Requirements
Assumes Ubuntu 13 or 12.04 x64 right now. Ideally have a domain ready to point to your host. It's designed for and is probably
best to use a fresh VM. The bootstrapper will install everything it needs.
**Note: There are known issues with docker and Ubuntu 13.10 ([1](https://github.com/dotcloud/docker/issues/1300), [2](https://github.com/dotcloud/docker/issues/1906)) - use of 12.04 is recommended until these issues are resolved.**
- A fresh VM running Ubuntu `14.04 x64`
## Installing
### Stable
To install the latest stable release, you can run the following commands as a user that has access to `sudo`:
$ wget -qO- https://raw.github.com/progrium/dokku/v0.2.2/bootstrap.sh | sudo DOKKU_TAG=v0.2.2 bash
wget https://raw.github.com/progrium/dokku/v0.3.26/bootstrap.sh
sudo DOKKU_TAG=v0.3.26 bash bootstrap.sh
**Note**: Users on 12.04 will need to run `apt-get install -y python-software-properties` before bootstrapping stable.
### Upgrading
### Development
[View the docs for upgrading](http://progrium.viewdocs.io/dokku/upgrading) from an older version of Dokku.
$ wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash
## Documentation
This may take around 5 minutes. Certainly better than the several hours it takes to bootstrap Cloud Foundry.
You may also wish to take a look at the [advanced installation](http://progrium.viewdocs.io/dokku/advanced-installation) document for additional installation options.
## Configuring
Set up a domain and a wildcard domain pointing to that host. Make sure `/home/dokku/VHOST` is set to this domain. By default it's set to whatever hostname the host has. This file is only created if the hostname can be resolved by dig (`dig +short $(hostname -f)`). Otherwise you have to create the file manually and set it to your preferred domain. If this file still is not present when you push your app, dokku will publish the app with a port number (i.e. `http://example.com:49154` - note the missing subdomain).
You'll have to add a public key associated with a username by doing something like this from your local machine:
$ cat ~/.ssh/id_rsa.pub | ssh progriumapp.com "sudo sshcommand acl-add dokku progrium"
That's it!
## Deploy an App
Now you can deploy apps on your Dokku. Let's deploy the [Heroku Node.js sample app](https://github.com/heroku/node-js-sample). All you have to do is add a remote to name the app. It's created on-the-fly.
$ cd node-js-sample
$ git remote add progrium dokku@progriumapp.com:node-js-app
$ git push progrium master
Counting objects: 296, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (254/254), done.
Writing objects: 100% (296/296), 193.59 KiB, done.
Total 296 (delta 25), reused 276 (delta 13)
-----> Building node-js-app ...
Node.js app detected
-----> Resolving engine versions
... blah blah blah ...
-----> Application deployed:
http://node-js-app.progriumapp.com
You're done!
Dokku only supports deploying from its master branch, so if you'd like to deploy a different local branch use: ```git push progrium <local branch>:master```
Right now Buildstep supports buildpacks for Node.js, Ruby, Python, [and more](https://github.com/progrium/buildstep#supported-buildpacks). It's not hard to add more, [go add more](https://github.com/progrium/buildstep#adding-buildpacks)!
Please check the documentation for your particular build pack as you may need to include configuration files (such as a Procfile) in your project root.
## Remote commands
Dokku commands can be run over ssh. Anywhere you would run `dokku <command>`, just run `ssh -t dokku@progriumapp.com <command>`
The `-t` is used to request a pty. It is highly recommended to do so.
To avoid the need to type the `-t` option each time, simply create/modify a section in the `.ssh/config` on the client side, as follows :
Host progriumapp.com
RequestTTY yes
## Run a command in the app environment
It's possible to run commands in the environment of the deployed application:
$ dokku run node-js-app ls -alh
$ dokku run <app> <cmd>
## Plugins
Dokku itself is built out of plugins. Checkout the wiki for information about
creating your own and a list of existing plugins:
https://github.com/progrium/dokku/wiki/Plugins
## Removing a deployed app
SSH onto the server, then execute:
$ dokku delete myapp
## Environment variable management
Typically an application will require some environment variables to run properly. Environment variables may contain private data, such as passwords or API keys, so it is not recommend to store them in your application's repository.
The `config` plugin provides the following commands to manage your variables:
```
config <app> - display the config vars for an app
config:get <app> KEY - display a config value for an app
config:set <app> KEY1=VALUE1 [KEY2=VALUE2 ...] - set one or more config vars
config:unset <app> KEY1 [KEY2 ...] - unset one or more config vars
```
## TLS/SPDY support
Dokku provides easy TLS/SPDY support out of the box. This can be done app-by-app or for all subdomains at once. Note that whenever TLS support is enabled SPDY is also enabled.
### Per App
To enable TLS connection to to one of your applications, copy or symlink the `.crt`/`.pem` and `.key` files into the application's `/home/dokku/:app/tls` folder (create this folder if it doesn't exist) as `server.crt` and `server.key` respectively.
Redeployment of the application will be needed to apply TLS configuration. Once it is redeployed, the application will be accessible by `https://` (redirection from `http://` is applied as well).
### All Subdomains
To enable TLS connections for all your applications at once you will need a wildcard TLS certificate.
To enable TLS across all apps, copy or symlink the `.crt`/`.pem` and `.key` files into the `/home/dokku/tls` folder (create this folder if it doesn't exist) as `server.crt` and `server.key` respectively. Then, enable the certificates by editing `/etc/nginx/conf.d/dokku.conf` and uncommenting these two lines (remove the #):
ssl_certificate /home/dokku/tls/server.crt;
ssl_certificate_key /home/dokku/tls/server.key;
The nginx configuration will need to be reloaded in order for the updated TLS configuration to be applied. This can be done either via the init system or by re-deploying the application. Once TLS is enabled, the application will be accessible by `https://` (redirection from `http://` is applied as well).
**Note**: TLS will not be enabled unless the application's VHOST matches the certificate's name. (i.e. if you have a cert for *.example.com TLS won't be enabled for something.example.org or example.net)
### HSTS Header
The [HSTS header](https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security) is an HTTP header that can inform browsers that all requests to a given site should be made via HTTPS. dokku does not, by default, enable this header. It is thus left up to you, the user, to enable it for your site.
Beware that if you enable the header and a subsequent deploy of your application results in an HTTP deploy (for whatever reason), the way the header works means that a browser will not attempt to request the HTTP version of your site if the HTTPS version fails.
## Upgrading
Dokku is in active development. You can update the deployment step and the build step separately.
**Note**: If you are upgrading from a revision prior to [27d4bc8c3c](https://github.com/progrium/dokku/commit/27d4bc8c3c19fe580ef3e65f2f85b85101cd83e4), follow the instructions in [this wiki entry](https://github.com/progrium/dokku/wiki/Migrating-to-Dokku-0.2.0).
To update the deploy step (this is updated less frequently):
$ cd ~/dokku
$ git pull origin master
$ sudo make install
Nothing needs to be restarted. Changes will take effect on the next push / deployment.
To update the build step:
$ git clone https://github.com/progrium/buildstep.git
$ cd buildstep
$ git pull origin master
$ sudo make build
This will build a fresh Ubuntu Quantal image, install a number of packages, and
eventually replace the Docker image for buildstep.
Full documentation - including advanced installation docs - are available online at [docs](http://progrium.viewdocs.io/dokku/)
## Support
You can use [Github Issues](https://github.com/progrium/dokku/issues), check [Troubleshooting](https://github.com/progrium/dokku/wiki/Troubleshooting) on the wiki, or join us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku)
You can use [Github Issues](https://github.com/progrium/dokku/issues), check [Troubleshooting](http://progrium.viewdocs.io/dokku/troubleshooting) in the documentation, or join us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku)
## Components
## Contribution
* [Docker](https://github.com/dotcloud/docker) - Container runtime and manager
* [Buildstep](https://github.com/progrium/buildstep) - Buildpack builder
* [pluginhook](https://github.com/progrium/pluginhook) - Shell based plugins and hooks
* [sshcommand](https://github.com/progrium/sshcommand) - Fixed commands over SSH
After checking [Github Issues](https://github.com/progrium/dokku/issues), the [Troubleshooting Guide](http://progrium.viewdocs.io/dokku/troubleshooting) or having a chat with us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku), feel free to fork and create a Pull Request.
Looking to keep codebase as simple and hackable as possible, so try to keep your line count down.
While we may not merge your PR as is, they serve to start conversations and improve the general dokku experience for all users.
## Things this project won't do
## Sponsors
* **Multi-host.** Not a huge leap, but this isn't the project for it. Have a look at [Flynn](https://flynn.io/).
* **Multitenancy.** It's ready for it, but again, have a look at [Flynn](https://flynn.io/).
* **Client app.** Given the constraints, running commands remotely via SSH is fine.
Dokku is currently sponsored by the enterprise grade, multi-host PaaS project [Deis](http://deis.io/).
## License

1
SPONSORS Normal file
View File

@@ -0,0 +1 @@
Deis http://deis.io

42
Vagrantfile vendored
View File

@@ -1,25 +1,24 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
BOX_NAME = ENV["BOX_NAME"] || "raring"
BOX_URI = ENV["BOX_URI"] || "https://cloud-images.ubuntu.com/vagrant/raring/current/raring-server-cloudimg-amd64-vagrant-disk1.box"
BOX_MEMORY = ENV["BOX_MEMORY"] || "512"
BOX_NAME = ENV["BOX_NAME"] || "chef/ubuntu-14.04"
BOX_MEMORY = ENV["BOX_MEMORY"] || "1024"
DOKKU_DOMAIN = ENV["DOKKU_DOMAIN"] || "dokku.me"
DOKKU_IP = ENV["DOKKU_IP"] || "10.0.0.2"
FORWARDED_PORT = (ENV["FORWARDED_PORT"] || '8080').to_i
PREBUILT_STACK_URL = File.exist?("#{File.dirname(__FILE__)}/stack.tgz") ? 'file:///root/dokku/stack.tgz' : nil
PUBLIC_KEY_PATH = "#{Dir.home}/.ssh/id_rsa.pub"
make_cmd = "make install"
make_cmd = "DEBIAN_FRONTEND=noninteractive make -e install"
if PREBUILT_STACK_URL
make_cmd = "PREBUILT_STACK_URL='#{PREBUILT_STACK_URL}' #{make_cmd}"
end
Vagrant::configure("2") do |config|
config.ssh.forward_agent = true
config.vm.box = BOX_NAME
config.vm.box_url = BOX_URI
config.vm.synced_folder File.dirname(__FILE__), "/root/dokku"
config.vm.network :forwarded_port, guest: 80, host: 8080
config.vm.hostname = "#{DOKKU_DOMAIN}"
config.vm.network :private_network, ip: DOKKU_IP
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
@@ -29,5 +28,30 @@ Vagrant::configure("2") do |config|
vb.customize ["modifyvm", :id, "--memory", BOX_MEMORY]
end
config.vm.provision :shell, :inline => "apt-get -y install git && cd /root/dokku && #{make_cmd}"
config.vm.define "empty", autostart: false
config.vm.define "dokku", primary: true do |vm|
vm.vm.network :forwarded_port, guest: 80, host: FORWARDED_PORT
vm.vm.hostname = "#{DOKKU_DOMAIN}"
vm.vm.network :private_network, ip: DOKKU_IP
vm.vm.provision :shell, :inline => "export DEBIAN_FRONTEND=noninteractive && apt-get update > /dev/null && apt-get -qq -y install git > /dev/null && cd /root/dokku && #{make_cmd}"
vm.vm.provision :shell, :inline => "cd /root/dokku && make dokku-installer"
end
config.vm.define "dokku-deb", autostart: false do |vm|
vm.vm.network :forwarded_port, guest: 80, host: FORWARDED_PORT
vm.vm.hostname = "#{DOKKU_DOMAIN}"
vm.vm.network :private_network, ip: DOKKU_IP
vm.vm.provision :shell, :inline => "cd /root/dokku && make install-from-deb"
end
config.vm.define "build", autostart: false do |vm|
vm.vm.provision :shell, :inline => "apt-get update > /dev/null && DEBIAN_FRONTEND=noninteractive apt-get -qq -y install git > /dev/null && cd /root/dokku && #{make_cmd}"
vm.vm.provision :shell, :inline => "cd /root/dokku && make deb-all"
end
if Pathname.new(PUBLIC_KEY_PATH).exist?
config.vm.provision :file, source: PUBLIC_KEY_PATH, destination: '/tmp/id_rsa.pub'
config.vm.provision :shell, :inline => "rm -f /root/.ssh/authorized_keys && mkdir -p /root/.ssh && sudo cp /tmp/id_rsa.pub /root/.ssh/authorized_keys"
end
end

85
bootstrap.sh Normal file → Executable file
View File

@@ -1,31 +1,86 @@
#!/usr/bin/env bash
#!/bin/bash
#
# A script to bootstrap dokku.
# It expects to be run on Ubuntu 14.04 via 'sudo'
# If installing a tag higher than 0.3.13, it may install dokku via a package (so long as the package is higher than 0.3.13)
# It checks out the dokku source code from Github into ~/dokku and then runs 'make install' from dokku source.
# We wrap this whole script in a function, so that we won't execute
# until the entire script is downloaded.
# That's good because it prevents our output overlapping with curl's.
# It also means that we can't run a partially downloaded script.
bootstrap () {
set -eo pipefail
export DEBIAN_FRONTEND=noninteractive
export DOKKU_REPO=${DOKKU_REPO:-"https://github.com/progrium/dokku.git"}
if ! which apt-get &>/dev/null
then
echo "This installation script requires apt-get. For manual installation instructions, consult https://github.com/progrium/dokku ."
echo "Preparing to install $DOKKU_TAG from $DOKKU_REPO..."
if ! command -v apt-get &>/dev/null; then
echo "This installation script requires apt-get. For manual installation instructions, consult http://progrium.viewdocs.io/dokku/advanced-installation ."
exit 1
fi
apt-get update
apt-get install -y git make curl software-properties-common
which curl > /dev/null || apt-get install -qq -y curl
[[ $(lsb_release -sr) == "12.04" ]] && apt-get install -qq -y python-software-properties
[[ `lsb_release -sr` == "12.04" ]] && apt-get install -y python-software-properties
dokku_install_source() {
apt-get install -qq -y git make software-properties-common
cd /root
if [ ! -d /root/dokku ]; then
git clone $DOKKU_REPO /root/dokku
fi
cd ~ && test -d dokku || git clone $DOKKU_REPO
cd dokku
git fetch origin
cd /root/dokku
git fetch origin
git checkout $DOKKU_CHECKOUT
make install
}
dokku_install_package() {
curl -sSL https://get.docker.io/gpg | apt-key add -
curl -sSL https://packagecloud.io/gpg.key | apt-key add -
apt-get update > /dev/null
apt-get install -qq -y "linux-image-extra-$(uname -r)" apt-transport-https
echo "deb https://get.docker.io/ubuntu docker main" > /etc/apt/sources.list.d/docker.list
echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ trusty main" > /etc/apt/sources.list.d/dokku.list
apt-get update > /dev/null
if [[ -n $DOKKU_CHECKOUT ]]; then
apt-get install -qq -y dokku=$DOKKU_CHECKOUT
else
apt-get install -qq -y dokku
fi
}
if [[ -n $DOKKU_BRANCH ]]; then
git checkout origin/$DOKKU_BRANCH
export DOKKU_CHECKOUT="origin/$DOKKU_BRANCH"
dokku_install_source
elif [[ -n $DOKKU_TAG ]]; then
git checkout $DOKKU_TAG
export DOKKU_SEMVER="${DOKKU_TAG//v}"
major=$(echo $DOKKU_SEMVER | awk '{split($0,a,"."); print a[1]}')
minor=$(echo $DOKKU_SEMVER | awk '{split($0,a,"."); print a[2]}')
patch=$(echo $DOKKU_SEMVER | awk '{split($0,a,"."); print a[3]}')
# 0.3.13 was the first version with a debian package
if [[ "$major" -eq "0" ]] && [[ "$minor" -lt "4" ]] && [[ "$patch" -lt "13" ]]; then
export DOKKU_CHECKOUT="$DOKKU_TAG"
dokku_install_source
else
export DOKKU_CHECKOUT="$DOKKU_SEMVER"
dokku_install_package
fi
else
dokku_install_package
fi
make install
}
echo
echo "Almost done! For next steps on configuration:"
echo " https://github.com/progrium/dokku#configuring"
bootstrap

13
circle.yml Normal file
View File

@@ -0,0 +1,13 @@
machine:
services:
- docker
dependencies:
cache_directories:
- "~/docker"
override:
- ./tests/ci/parallel_runner.sh setup: { timeout: 300 }
post:
- sudo -E make -e lint
test:
override:
- ./tests/ci/parallel_runner.sh testing: { parallel: true, timeout: 1800 }

View File

@@ -3,120 +3,123 @@ require "sinatra"
require "open3"
if ARGV[0] == "onboot"
File.open("/etc/init/dokku-installer.conf", "w") do |f|
f.puts "start on runlevel [2345]"
f.puts "exec #{File.absolute_path(__FILE__)} selfdestruct"
end
File.open("/etc/nginx/conf.d/dokku-installer.conf", "w") do |f|
f.puts "upstream dokku-installer { server 127.0.0.1:2000; }"
f.puts "server {"
f.puts " listen 80;"
f.puts " location / {"
f.puts " proxy_pass http://dokku-installer;"
f.puts " }"
f.puts "}"
end
`rm /etc/nginx/sites-enabled/*`
puts "Installed Upstart service and default Nginx virtualhost for installer to run on boot."
exit
File.open("/etc/init/dokku-installer.conf", "w") do |f|
f.puts "start on runlevel [2345]"
f.puts "exec #{File.absolute_path(__FILE__)} selfdestruct"
end
File.open("/etc/nginx/conf.d/dokku-installer.conf", "w") do |f|
f.puts "upstream dokku-installer { server 127.0.0.1:2000; }"
f.puts "server {"
f.puts " listen 80;"
f.puts " location / {"
f.puts " proxy_pass http://dokku-installer;"
f.puts " }"
f.puts "}"
end
`rm -f /etc/nginx/sites-enabled/*`
puts "Installed Upstart service and default Nginx virtualhost for installer to run on boot."
exit
end
version = "v0.2.1"
dokku_root = ENV["DOKKU_ROOT"] || "/home/dokku"
admin_key = `cat /root/.ssh/authorized_keys`.split("\n").first
hostname = `bash -c '[[ $(dig +short $HOSTNAME) ]] && echo $HOSTNAME || curl icanhazip.com'`.strip
template = DATA.read
version = "v0.3.26"
dokku_root = ENV["DOKKU_ROOT"] || "/home/dokku"
admin_keys = `cat /root/.ssh/authorized_keys`.split("\n")
hostname = `bash -c '[[ $(dig +short $HOSTNAME) ]] && echo $HOSTNAME || curl icanhazip.com'`.strip
template = DATA.read
set :port, 2000
set :environment, :production
disable :protection
get "/" do
ERB.new(template).result binding
ERB.new(template).result binding
end
post "/setup" do
if params[:vhost] == "true"
File.open("#{dokku_root}/VHOST", "w") {|f| f.write params[:hostname] }
else
`rm #{dokku_root}/VHOST`
end
File.open("#{dokku_root}/HOSTNAME", "w") {|f| f.write params[:hostname] }
Open3.capture2("sshcommand acl-add dokku admin", :stdin_data => params[:key])
Thread.new {
`rm /etc/nginx/conf.d/dokku-installer.conf && /etc/init.d/nginx stop && /etc/init.d/nginx start`
`rm /etc/init/dokku-installer.conf && stop dokku-installer`
}.run if ARGV[0] == "selfdestruct"
if params[:vhost] == "true"
File.open("#{dokku_root}/VHOST", "w") {|f| f.write params[:hostname] }
else
`rm #{dokku_root}/VHOST`
end
File.open("#{dokku_root}/HOSTNAME", "w") {|f| f.write params[:hostname] }
keys = params[:keys].split("\n")
keys.each do |k|
Open3.capture2("sshcommand acl-add dokku admin", :stdin_data => k)
end
Thread.new {
`rm /etc/nginx/conf.d/dokku-installer.conf && /etc/init.d/nginx stop && /etc/init.d/nginx start`
`rm /etc/init/dokku-installer.conf && stop dokku-installer`
}.run if ARGV[0] == "selfdestruct"
end
__END__
<html>
<head>
<title>Dokku Setup</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<title>Dokku Setup</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
</head>
<body>
<div class="container" style="width: 640px;">
<form id="form" role="form">
<h1>Dokku Setup <small><%= version %></small></h1>
<div class="form-group">
<h3><small style="text-transform: uppercase;">Admin Access</small></h3>
<label for="key">Public Key</label><br />
<textarea class="form-control" name="key" rows="7" id="key"><%= admin_key %></textarea>
</div>
<div class="form-group">
<h3><small style="text-transform: uppercase;">Hostname Configuration</small></h3>
<div class="form-group">
<label for="hostname">Hostname</label>
<input class="form-control" type="text" id="hostname" name="hostname" value="<%= hostname %>" />
</div>
<div class="checkbox">
<label><input id="vhost" name="vhost" type="checkbox" value="true"> Use <abbr title="Nginx will be run on port 80 and backend to your apps based on hostname">virtualhost naming</abbr> for apps</label>
</div>
<p>Your app URLs will look like:</p>
<pre id="example">http://hostname:port</pre>
</div>
<button type="button" onclick="setup()" class="btn btn-primary">Finish Setup</button> <span style="padding-left: 20px;" id="result"></span>
</form>
</div>
<div id="error-output"></div>
<script>
function setup() {
if ($.trim($("#key").val()) == "") {
alert("Your admin public key cannot be blank.")
return
}
if ($.trim($("#hostname").val()) == "") {
alert("Your hostname cannot be blank.")
return
}
data = $("#form").serialize()
$("input,textarea,button").prop("disabled", true);
$.post('/setup', data)
.done(function() {
$("#result").html("Success!")
window.location.href = "https://github.com/progrium/dokku#deploy-an-app";
})
.fail(function(data) {
$("#result").html("Something went wrong...")
$("#error-output").html(data.responseText)
});
}
function update() {
if ($("#vhost").is(":checked") && $("#hostname").val().match(/^(\d{1,3}\.){3}\d{1,3}$/)) {
alert("In order to use virtualhost naming, the hostname must not be an IP but a valid domain name.")
$("#vhost").prop('checked', false);
}
if ($("#vhost").is(':checked')) {
$("#example").html("http://&lt;app-name&gt;."+$("#hostname").val())
} else {
$("#example").html("http://"+$("#hostname").val()+":&lt;app-port&gt;")
}
}
$("#vhost").change(update);
$("#hostname").change(update);
update();
</script>
<div class="container" style="width: 640px;">
<form id="form" role="form">
<h1>Dokku Setup <small><%= version %></small></h1>
<div class="form-group">
<h3><small style="text-transform: uppercase;">Admin Access</small></h3>
<label for="key">Public Key</label><br />
<textarea class="form-control" name="keys" rows="7" id="key"><% admin_keys.each do |key| %><%= key + "\n" %><% end %></textarea>
</div>
<div class="form-group">
<h3><small style="text-transform: uppercase;">Hostname Configuration</small></h3>
<div class="form-group">
<label for="hostname">Hostname</label>
<input class="form-control" type="text" id="hostname" name="hostname" value="<%= hostname %>" />
</div>
<div class="checkbox">
<label><input id="vhost" name="vhost" type="checkbox" value="true"> Use <abbr title="Nginx will be run on port 80 and backend to your apps based on hostname">virtualhost naming</abbr> for apps</label>
</div>
<p>Your app URLs will look like:</p>
<pre id="example">http://hostname:port</pre>
</div>
<button type="button" onclick="setup()" class="btn btn-primary">Finish Setup</button> <span style="padding-left: 20px;" id="result"></span>
</form>
</div>
<div id="error-output"></div>
<script>
function setup() {
if ($.trim($("#key").val()) == "") {
alert("Your admin public key cannot be blank.")
return
}
if ($.trim($("#hostname").val()) == "") {
alert("Your hostname cannot be blank.")
return
}
data = $("#form").serialize()
$("input,textarea,button").prop("disabled", true);
$.post('/setup', data)
.done(function() {
$("#result").html("Success!")
window.location.href = "http://progrium.viewdocs.io/dokku/application-deployment";
})
.fail(function(data) {
$("#result").html("Something went wrong...")
$("#error-output").html(data.responseText)
});
}
function update() {
if ($("#vhost").is(":checked") && $("#hostname").val().match(/^(\d{1,3}\.){3}\d{1,3}$/)) {
alert("In order to use virtualhost naming, the hostname must not be an IP but a valid domain name.")
$("#vhost").prop('checked', false);
}
if ($("#vhost").is(':checked')) {
$("#example").html("http://&lt;app-name&gt;."+$("#hostname").val())
} else {
$("#example").html("http://"+$("#hostname").val()+":&lt;app-port&gt;")
}
}
$("#vhost").change(update);
$("#hostname").change(update);
update();
</script>
</body>
</html>

133
contrib/dokku_client.sh Executable file
View File

@@ -0,0 +1,133 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
MOVES=(ABLE ABNORMA AGAIN AIREXPL ANG ANGER ASAIL ATTACK AURORA AWL BAN BAND BARE BEAT BEATED BELLY BIND BITE BLOC BLOOD BODY BOOK BREATH BUMP CAST CHAM CLAMP CLAP CLAW CLEAR CLI CLIP CLOUD CONTRO CONVY COOLHIT CRASH CRY CUT DESCRI D-FIGHT DIG DITCH DIV DOZ DRE DUL DU-PIN DYE EARTH EDU EG-BOMB EGG ELEGY ELE-HIT EMBODY EMPLI ENGL ERUPT EVENS EXPLOR EYES FALL FAST F-CAR F-DANCE FEARS F-FIGHT FIGHT FIR FIRE FIREHIT FLAME FLAP FLASH FLEW FORCE FRA FREEZE FROG G-BIRD GENKISS GIFT G-KISS G-MOUSE GRADE GROW HAMMER HARD HAT HATE H-BOMB HELL-R HEMP HINT HIT HU HUNT HYPNOSI INHA IRO IRONBAR IR-WING J-GUN KEE KICK KNIF KNIFE KNOCK LEVEL LIGH LIGHHIT LIGHT LIVE L-WALL MAD MAJUS MEL MELO MESS MILK MIMI MISS MIXING MOVE MUD NI-BED NOISY NOONLI NULL N-WAVE PAT PEACE PIN PLAN PLANE POIS POL POWDE POWE POWER PRIZE PROTECT PROUD RAGE RECOR REFLAC REFREC REGR RELIV RENEW R-FIGHT RING RKICK ROCK ROUND RUS RUSH SAND SAW SCISSOR SCRA SCRIPT SEEN SERVER SHADOW SHELL SHINE SHO SIGHT SIN SMALL SMELT SMOK SNAKE SNO SNOW SOU SO-WAVE SPAR SPEC SPID S-PIN SPRA STAM STARE STEA STONE STORM STRU STRUG STUDEN SUBS SUCID SUN-LIG SUNRIS SUPLY S-WAVE TAILS TANGL TASTE TELLI THANK TONKICK TOOTH TORL TRAIN TRIKICK TUNGE VOLT WA-GUN WATCH WAVE W-BOMB WFALL WFING WHIP WHIRL WIND WOLF WOOD WOR YUJA)
NAMES=(SEED GRASS FLOWE SHAD CABR SNAKE GOLD COW GUIKI PEDAL DELAN B-FLY BIDE KEYU FORK LAP PIGE PIJIA CAML LAT BIRD BABOO VIV ABOKE PIKAQ RYE SAN BREAD LIDEL LIDE PIP PIKEX ROK JUGEN PUD BUDE ZHIB GELU GRAS FLOW LAFUL ATH BALA CORN MOLUF DESP DAKED MIMI BOLUX KODA GELUD MONK SUMOY GEDI WENDI NILEM NILE NILEC KEZI YONGL HUDE WANLI GELI GUAIL MADAQ WUCI WUCI MUJEF JELLY SICIB GELU NELUO BOLI JIALE YED YEDE CLO SCARE AOCO DEDE DEDEI BAWU JIUG BADEB BADEB HOLE BALUX GES FANT QUAR YIHE SWAB SLIPP CLU DEPOS BILIY YUANO SOME NO YELA EMPT ZECUN XIAHE BOLEL DEJI MACID XIHON XITO LUCK MENJI GELU DECI XIDE DASAJ DONGN RICUL MINXI BALIY ZENDA LUZEL HELE5 0FENB KAIL JIAND CARP JINDE LAPU MUDE YIFU LINLI SANDI HUSI JINC OUMU OUMUX CAP KUIZA PUD TIAO FRMAN CLAU SPARK DRAGO BOLIU GUAIL MIYOU MIY QIAOK BEIL MUKEI RIDED MADAM BAGEP CROC ALIGE OUDAL OUD DADA HEHE YEDEA NUXI NUXIN ROUY ALIAD STICK QIANG LAAND PIQI PI PUPI DEKE DEKEJ NADI NADIO MALI PEA ELECT FLOWE MAL MALI HUSHU NILEE YUZI POPOZ DUZI HEBA XIAN SHAN YEYEA WUY LUO KEFE HULA CROW YADEH MOW ANNAN SUONI KYLI HULU HUDEL YEHE GULAE YEHE BLU GELAN BOAT NIP POIT HELAK XINL BEAR LINB MAGEH MAGEJ WULI YIDE RIVE FISH AOGU DELIE MANTE KONMU DELU HELU HUAN HUMA DONGF JINCA HEDE DEFU LIBY JIAPA MEJI HELE BUHU MILK HABI THUN GARD DON YANGQ SANAQ BANQ LUJ PHIX SIEI EGG)
random_number() {
[[ -n "$1" ]] && RANGE="$1"
if [[ -n "$RANGE" ]];then
number=$RANDOM
let "number %= $RANGE"
else
number=$RANDOM
fi
echo $number
}
random_name() {
NUM1=$(random_number ${#MOVES[@]})
NUM2=$(random_number ${#MOVES[@]})
NUM3=$(random_number ${#NAMES[@]})
UPPER_APPNAME="${MOVES[${NUM1}]}-${MOVES[${NUM2}]}-${NAMES[${NUM3}]}"
[[ "$BASH_VERSION" =~ 4.* ]] && lower_appname=${UPPER_APPNAME,,}
[[ -z "$lower_appname" ]] && lower_appname=$(echo $UPPER_APPNAME | tr '[:upper:]' '[:lower:]')
echo "$lower_appname"
}
client_help_msg() {
echo "==> Configure the DOKKU_HOST environment variable or run $0 from a repository with a git remote named dokku"
echo "--> i.e. git remote add dokku dokku@<dokku-host>:<app-name>"
exit 20 # exit with specific status. only used in units tests for now
}
if [[ -z $DOKKU_HOST ]]; then
if [[ -d .git ]] || git rev-parse --git-dir > /dev/null 2>&1; then
DOKKU_HOST=$(git remote -v 2>/dev/null | grep -Ei "^dokku" | head -n 1 | cut -f1 -d' ' | cut -f2 -d '@' | cut -f1 -d':' 2>/dev/null || true)
else
client_help_msg
fi
fi
if [[ ! -z $DOKKU_HOST ]]; then
_dokku() {
appname=""
if [[ -d .git ]] || git rev-parse --git-dir > /dev/null 2>&1; then
set +e
appname=$(git remote -v 2>/dev/null | grep -Ei "dokku@$DOKKU_HOST" | head -n 1 | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null)
set -e
else
echo "This is not a git repository"
fi
if [[ "$appname" != "" ]] && [[ -n "$*" ]]; then
case "$1" in
apps|backup*|help|plugins*|ps:restartall|trace|version)
true
;;
apps:destroy)
if [[ -z "$2" ]] || [[ "$2" == "force" ]];then
donotshift="YES"
fi
;;
*)
donotshift="YES"
;;
esac
fi
if [[ "$1" = "apps:create" ]] && [[ -z "$2" ]]; then
appname=$(random_name)
counter=0
while ssh "dokku@$DOKKU_HOST" apps 2>/dev/null| grep -q "$appname"; do
if [[ $counter -ge 100 ]];then
echo "Error: could not reasonably generate a new app name. try cleaning up some apps..."
ssh "dokku@$DOKKU_HOST" apps
exit 1
else
appname=$(random_name)
counter=$((counter+1))
fi
done
if git remote add dokku "dokku@$DOKKU_HOST:$appname"
then
echo "-----> Dokku remote added at $DOKKU_HOST"
echo "-----> Application name is $appname"
else
echo "! Dokku remote not added! Do you already have a dokku remote?"
return
fi
git push dokku master
return $?
fi
if [[ -z "$donotshift" ]]; then
ssh -t "dokku@$DOKKU_HOST" "$@"
exit $?
fi
if [[ -z "$verb" ]]; then
if [[ ! "$1" =~ --* ]]; then
verb=$1
shift
if [[ "$1" == "$appname" ]]; then
shift
fi
args="$*"
else
long_args="--"
for arg in "$@";do
if [[ "$arg" =~ --* ]];then
long_args+=" $arg"
args=("${args[@]/$arg}")
else
verb="$arg"
fi
done
fi
fi
# shellcheck disable=SC2086
ssh -t "dokku@$DOKKU_HOST" $long_args "$verb" "$appname" "${args[@]}"
}
if [[ "$0" == "dokku" ]] || [[ "$0" == *dokku_client.sh ]] || [[ "$0" == $(which dokku) ]]; then
_dokku "$@"
exit $?
fi
else
client_help_msg
fi

32
contrib/packer.json Normal file
View File

@@ -0,0 +1,32 @@
{
"builders": [
{
"type": "digitalocean",
"region": "nyc3",
"image": "ubuntu-14-04-x64"
}
],
"provisioners": [
{
"type": "file",
"source": "deb.mk",
"destination": "/tmp/Makefile"
},
{
"type": "shell",
"inline": [
"echo '--> Waiting 30 seconds for core services to be available'",
"sleep 30",
"echo '--> Updating apt repositories'",
"sudo apt-get update > /dev/null",
"echo '--> Installing make requirement'",
"sudo apt-get -qq -y install build-essential",
"cd /tmp && make install-from-deb",
"rm /root/.ssh/authorized_keys"
]
}
]
}

183
contrib/stackscript.sh Normal file
View File

@@ -0,0 +1,183 @@
#!/bin/bash
# <UDF name="hostname" default="" label="Hostname for dokku instance" example="example.com">
# <UDF name="ssh_key" default="" label="Public SSH Key for root user" example="Sets the root user's public ssh key, which is also automatically imported into the dokku installer">
# <UDF name="notify_email" default="" Label="Send Finish Notification To" example="Email address to send notification to when finished." />
function logit {
# Simple logging function that prepends an easy-to-find marker '=> ' and a timestamp to a message
TIMESTAMP=$(date -u +'%m/%d %H:%M:%S')
MSG="=> ${TIMESTAMP} $1"
echo ${MSG}
}
function set_ssh_key {
if [ -n "${SSH_KEY}" ]; then
logit "Setting root ssh key"
mkdir -p /root/.ssh
chmod 700 /root/.ssh
echo "$SSH_KEY" > /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys
chown -R root:root /root/.ssh
fi
}
function set_passwordless_ssh {
logit "Turn off password authentication and root login for SSH"
echo 'PasswordAuthentication no' >> /etc/ssh/sshd_config
service ssh restart
}
function system_primary_ip {
# returns the primary IP assigned to eth0
ifconfig eth0 | awk -F: '/inet addr:/ {print $2}' | awk '{ print $1 }'
}
function set_hostname {
logit "Set up hostname"
if [ -n "${HOSTNAME}" ]; then
echo $HOSTNAME > /etc/hostname
echo $IPADDR $FQDN $HOSTNAME >> /etc/hosts
else
system_primary_ip > /etc/hostname
echo "$(system_primary_ip) localhost" >> /etc/hosts
fi
IPADDR=$(/sbin/ifconfig eth0 | awk '/inet / { print $2 }' | sed 's/addr://')
hostname -F /etc/hostname
}
function postfix_install_loopback_only {
logit "Installing and configuring Postfix"
# Installs postfix and configure to listen only on the local interface. Also
# allows for local mail delivery
echo "postfix postfix/destinations string localhost.localdomain, localhost" | debconf-set-selections
echo "postfix postfix/mailname string localhost" | debconf-set-selections
echo "postfix postfix/main_mailer_type select Internet Site" | debconf-set-selections
echo "postfix postfix/myhostname string localhost" | debconf-set-selections
sudo apt-get install -qq -y postfix > /dev/null 2>&1
/usr/sbin/postconf -e "inet_interfaces = loopback-only"
#/usr/sbin/postconf -e "local_transport = error:local delivery is disabled"
touch /tmp/restart-postfix
}
function notify_install_via_email {
if [ -n "${NOTIFY_EMAIL}" ]; then
logit "Sending notification email to ${NOTIFY_EMAIL}"
/usr/sbin/sendmail "${NOTIFY_EMAIL}" <<EOD
To: ${NOTIFY_EMAIL}
Subject: Dokku installation is complete
From: Dokku StackScript <no-reply@${HOSTNAME}>
Your Dokku installation is complete and now ready to be configured: http://$(system_primary_ip) . Please visit this url to complete the setup of your Dokku instance.
Enjoy using Dokku!
EOD
fi
}
function notify_restart_via_email {
if [ -n "${NOTIFY_EMAIL}" ]; then
logit "Sending notification email to ${NOTIFY_EMAIL} of required restart"
/usr/sbin/sendmail "${NOTIFY_EMAIL}" <<EOD
To: ${NOTIFY_EMAIL}
Subject: Dokku Linode instance must be restarted
From: Dokku StackScript <no-reply@${HOSTNAME}>
The following linode instance must be restarted:
${LINODE_LISHUSERNAME}
Before restarting, please go to this url:
https://manager.linode.com/linodes/dashboard/${LINODE_LISHUSERNAME}
Then click "Edit" next to the selected configuration profile and make the following changes:
- Change the "Kernel" option to the current "pv-grub" release
- Set the "Xenify Distro" option to "no"
Then save your changes. Next, reboot the instance from the Linode Dashboard. You'll receive an email once the instance is available to continue the dokku installation.
EOD
fi
}
function setup_linode {
logit "Installing via linode"
DEBIAN_FRONTEND=noninteractive apt-get install -qq -y linux-virtual
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y grub2 grub-pc
DEBIAN_FRONTEND=noninteractive apt-get install -qq -y grub
mkdir -p /boot/grub
update-grub -y
sed -i 's/kopt=root=UUID=.* ro/kopt=root=\/dev\/xvda console=hvc0 ro quiet/g' /boot/grub/menu.lst
sed -i 's/# groot=(hd0,0)/# groot=(hd0)/g' /boot/grub/menu.lst
update-grub
cp /etc/rc.local /etc/rc.local-bak
cat << "EOF" > /etc/rc.local
#!/bin/sh -e
sudo apt-get update >> /root/setup_linode.txt 2>&1
sudo apt-get install -y linux-image-extra-"$(uname -r)" >> /root/setup_linode.txt 2>&1
modprobe aufs >> /root/setup_linode.txt 2>&1
sudo apt-get install -y apparmor cgroup-lite >> /root/setup_linode.txt 2>&1
sudo apt-get install -y dokku >> /root/setup_linode.txt 2>&1
# Clean up this script so it only runs once
rm -f /etc/rc.local
mv /etc/rc.local-bak /etc/rc.local
exit 0
EOF
chmod +x /etc/rc.local
}
function install_prerequisites {
sudo apt-get install -qq -y curl > /dev/null 2>&1
logit "Installing docker gpg key"
curl -sSL https://get.docker.com/gpg 2> /dev/null | apt-key add - > /dev/null 2>&1
logit "Installing dokku gpg key"
curl -sSL https://packagecloud.io/gpg.key 2> /dev/null | apt-key add - > /dev/null 2>&1
logit "Running apt-get update"
sudo apt-get update > /dev/null
logit "Installing pre-requisites"
sudo apt-get install -qq -y apt-transport-https > /dev/null 2>&1
logit "Setting up apt repositories"
echo "deb https://get.docker.io/ubuntu docker main" > /etc/apt/sources.list.d/docker.list
echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ trusty main" > /etc/apt/sources.list.d/dokku.list
logit "Running apt-get update"
sudo apt-get update > /dev/null
}
function install_dokku {
logit "Installing pre-requisites"
sudo apt-get install -qq -y linux-image-extra-"$(uname -r)" > /dev/null 2>&1
logit "Installing dokku"
sudo apt-get install -qq -y dokku > /dev/null 2>&1
logit "Done!"
}
exec &> /root/stackscript.log
set_ssh_key
set_passwordless_ssh
postfix_install_loopback_only
set_hostname
install_prerequisites
if [ -n "$LINODE_ID" ]; then
setup_linode
notify_restart_via_email
else
install_dokku
notify_install_via_email
fi

166
deb.mk Normal file
View File

@@ -0,0 +1,166 @@
HEROKUISH_DESCRIPTION = 'Herokuish uses Docker and Buildpacks to build applications like Heroku'
HEROKUISH_REPO_NAME ?= gliderlabs/herokuish
HEROKUISH_VERSION ?= 0.0.1
HEROKUISH_ARCHITECTURE = amd64
HEROKUISH_PACKAGE_NAME = herokuish_$(HEROKUISH_VERSION)_$(HEROKUISH_ARCHITECTURE).deb
DOKKU_DESCRIPTION = 'Docker powered mini-Heroku in around 100 lines of Bash'
DOKKU_REPO_NAME ?= progrium/dokku
DOKKU_ARCHITECTURE = amd64
PLUGINHOOK_DESCRIPTION = 'Simple dispatcher and protocol for shell-based plugins, an improvement to hook scripts'
PLUGINHOOK_REPO_NAME ?= progrium/pluginhook
PLUGINHOOK_VERSION ?= 0.2.0
PLUGINHOOK_ARCHITECTURE = amd64
PLUGINHOOK_PACKAGE_NAME = pluginhook_$(PLUGINHOOK_VERSION)_$(PLUGINHOOK_ARCHITECTURE).deb
SSHCOMMAND_DESCRIPTION = 'Turn SSH into a thin client specifically for your app'
SSHCOMMAND_REPO_NAME ?= progrium/sshcommand
SSHCOMMAND_VERSION ?= 0.0.1
SSHCOMMAND_ARCHITECTURE = amd64
SSHCOMMAND_PACKAGE_NAME = sshcommand_$(SSHCOMMAND_VERSION)_$(SSHCOMMAND_ARCHITECTURE).deb
GEM_ARCHITECTURE = amd64
GOROOT = /usr/lib/go
GOBIN = /usr/bin/go
GOPATH = /home/vagrant/gocode
.PHONY: install-from-deb deb-all deb-herokuish deb-dokku deb-gems deb-pluginhook deb-setup deb-sshcommand
install-from-deb:
echo "--> Initial apt-get update"
sudo apt-get update > /dev/null
sudo apt-get install -y apt-transport-https curl
echo "--> Installing docker gpg key"
curl -sSL https://get.docker.com/gpg | apt-key add -
echo "--> Installing dokku gpg key"
curl --silent https://packagecloud.io/gpg.key 2> /dev/null | apt-key add - 2>&1 >/dev/null
echo "--> Setting up apt repositories"
echo "deb https://get.docker.io/ubuntu docker main" > /etc/apt/sources.list.d/docker.list
echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ trusty main" > /etc/apt/sources.list.d/dokku.list
echo "--> Running apt-get update"
sudo apt-get update > /dev/null
echo "--> Installing pre-requisites"
sudo apt-get install -y linux-image-extra-`uname -r`
echo "--> Installing dokku"
sudo apt-get install -y dokku
echo "--> Done!"
deb-all: deb-herokuish deb-dokku deb-gems deb-pluginhook deb-sshcommand
mv /tmp/*.deb .
echo "Done"
deb-setup:
echo "-> Updating deb repository and installing build requirements"
sudo apt-get update > /dev/null
sudo apt-get install -qq -y gcc git ruby1.9.1-dev 2>&1 > /dev/null
command -v fpm > /dev/null || sudo gem install fpm --no-ri --no-rdoc
ssh -o StrictHostKeyChecking=no git@github.com || true
deb-herokuish: deb-setup
rm -rf /tmp/tmp /tmp/build $(HEROKUISH_PACKAGE_NAME)
mkdir -p /tmp/tmp /tmp/build
echo "-> Creating deb files"
echo "#!/usr/bin/env bash" >> /tmp/tmp/post-install
echo "sleep 5" >> /tmp/tmp/post-install
echo "count=\`sudo docker images | grep gliderlabs/herokuish | wc -l\`" >> /tmp/tmp/post-install
echo 'if [ "$$count" -ne 0 ]; then' >> /tmp/tmp/post-install
echo " echo 'Removing old herokuish image'" >> /tmp/tmp/post-install
echo " sudo docker rmi gliderlabs/herokuish" >> /tmp/tmp/post-install
echo "fi" >> /tmp/tmp/post-install
echo "echo 'Importing herokuish into docker (around 5 minutes)'" >> /tmp/tmp/post-install
echo "sudo docker build -t gliderlabs/herokuish /var/lib/herokuish 1> /dev/null" >> /tmp/tmp/post-install
echo "-> Cloning repository"
git clone -q "git@github.com:$(HEROKUISH_REPO_NAME).git" /tmp/tmp/herokuish > /dev/null
rm -rf /tmp/tmp/herokuish/.git /tmp/tmp/herokuish/.gitignore
echo "-> Copying files into place"
mkdir -p "/tmp/build/var/lib"
cp -rf /tmp/tmp/herokuish /tmp/build/var/lib/herokuish
echo "-> Creating $(HEROKUISH_PACKAGE_NAME)"
sudo fpm -t deb -s dir -C /tmp/build -n herokuish -v $(HEROKUISH_VERSION) -a $(HEROKUISH_ARCHITECTURE) -p $(HEROKUISH_PACKAGE_NAME) --deb-pre-depends 'lxc-docker-1.6.2' --after-install /tmp/tmp/post-install --url "https://github.com/$(HEROKUISH_REPO_NAME)" --description $(HEROKUISH_DESCRIPTION) --license 'MIT License' .
mv *.deb /tmp
deb-dokku: deb-setup
rm -rf /tmp/tmp /tmp/build dokku_*_$(DOKKU_ARCHITECTURE).deb
mkdir -p /tmp/tmp /tmp/build
cp -r debian /tmp/build/DEBIAN
mkdir -p /tmp/build/usr/local/bin
mkdir -p /tmp/build/var/lib/dokku
mkdir -p /tmp/build/usr/local/share/man/man1
mkdir -p /tmp/build/usr/local/share/dokku/contrib
cp dokku /tmp/build/usr/local/bin
cp -r plugins /tmp/build/var/lib/dokku
find plugins/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read plugin; do touch /tmp/build/var/lib/dokku/plugins/$$plugin/.core; done
$(MAKE) help2man
$(MAKE) addman
cp /usr/local/share/man/man1/dokku.1 /tmp/build/usr/local/share/man/man1/dokku.1
cp contrib/dokku-installer.rb /tmp/build/usr/local/share/dokku/contrib
git describe --tags > /tmp/build/var/lib/dokku/VERSION
cat /tmp/build/var/lib/dokku/VERSION | cut -d '-' -f 1 | cut -d 'v' -f 2 > /tmp/build/var/lib/dokku/STABLE_VERSION
git rev-parse HEAD > /tmp/build/var/lib/dokku/GIT_REV
sed -i "s/^Version: .*/Version: `cat /tmp/build/var/lib/dokku/STABLE_VERSION`/g" /tmp/build/DEBIAN/control
dpkg-deb --build /tmp/build "/vagrant/dokku_`cat /tmp/build/var/lib/dokku/STABLE_VERSION`_$(DOKKU_ARCHITECTURE).deb"
mv *.deb /tmp
deb-gems: deb-setup
rm -rf /tmp/tmp /tmp/build rubygem-*.deb
mkdir -p /tmp/tmp /tmp/build
gem install --quiet --no-verbose --no-ri --no-rdoc --install-dir /tmp/tmp rack -v 1.5.2 > /dev/null
gem install --quiet --no-verbose --no-ri --no-rdoc --install-dir /tmp/tmp rack-protection -v 1.5.3 > /dev/null
gem install --quiet --no-verbose --no-ri --no-rdoc --install-dir /tmp/tmp sinatra -v 1.4.5 > /dev/null
gem install --quiet --no-verbose --no-ri --no-rdoc --install-dir /tmp/tmp tilt -v 1.4.1 > /dev/null
find /tmp/tmp/cache -name '*.gem' | xargs -rn1 fpm -d ruby -d ruby --prefix /var/lib/gems/1.9.1 -s gem -t deb -a $(GEM_ARCHITECTURE)
mv *.deb /tmp
deb-pluginhook: deb-setup
rm -rf /tmp/tmp /tmp/build $(PLUGINHOOK_PACKAGE_NAME)
mkdir -p /tmp/tmp /tmp/build
echo "-> Cloning repository"
git clone -q "git@github.com:$(PLUGINHOOK_REPO_NAME).git" /tmp/tmp/pluginhook > /dev/null
rm -rf /tmp/tmp/pluginhook/.git /tmp/tmp/pluginhook/.gitignore
echo "-> Copying files into place"
mkdir -p /tmp/build/usr/local/bin $(GOPATH)
sudo apt-get update > /dev/null
sudo apt-get install -qq -y git golang mercurial 2>&1 > /dev/null
export PATH=$(PATH):$(GOROOT)/bin:$(GOPATH)/bin && export GOROOT=$(GOROOT) && export GOPATH=$(GOPATH) && go get "golang.org/x/crypto/ssh/terminal"
export PATH=$(PATH):$(GOROOT)/bin:$(GOPATH)/bin && export GOROOT=$(GOROOT) && export GOPATH=$(GOPATH) && cd /tmp/tmp/pluginhook && go build -o pluginhook
mv /tmp/tmp/pluginhook/pluginhook /tmp/build/usr/local/bin/pluginhook
echo "-> Creating $(PLUGINHOOK_PACKAGE_NAME)"
sudo fpm -t deb -s dir -C /tmp/build -n pluginhook -v $(PLUGINHOOK_VERSION) -a $(PLUGINHOOK_ARCHITECTURE) -p $(PLUGINHOOK_PACKAGE_NAME) --url "https://github.com/$(PLUGINHOOK_REPO_NAME)" --description $(PLUGINHOOK_DESCRIPTION) --license 'MIT License' .
mv *.deb /tmp
deb-sshcommand: deb-setup
rm -rf /tmp/tmp /tmp/build $(SSHCOMMAND_PACKAGE_NAME)
mkdir -p /tmp/tmp /tmp/build
echo "-> Cloning repository"
git clone -q "git@github.com:$(SSHCOMMAND_REPO_NAME).git" /tmp/tmp/sshcommand > /dev/null
rm -rf /tmp/tmp/sshcommand/.git /tmp/tmp/sshcommand/.gitignore
echo "-> Copying files into place"
mkdir -p "/tmp/build/usr/local/bin"
cp /tmp/tmp/sshcommand/sshcommand /tmp/build/usr/local/bin/sshcommand
chmod +x /tmp/build/usr/local/bin/sshcommand
echo "-> Creating $(SSHCOMMAND_PACKAGE_NAME)"
sudo fpm -t deb -s dir -C /tmp/build -n sshcommand -v $(SSHCOMMAND_VERSION) -a $(SSHCOMMAND_ARCHITECTURE) -p $(SSHCOMMAND_PACKAGE_NAME) --url "https://github.com/$(SSHCOMMAND_REPO_NAME)" --description $(SSHCOMMAND_DESCRIPTION) --license 'MIT License' .
mv *.deb /tmp

21
debian/config vendored Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/sh -e
. /usr/share/debconf/confmodule
readonly ACTION="${1:-configure}"
readonly VERSION="${2:-dev}"
db_input "high" "dokku/web_config" || true
db_go || true
db_get "dokku/web_config"
if [ $RET = "true" ]; then
exit 0
fi
db_input "high" "dokku/hostname" || true
db_input "high" "dokku/vhost_enable" || true
if [ "$ACTION" != "reconfigure" ]; then
db_input "high" "dokku/key_file" || true
fi
db_go || true

9
debian/control vendored Normal file
View File

@@ -0,0 +1,9 @@
Package: dokku
Version: 0.3.12
Section: base
Priority: optional
Architecture: amd64
Depends: locales, git, make, curl, software-properties-common, lxc-docker-1.6.2, gcc, python-software-properties, man-db, herokuish, sshcommand, pluginhook
Pre-Depends: nginx, dnsutils, ruby, ruby-dev, rubygem-rack, rubygem-rack-protection, rubygem-sinatra, rubygem-tilt, apparmor, cgroup-lite
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
Description: Docker powered mini-Heroku in around 100 lines of Bash

55
debian/postinst vendored Executable file
View File

@@ -0,0 +1,55 @@
#!/bin/sh
set -e
. /usr/share/debconf/confmodule
readonly DOKKU_ROOT="${DOKKU_ROOT:-/home/dokku}"
case "$1" in
abort-upgrade|abort-remove|abort-deconfigure)
;;
configure)
mandb
[ ! -x /usr/bin/docker.io ] || ln -sf /usr/bin/docker.io /usr/local/bin/docker
modprobe aufs || echo "WARNING: Restart server to finish installing dokku!"
sshcommand create dokku /usr/local/bin/dokku
egrep -i "^docker" /etc/group || groupadd docker
usermod -aG docker dokku
dokku plugins-install
rm -f /home/dokku/VERSION
cp /var/lib/dokku/STABLE_VERSION /home/dokku/VERSION
if [ -f /etc/init/dokku-installer.conf ] && service dokku-installer status 2> /dev/null | grep waiting; then
sudo service dokku-installer start
fi
db_get "dokku/web_config"
if [ "$RET" = "true" ]; then
exit 0
fi
db_get "dokku/vhost_enable"
if [ "$RET" = "true" ]; then
db_get "dokku/hostname"
echo "$RET" > "${DOKKU_ROOT}/VHOST"
else
rm -f "${DOKKU_ROOT}/VHOST"
fi
db_get "dokku/hostname"
echo "$RET" > "${DOKKU_ROOT}/HOSTNAME"
if [ -z "${DEBCONF_RECONFIGURE}" ]; then
db_get "dokku/key_file"
sshcommand acl-add dokku default < "$RET"
fi
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
exit 0

59
debian/preinst vendored Executable file
View File

@@ -0,0 +1,59 @@
#!/bin/sh
set -e
. /usr/share/debconf/confmodule
case "$1" in
install)
db_get "dokku/web_config"
if [ "$RET" = "true" ]; then
INIT_CONF="/etc/init/dokku-installer.conf"
NGINX_CONF="/etc/nginx/conf.d/dokku-installer.conf"
rm -f $INIT_CONF
touch $INIT_CONF
echo 'start on runlevel [2345]' >> $INIT_CONF
echo 'exec /usr/local/share/dokku/contrib/dokku-installer.rb selfdestruct' >> $INIT_CONF
rm -f $NGINX_CONF
touch $NGINX_CONF
{
echo 'upstream dokku-installer { server 127.0.0.1:2000; }'
echo 'server {'
echo ' listen 80;'
echo ' location / {'
echo ' proxy_pass http://dokku-installer;'
echo ' }'
echo '}'
} >> $NGINX_CONF
rm -f /etc/nginx/sites-enabled/*
service nginx reload || /etc/init.d/nginx reload
exit 0
fi
if [ -z "${DEBCONF_RECONFIGURE}" ]; then
db_get "dokku/key_file"
if [ ! -f "$RET" ]; then
echo "Error: keyfile '$RET' not found."
echo " you can enter a new keyfile path when you restart the installation."
db_reset "dokku/key_file"
exit 1
fi
fi
;;
upgrade)
;;
abort-upgrade)
;;
*)
echo "preinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
exit 0

19
debian/templates vendored Normal file
View File

@@ -0,0 +1,19 @@
Template: dokku/web_config
Description: Use the web-based config page?
Type: boolean
Default: true
Template: dokku/vhost_enable
Description: Use vhost based deployments?
Type: boolean
Default: false
Template: dokku/hostname
Description: Machine's hostname or IP
Type: string
Default: dokku.me
Template: dokku/key_file
Description: Keyfile for initial user
Type: string
Default: /root/.ssh/id_rsa.pub

View File

@@ -1,38 +1,81 @@
#Advanced installation
# Advanced installation
You can always install dokku straight from the latest - potentially unstable - master release via the following bash command:
```shell
wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo DOKKU_BRANCH=master bash
```
## Development
If you plan on developing dokku, the easiest way to install from your own repository is cloning
the repository and calling the install script. Example:
If you plan on developing dokku, the easiest way to install from your own repository is cloning the repository and calling the install script. Example:
$ git clone https://github.com/yourusername/dokku.git
$ cd dokku
$ sudo make install
```shell
git clone https://github.com/yourusername/dokku.git
cd dokku
sudo make install
```
The `Makefile` allows source URLs to be overridden to include customizations from your own
repositories. The `DOCKER_URL`, `PLUGINHOOK_URL`, `SSHCOMMAND_URL` and `STACK_URL`
environment variables may be set to override the defaults (see the `Makefile` for how these
apply). Example:
The `Makefile` allows source URLs to be overridden to include customizations from your own repositories. The `DOCKER_URL`, `PLUGINHOOK_URL`, `SSHCOMMAND_URL` and `STACK_URL` environment variables may be set to override the defaults (see the `Makefile` for how these apply). Example:
$ sudo SSHCOMMAND_URL=https://raw.github.com/yourusername/sshcommand/master/gitreceive make install
```shell
sudo SSHCOMMAND_URL=https://raw.github.com/yourusername/sshcommand/master/sshcommand make install
```
## Bootstrap a server from your own repository
The bootstrap script allows the dokku repository URL to be overridden to bootstrap a host from
your own clone of dokku using the `DOKKU_REPO` environment variable. Example:
The bootstrap script allows the dokku repository URL to be overridden to bootstrap a host from your own clone of dokku using the `DOKKU_REPO` environment variable. Example:
$ wget https://raw.github.com/progrium/dokku/master/bootstrap.sh
$ chmod +x bootstrap.sh
$ sudo DOKKU_REPO=https://github.com/yourusername/dokku.git ./bootstrap.sh
```shell
wget https://raw.github.com/progrium/dokku/master/bootstrap.sh
chmod +x bootstrap.sh
sudo DOKKU_REPO=https://github.com/yourusername/dokku.git DOKKU_BRANCH=master ./bootstrap.sh
```
## Custom buildstep build
## Custom herokuish build
Dokku ships with a pre-built version of version of the [buildstep] component by
default. If you want to build your own version you can specify that with an env
variable.
Dokku ships with a pre-built version of version of the [herokuish](https://github.com/gliderlabs/herokuish) component by default. If you want to build your own version you can specify that with an env variable.
$ git clone https://github.com/progrium/dokku.git
$ cd dokku
$ sudo BUILD_STACK=true make install
```shell
git clone https://github.com/progrium/dokku.git
cd dokku
sudo BUILD_STACK=true STACK_URL=https://github.com/gliderlabs/herokuish.git make install
```
[buildstep]: https://github.com/progrium/buildstep
## Configuring
Once dokku is installed, if you are not using the web-installer, you'll want to configure a the virtualhost setup as well as the push user. If you do not, your installation will be considered incomplete and you will not be able to deploy applications.
Set up a domain and a wildcard domain pointing to that host. Make sure `/home/dokku/VHOST` is set to this domain. By default it's set to whatever hostname the host has. This file is only created if the hostname can be resolved by dig (`dig +short $(hostname -f)`). Otherwise you have to create the file manually and set it to your preferred domain. If this file still is not present when you push your app, dokku will publish the app with a port number (i.e. `http://example.com:49154` - note the missing subdomain).
You'll have to add a public key associated with a username by doing something like this from your local machine:
$ cat ~/.ssh/id_rsa.pub | ssh dokku.me "sudo sshcommand acl-add dokku $USER"
If you are using the vagrant installation, you can use the following command to add your public key to dokku:
$ cat ~/.ssh/id_rsa.pub | make vagrant-acl-add
That's it!
## VMs with less than 1GB of memory
Having less than 1GB of system memory available for dokku and its containers, for example Digital Ocean's small 512MB machines, might result in unexpected errors, such as **! [remote rejected] master -> master (pre-receive hook declined)** during installation of NPM dependencies (https://github.com/npm/npm/issues/3867).
To work around this issue, it might suffice to augment the linux swap file size to a maximum of twice the physical memory size.
To resize the swap file of a 512MB machine to 1GB, follow these steps while in SSH within your machine:
```shell
cd /var
touch swap.img
chmod 600 swap.img
dd if=/dev/zero of=/var/swap.img bs=1024k count=1000
mkswap /var/swap.img
swapon /var/swap.img
free
echo "/var/swap.img none swap sw 0 0" >> /etc/fstab
```
Reference: https://www.digitalocean.com/community/tutorials/how-to-configure-virtual-memory-swap-file-on-a-vps

View File

@@ -0,0 +1,160 @@
# Deploy an App
Now you can deploy apps on your Dokku. Let's deploy the [Heroku Node.js sample app](https://github.com/heroku/node-js-sample). All you have to do is add a remote to name the app. It's created on-the-fly.
```
$ cd node-js-sample
$ git remote add dokku dokku@dokku.me:node-js-app
$ git push dokku master
Counting objects: 296, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (254/254), done.
Writing objects: 100% (296/296), 193.59 KiB, done.
Total 296 (delta 25), reused 276 (delta 13)
-----> Building node-js-app ...
Node.js app detected
-----> Resolving engine versions
... blah blah blah ...
-----> Application deployed:
http://node-js-app.dokku.me
```
You're done!
Dokku only supports deploying from its master branch, so if you'd like to deploy a different local branch use: ```git push dokku <local branch>:master```
Right now Herokuish supports buildpacks for Node.js, Ruby, Python, [and more](https://github.com/gliderlabs/herokuish#buildpacks).
Please check the documentation for your particular build pack as you may need to include configuration files (such as a Procfile) in your project root.
## Deploying to server over SSH
Pushing to the dokku remote may prompt you to input a password for the dokku user. It's preferable, however, to use key-based authentication, and you can add your public key to the dokku user's authorized_keys file with:
```
cat ~/.ssh/id_rsa.pub | ssh [sudouser]@[yourdomain].com "sudo sshcommand acl-add dokku [description]"
```
## Deploying with private git submodules
Dokku uses git locally (i.e. not a docker image) to build its own copy of your app repo, including submodules. This is done as the `dokku` user. Therefore, in order to deploy private git submodules, you'll need to drop your deploy key in `~dokku/.ssh` and potentially add github.com (or your VCS host key) into `~dokku/.ssh/known_hosts`. A decent test like this should help confirm you've done it correctly.
```
su - dokku
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
ssh -T git@github.com
```
## Specifying a custom buildpack
If buildpack detection isn't working well for you or you want to specify a custom buildpack for one repository you can create & commit a file in the root of your git repository named `.env` containing `export BUILDPACK_URL=<repository>` before pushing. This will tell herokuish to fetch the specified buildpack and use it instead of relying on the built-in buildpacks & their detection methods.
## Dockerfile deployment
Deployment of `Dockerfile` repos is supported as of v0.3.15. Simply place a Dockerfile in the root of your repo and push to dokku. If you are converting from a heroku/dokku buildpack deployment, ensure you are not setting `$BUILDPACK_URL` or including a `.buildpacks` file in the root of your repo.
By default, we will extract the first `EXPOSE` port and tell nginx to proxy your app to that port. Alternatively, you can set `$DOCKERFILE_PORT` in your app's dokku configuration.
By default no arguments are passed to `docker run` when deploying the container and the `CMD` or `ENTRYPOINT` defined in the `Dockerfile` are executed. You can take advantage of docker ability of overriding the `CMD` or passing parameters to your `ENTRYPOINT` setting `$DOKKU_DOCKERFILE_START_CMD`. Let's say for example you are deploying a base nodejs image, with the following `ENTRYPOINT`:
```
ENTRYPOINT ["node"]
```
You can do:
```
dokku config:set DOKKU_DOCKERFILE_START_CMD="--harmony server.js"
```
To tell docker what to run.
Setting `$DOKKU_DOCKERFILE_CACHE_BUILD` to `true` or `false` will enable or disable docker's image layer cache. Lastly, for more granular build control, you may also pass any `docker build` option to `docker`, by setting `$DOKKU_DOCKER_BUILD_OPTS`.
## Default vhost
You might notice the default vhost for Nginx will be one of the apps. If an app doesn't exist, it will use this vhost and it may be confusing for it to go to another app. You can create a default vhost using a configuration under `sites-enabled`. You just have to change one thing in the main nginx.conf:
Swap both conf.d include line and the sites-enabled include line. From:
```
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
```
to
```
include /etc/nginx/sites-enabled/*;
include /etc/nginx/conf.d/*.conf;
```
Alternatively, you may push an app to your dokku host with a name like "00-default". As long as it lists first in `ls /home/dokku/*/nginx.conf | head`, it will be used as the default nginx vhost.
## Deploying to subdomains
The name of remote repository is used as the name of application to be deployed, as for example above:
$ git remote add dokku dokku@dokku.me:node-js-app
$ git push dokku master
Is deployed to,
remote: -----> Application deployed:
remote: http://node-js-app.dokku.me
You can also specify fully qualified names, say `app.dokku.me`, as
$ git remote add dokku dokku@dokku.me:app.dokku.me
$ git push dokku master
So, after deployment the application will be available at,
remote: -----> Application deployed:
remote: http://app.dokku.me
This is in particular useful, then you want to deploy to root domain, as
$ git remote add dokku dokku@dokku.me:dokku.me
$ git push dokku master
... deployment ...
remote: -----> Application deployed:
remote: http://dokku.me
# Zero downtime deploy
Following a deploy, dokku will now wait `DOKKU_DEFAULT_CHECKS_WAIT` seconds (default: `10`), and if the container is still running, then route traffic to the new container.
This can be problematic for applications whose boot up time can vary and can lead to `502 Bad Gateway` errors.
Dokku provides a way to run a set of more precise checks against the new container, and only switch traffic over if all checks complete successfully.
To specify checks, add a `CHECKS` file to the root of your project directory. This is a text file with one line per check. Empty lines and lines starting with `#` are ignored.
A check is a relative URL and may be followed by expected content from the page, for example:
```
/about Our Amazing Team
```
Dokku will wait `DOKKU_CHECKS_WAIT` seconds (default: `5`) before running the checks to give server time to start. For shorter/longer wait, change the `DOKKU_CHECKS_WAIT` environment variable. This can also be overridden in the CHECKS file by setting WAIT=nn.
Dokku will wait `DOKKU_WAIT_TO_RETIRE` seconds (default: `60`) before stopping the old container such that no existing connections to it are dropped.
Dokku will retry the checks DOKKU_CHECKS_ATTEMPTS times until the checks are successful or DOKKU_CHECKS_ATTEMPTS is exceeded. In the latter case, the deployment is considered failed. This can be overridden in the CHECKS file by setting ATTEMPTS=nn.
Checks can be skipped entirely by setting `DOKKU_SKIP_ALL_CHECKS` to `true` either globally or per application. You can choose to skip only default checks by setting `DOKKU_SKIP_DEFAULT_CHECKS` to `true` either globally or per application.
See [checks-examples.md](checks-examples.md) for examples and output.
# Removing a deployed app
SSH onto the server, then execute:
```shell
dokku apps:destroy myapp
```
# Dokku/Docker Container Management Compatibility
Dokku is, at it's core, a docker container manager. Thus, it does not necessarily play well with other out-of-band processes interacting with the docker daemon. One thing to note as in [issue #1220](https://github.com/progrium/dokku/issues/1220), dokku executes a cleanup function prior to every deployment. This function removes all exited containers and all 'unattached' images.

BIN
docs/assets/docker.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
docs/assets/extend.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

BIN
docs/assets/git.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

125
docs/assets/style.css Normal file
View File

@@ -0,0 +1,125 @@
body {
padding-bottom: 40px;
color: #5a5a5a;
}
h1 {
color: #5a5a5a;
font-family: 'montserrat', Optima, Segoe, "Segoe UI", Candara, Calibri, Arial, sans-serif;
font-weight: 700;
line-height: 1.1;
margin-bottom: 12px;
margin-top: 12px;
text-rendering: optimizelegibility;
}
.header {
background-color: #2a8fbd;
padding: 22px 0;
}
.header .heading {
color: #fff;
font-size: 23px;
margin: 0;
padding: 0;
}
.blurb {
color: #424242;
background-color: #ededed;
background-image: url(gplaypattern.png);
padding: 45px 0;
text-align: center;
}
.blurb p {
font-size: 17px;
font-weight: 300;
margin: 18px 0 18px;
text-align: center;
}
.quickstart-code {
display: block;
font-size: 12px;
line-height: 1.3em;
margin: 45px auto;
max-width: 650px;
padding: 0;
}
.quickstart-code .title {
background-color: #dfdfdf;
background-image: linear-gradient(top, #f7f7f7 0%, #dfdfdf 7%, #ccc 100%);
border-bottom: 1px solid #111;
color: #444;
display: block;
font-weight: 400;
font-size: 14px;
margin: 0 20px;
padding: 3px 0;
text-align: center;
text-shadow: 0 1px 0 rgba(255,255,255,0.5);
border-radius: 5px 5px 0 0;
box-shadow: 0 3px 0 rgba(0,0,0,0.5);
}
.quickstart-code .shell {
background-color: #171717;
font-family: Menlo, Consolas, "Courier New", Courier, "Liberation Mono", monospace;
margin: 0 20px;
padding: 20px;
text-shadow: none;
border-radius: 0 0 5px 5px;
box-shadow: 0 5px 30px rgba(0,0,0,0.3);
}
.quickstart-code .line {
display: block;
margin: 0;
padding: 0;
}
.quickstart-code .line span {
display: inline-block;
}
.quickstart-code .path {
color: #2a8fbd;
user-select: none;
}
.quickstart-code .prompt {
color: #ff9900;
user-select: none;
}
.quickstart-code .command {
color: #ffffcc;
}
.marketing .col-lg-4 {
margin-bottom: 20px;
text-align: center;
}
.marketing .col-lg-4 p {
margin-right: 10px;
margin-left: 10px;
}
.featurette-divider {
margin: 20px 0;
}
.featurette-heading {
font-weight: normal;
line-height: 1;
letter-spacing: -1px;
}
.featurette-heading .text-muted {
font-weight: 300;
}
@media (min-width: 768px) {
.quickstart-code {
font-size: 14px;
line-height: 22px;
}
.featurette-heading {
font-size: 50px;
}
}
@media (min-width: 992px) {
.featurette-heading {
margin-top: 120px;
}
}

203
docs/checks-examples.md Normal file
View File

@@ -0,0 +1,203 @@
# Checks Examples
The CHECKS file may contain empty lines, comments (lines starting with #),
settings (NAME=VALUE) and check instructions.
The format of a check instruction is a path, optionally followed by the
expected content. For example:
/ My Amazing App
/stylesheets/index.css .body
/scripts/index.js $(function()
/images/logo.png
To check an application that supports multiple hostnames, use relative URLs
that include the hostname, for example:
//admin.example.com Admin Dashboard
//static.example.com/logo.png
You can also specify the protocol to explicitly check HTTPS requests.
The default behavior is to wait for 5 seconds before running the first check,
and timeout each check to 30 seconds.
By default, checks will be attempted 5 times. (Retried 4 times)
You can change these by setting WAIT, TIMEOUT and ATTEMPTS to different values, for
example:
WAIT=30 # Wait 1/2 minute
TIMEOUT=60 # Timeout after a minute
ATTEMPTS=10 # attempt checks 10 times
# Example: Successful Rails Deployment
In this example, a rails applicaiton is successfully deployed to dokku. The initial round of checks fails while the server is starting, but once it starts they succeed and the deployment is successful.
ATTEMPTS is set to 6, but the third attempt succeeds.
## CHECKS file
````
WAIT=5
ATTEMPTS=6
/check.txt simple_check
````
> check.txt is a text file returning the string 'simple_check'
## Deploy Output
> Note: The output has been trimmed for brevity
````
git push dokku master
-----> Cleaning up...
-----> Building myapp from herokuish...
-----> Adding BUILD_ENV to build environment...
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
.....
-----> Discovering process types
Procfile declares types -> web
-----> Releasing myapp...
-----> Deploying myapp...
-----> Running pre-flight checks
-----> Attempt 1/6 Waiting for 5 seconds ...
CHECKS expected result:
http://localhost/check.txt => "simple_check"
!
curl: (7) Failed to connect to 172.17.0.155 port 5000: Connection refused
! Check attempt 1/6 failed.
-----> Attempt 2/6 Waiting for 5 seconds ...
CHECKS expected result:
http://localhost/check.txt => "simple_check"
!
curl: (7) Failed to connect to 172.17.0.155 port 5000: Connection refused
! Check attempt 2/6 failed.
-----> Attempt 3/6 Waiting for 5 seconds ...
CHECKS expected result:
http://localhost/check.txt => "simple_check"
-----> All checks successful!
=====> myapp container output:
=> Booting Thin
=> Rails 4.2.0 application starting in production on http://0.0.0.0:5000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Thin web server (v1.6.3 codename Protein Powder)
Maximum connections set to 1024
Listening on 0.0.0.0:5000, CTRL+C to stop
=====> end myapp container output
-----> Running post-deploy
-----> Configuring myapp.dokku.example.com...
-----> Creating http nginx.conf
-----> Running nginx-pre-reload
Reloading nginx
-----> Shutting down old container in 60 seconds
=====> Application deployed:
http://myapp.dokku.example.com
````
# Example: Failing Rails Deployment
In this example, a Rails application fails to deploy. The reason for the failure is that the postgres database connection fails. The initial checks will fail while we wait for the server to start up, just like in the above example. However, once the server does start accepting connections, we will see an error 500 due to the postgres database connection failure.
Once the attempts have been exceeded, the deployment fails and we see the container output, which shows the Postgres connection errors.
## CHECKS file
````
WAIT=5
ATTEMPTS=6
/
````
> The check to the root url '/' would normally access the database.
## Deploy Output
> Note: The output has been trimmed for brevity
````
git push dokku master
-----> Cleaning up...
-----> Building myapp from herokuish...
-----> Adding BUILD_ENV to build environment...
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
.....
Discovering process types
Procfile declares types -> web
Releasing myapp...
Deploying myapp...
Running pre-flight checks
-----> Attempt 1/6 Waiting for 5 seconds ...
CHECKS expected result:
http://localhost/ => ""
!
curl: (7) Failed to connect to 172.17.0.188 port 5000: Connection refused
! Check attempt 1/6 failed.
-----> Attempt 2/6 Waiting for 5 seconds ...
CHECKS expected result:
http://localhost/ => ""
!
curl: (7) Failed to connect to 172.17.0.188 port 5000: Connection refused
! Check attempt 2/6 failed.
-----> Attempt 3/6 Waiting for 5 seconds ...
CHECKS expected result:
http://localhost/ => ""
!
curl: (22) The requested URL returned error: 500 Internal Server Error
! Check attempt 3/6 failed.
-----> Attempt 4/6 Waiting for 5 seconds ...
CHECKS expected result:
http://localhost/ => ""
!
curl: (22) The requested URL returned error: 500 Internal Server Error
! Check attempt 4/6 failed.
-----> Attempt 5/6 Waiting for 5 seconds ...
CHECKS expected result:
http://localhost/ => ""
!
curl: (22) The requested URL returned error: 500 Internal Server Error
! Check attempt 5/6 failed.
-----> Attempt 6/6 Waiting for 5 seconds ...
CHECKS expected result:
http://localhost/ => ""
!
curl: (22) The requested URL returned error: 500 Internal Server Error
Could not start due to 1 failed checks.
! Check attempt 6/6 failed.
=====> myapp container output:
=> Booting Thin
=> Rails 4.2.0 application starting in production on http://0.0.0.0:5000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Thin web server (v1.6.3 codename Protein Powder)
Maximum connections set to 1024
Listening on 0.0.0.0:5000, CTRL+C to stop
Started GET "/" for 172.17.42.1 at 2015-03-26 21:36:47 +0000
Is the server running on host "172.17.42.1" and accepting
TCP/IP connections on port 5431?
PG::ConnectionBad (could not connect to server: Connection refused
Is the server running on host "172.17.42.1" and accepting
TCP/IP connections on port 5431?
):
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `initialize'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `new'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `connect'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:242:in `initialize'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `new'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `postgresql_connection
=====> end myapp container output
/usr/local/bin/dokku: line 49: 23409 Killed dokku deploy "$APP"
To dokku@dokku.example.com:myapp
! [remote rejected] dokku -> master (pre-receive hook declined)
error: failed to push some refs to 'dokku@dokku.example.com:myapp'
````

94
docs/community/clients.md Normal file
View File

@@ -0,0 +1,94 @@
# Clients
Given the constraints, running dokku commands remotely via SSH is fine. For certain configurations, the extra complication of manually invoking ssh can be a burden.
While dokku does not yet have an official client, there are a multitude of ways in which you can interact with your dokku installation. The easiest is to use the **bash** client, though you may wish to use another.
## (bash, zsh, etc.) `dokku_client.sh`
Of all methods, this is the *most* official method of interacting with your dokku installation. It is a bash script that interacts with a remote dokku installation via ssh. It is available in `contrib/dokku_client.sh` in the root of the dokku repository.
To install, simply clone the dokku repository down and add the `dokku` alias pointing at the script:
```shell
git clone git@github.com:progrium/dokku.git ~/.dokku
# add the following to either your
# .bashrc, .bash_profile, or .profile file
alias dokku='$HOME/.dokku/contrib/dokku_client.sh'
```
Alternatively, if using another shell such as **zsh**, create an alias command which invokes the script using **bash**:
```shell
# zsh: add the following to either .zshenv or .zshrc
alias dokku='bash $HOME/.dokku/contrib/dokku_client.sh'
# fish: add the following to ~/.config/fish/config.fish
alias dokku 'bash $HOME/.dokku/contrib/dokku_client.sh'
# csh: add the following to .cshrc
alias dokku 'bash $HOME/.dokku/contrib/dokku_client.sh'
```
Configure the `DOKKU_HOST` environment variable or run `dokku` from a repository with a git remote named dokku pointed at your dokku host in order to use the script as normal.
## (nodejs) dokku-toolbelt
Dokku-toolbelt is a node-based cli wrapper that proxies requests to the dokku command running on remote hosts. You can install it via the following shell command (assuming you have nodejs and npm installed):
```shell
npm install -g dokku-toolbelt
```
See [documentation here](https://www.npmjs.com/package/dokku-toolbelt) for more information.
## (python) dokku-client
dokku-client is an extensible python-based cli wrapper for remote dokku hosts. You can install it via the following shell command (assuming you have python and pip installed):
```shell
pip install dokku-client
```
See [documentation here](https://github.com/adamcharnock/dokku-client) for more information.
## (ruby) Dokku CLI
Dokku CLI is a rubygem that acts as a client for your dokku installation. You can install it via the following shell command (assuming you have ruby and rubygems installed):
```shell
gem install dokku-cli
```
See [documentation here](https://github.com/SebastianSzturo/dokku-cli) for more information.
## (ruby) DokkuClient
DokkuClient is another rubygem that acts as a client for your dokku installation with built-in support for certain external plugins. You can install it via the following shell command (assuming you have ruby and rubygems installed):
```shell
gem install dokku_client
```
See [documentation here](https://github.com/netguru/dokku_client) for more information.
## (ruby) Dokkufy
Dokkufy is a rubygem that handles automation of certain tasks, such as dokku setup, plugin installation, etc. You can install it via the following shell command (assuming you have ruby and rubygems installed):
```shell
gem install dokkufy
```
See [documentation here](https://github.com/cbetta/dokkufy) for more information.
## (ruby) Dockland
Dockland is a rubygem that acts as a client for your dokku installation. You can install it via the following shell command (assuming you have ruby and rubygems installed):
```shell
gem install dockland
```
See [documentation here](https://github.com/uetchy/dockland) for more information.

8
docs/components.md Normal file
View File

@@ -0,0 +1,8 @@
# Components
* [Docker](https://github.com/dotcloud/docker) - Container runtime and manager
* [Herokuish](https://github.com/gliderlabs/herokuish) - Buildpack builder
* [pluginhook](https://github.com/progrium/pluginhook) - Shell based plugins and hooks
* [sshcommand](https://github.com/progrium/sshcommand) - Fixed commands over SSH
Looking to keep codebase as simple and hackable as possible, so try to keep your line count down.

View File

@@ -0,0 +1,16 @@
# Configuration management
Typically an application will require some configuration to run properly. Dokku supports application configuration via environment variables. Environment variables may contain private data, such as passwords or API keys, so it is not recommended to store them in your application's repository.
The `config` plugin provides the following commands to manage your variables:
```
config <app> - display the config vars for an app
config:get <app> KEY - display a config value for an app
config:set <app> KEY1=VALUE1 [KEY2=VALUE2 ...] - set one or more config vars
config:unset <app> KEY1 [KEY2 ...] - unset one or more config vars
```
The variables are available both at run time and during the application build/compilation step. You no longer need a `user-env` plugin as Dokku handles this functionality in a way equivalent to how Heroku handles it.
> Note: Global `BUILD_ENV` files are currently migrated into a global `ENV` file and sourced before app-specific variables. This means that app-specific variables will take precedence over global variables. Configuring your global `ENV` file is manual, and should be considered potentially dangerous as configuration applies to all applications.

View File

@@ -0,0 +1,82 @@
# Plugin Creation
If you create your own plugin:
1. Take a look at the plugins shipped with dokku and hack away!
2. Check out the [list of hooks](http://progrium.viewdocs.io/dokku/development/pluginhooks) your plugin can implement.
3. Upload your plugin to github with a repository name in form of `dokku-<name>` (e.g. `dokku-mariadb`)
4. Edit [this page](http://progrium.viewdocs.io/dokku/plugins) and add a link to it.
5. Subscribe to the [dokku development blog](http://progrium.com) to be notified about API changes and releases
### Sample plugin
The below plugin is a dummy `dokku hello` plugin. If your plugin exposes commands, this is a good template for your `commands` file:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$(dirname $0)/../common/functions"
case "$1" in
hello)
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
verify_app_name "$2"
APP="$2";
echo "Hello $APP"
;;
hello:world)
echo "Hello world"
;;
help)
cat && cat<<EOF
hello <app>, Says "Hello <app>"
hello:world, Says "Hello world"
EOF
;;
*)
exit $DOKKU_NOT_IMPLEMENTED_EXIT
;;
esac
```
A few notes:
- You should always support `DOKKU_TRACE` as specified on the 2nd line of the plugin.
- If your command requires that an application exists, ensure you check for it's existence in the manner prescribed above.
- A `help` command is required, though it is allowed to be empty. Also, the command syntax will need to separated by `, ` in order to maintain columnar output alignment.
- Commands *should* be namespaced.
- As of 0.3.3, a catch-all should be implemented which exits with a `DOKKU_NOT_IMPLEMENTED_EXIT` code. This allows dokku to output a `command not found` message.
- Be sure you want the "set -eo pipefail" option. Look at the following example :
```shell
IMAGE=$(docker images | grep "user/repo" | awk '{print $3}')
if [[ -z $IMAGE ]]; then
echo "user/repo image not found... Did you run 'dokku plugins-install'?"
exit 1
fi
```
In the case where the "user/repo" is not installed, dokku exits just before the awk command,
you will never see the message printed with echo. You just want "set -e" in this case.
Here is the documentation of the 'set -eo pipefail' option:
```
help set
Options:
-e Exit immediately if a command exits with a non-zero status.
-o option-name
pipefail the return value of a pipeline is the status of
the last command to exit with a non-zero status,
or zero if no command exited with a non-zero status
```
- As some plugins require access to set app config settings and do not want/require the default Heroku-style behavior of a restart, we have the following "internal" commands that provide this functionality :
```shell
dokku config:set-norestart APP KEY1=VALUE1 [KEY2=VALUE2 ...]
dokku config:unset-norestart APP KEY1 [KEY2 ...]
```

View File

@@ -0,0 +1,615 @@
# Pluginhooks
[Pluginhooks](https://github.com/progrium/pluginhook) are a good way to jack into existing dokku infrastructure. You can use them to modify the output of various dokku commands or override internal configuration.
Pluginhooks are simply scripts that are executed by the system. You can use any language you want, so long as the script:
- Is executable
- Has the proper language requirements installed
For instance, if you wanted to write a pluginhook in PHP, you would need to have `php` installed and available on the CLI prior to pluginhook invocation.
The following is an example for the `nginx-hostname` pluginhook. It reverses the hostname that is provided to nginx during deploys. If you created an executable file named `nginx-hostname` with the following code in your plugin, it would be invoked by dokku during the normal app deployment process:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1"; SUBDOMAIN="$2"; VHOST="$3"
NEW_SUBDOMAIN=`echo $SUBDOMAIN | rev`
echo "$NEW_SUBDOMAIN.$VHOST"
```
## Available Pluginhooks
There are a number of plugin-related pluginhooks. These can be optionally implemented by plugins and allow integration into the standard dokku plugin setup/backup/teardown process.
The following pluginhooks describe those available to a dokku installation. As well, there is an example for each pluginhook that you can use as templates for your own plugin development.
> The example pluginhook code is not guaranteed to be implemented as in within dokkku, and are merely simplified examples. Please look at the dokku source for larger, more in-depth examples.
### `install`
- Description: Used to setup any files/configuration for a plugin.
- Invoked by: `dokku plugins-install`.
- Arguments: None
- Example:
```shell
#!/usr/bin/env bash
# Sets the hostname of the dokku server
# based on the output of `hostname -f`
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
if [[ ! -f "$DOKKU_ROOT/HOSTNAME" ]]; then
hostname -f > $DOKKU_ROOT/HOSTNAME
fi
```
### `dependencies`
- Description: Used to install system-level dependencies. Invoked by `plugins-install-dependencies`.
- Invoked by: `dokku plugins-install-dependencies`
- Arguments: None
- Example:
```shell
#!/usr/bin/env bash
# Installs nginx for the current plugin
# Supports both opensuse and ubuntu
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
case "$DOKKU_DISTRO" in
ubuntu)
export DEBIAN_FRONTEND=noninteractive
apt-get install --force-yes -qq -y nginx
;;
opensuse)
zypper -q in -y nginx
;;
esac
```
### `update`
- Description: Can be used to run plugin updates on a regular interval. You can schedule the invoker in a cron-task to ensure your system gets regular updates.
- Invoked by: `dokku plugins-update`.
- Arguments: None
- Example:
```shell
#!/usr/bin/env bash
# Update the herokuish image from git source
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
cd /root/dokku
sudo BUILD_STACK=true make install
```
### `commands help`
- Description: Used to aggregate all plugin `help` output. Your plugin should implement a `help` command in your `commands` file to take advantage of this pluginhook. This must be implemented inside the `commands` pluginhook file.
- Invoked by: `dokku help`
- Arguments: None
- Example:
```shell
#!/usr/bin/env bash
# Outputs help for the derp plugin
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
case "$1" in
help | derp:help)
cat && cat<<EOF
derp:herp, Herps the derp
derp:serp [file], Shows the file's serp
EOF
;;
*)
exit $DOKKU_NOT_IMPLEMENTED_EXIT
;;
esac
```
### `backup-export`
- Description: Used to backup files for a given plugin. If your plugin writes files to disk, this pluginhook should be used to echo out their full paths. Any files listed will be copied by the backup plugin to the backup tar.gz.
- Invoked by: `dokku backup:export`
- Arguments: `$VERSION $DOKKU_ROOT`
- Example:
```shell
#!/usr/bin/env bash
# Echos out the location of every `REDIRECT` file
# that are used by the apps
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
shopt -s nullglob
VERSION="$1"
DOKKU_ROOT="$2"
cat; for i in $DOKKU_ROOT/*/REDIRECT; do echo $i; done
```
### `backup-check`
- Description: Checks that a backup being imported passes sanity checks.
- Invoked by: `dokku backup:import`
- Arguments: `$VERSION $BACKUP_ROOT $DOKKU_ROOT $BACKUP_TMP_DIR/.dokku_backup_apps`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
# TODO
```
### `backup-import`
- Description: Allows a plugin to import specific files from a `$BACKUP_ROOT` to the `DOKKU_ROOT` directory.
- Invoked by: `dokku backup:import`
- Arguments: `$VERSION $BACKUP_ROOT $DOKKU_ROOT $BACKUP_TMP_DIR/.dokku_backup_apps`
- Example:
```shell
#!/usr/bin/env bash
# Copies all redirect files from the backup
# into the correct app path.
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
shopt -s nullglob
VERSION="$1"
BACKUP_ROOT="$2"
DOKKU_ROOT="$3"
cd $BACKUP_ROOT
for file in */REDIRECT; do
cp $file "$DOKKU_ROOT/$file"
done
```
### `pre-build-buildpack`
- Description: Allows you to run commands before the build image is created for a given app. For instance, this can be useful to add env vars to your container. Only applies to applications using buildpacks.
- Invoked by: `dokku build`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
# TODO
```
### `post-build-buildpack`
- Description: Allows you to run commands after the build image is create for a given app. Only applies to applications using buildpacks.
- Invoked by: `dokku build`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
# TODO
```
### `pre-build-dockerfile`
- Description: Allows you to run commands before the build image is created for a given app. For instance, this can be useful to add env vars to your container. Only applies to applications using a dockerfile.
- Invoked by: `dokku build`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
# TODO
```
### `post-build-dockerfile`
- Description: Allows you to run commands after the build image is create for a given app. Only applies to applications using a dockerfile.
- Invoked by: `dokku build`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
# TODO
```
### `pre-release-buildpack`
- Description: Allows you to run commands before environment variables are set for the release step of the deploy. Only applies to applications using buildpacks.
- Invoked by: `dokku release`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
# Installs the graphicsmagick package into the container
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$(dirname $0)/../common/functions"
dokku_log_info1" Installing GraphicsMagick..."
CMD="cat > gm && \
dpkg -s graphicsmagick > /dev/null 2>&1 || \
(apt-get update && apt-get install -y graphicsmagick && apt-get clean)"
ID=$(docker run -i -a stdin $IMAGE /bin/bash -c "$CMD")
test $(docker wait $ID) -eq 0
docker commit $ID $IMAGE > /dev/null
```
### `post-release-buildpack`
- Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to applications using buildpacks.
- Invoked by: `dokku release`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
# Installs a package specified by the `CONTAINER_PACKAGE` env var
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$(dirname $0)/../common/functions"
dokku_log_info1" Installing $CONTAINER_PACKAGE..."
CMD="cat > gm && \
dpkg -s CONTAINER_PACKAGE > /dev/null 2>&1 || \
(apt-get update && apt-get install -y CONTAINER_PACKAGE && apt-get clean)"
ID=$(docker run -i -a stdin $IMAGE /bin/bash -c "$CMD")
test $(docker wait $ID) -eq 0
docker commit $ID $IMAGE > /dev/null
```
### `pre-release-dockerfile`
- Description: Allows you to run commands before environment variables are set for the release step of the deploy. Only applies to applications using a dockerfile.
- Invoked by: `dokku release`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
# TODO
```
### `post-release-dockerfile`
- Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to applications using a dockerfile.
- Invoked by: `dokku release`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
# TODO
```
### `check-deploy`
- Description: Allows you to run checks on a deploy before dokku allows the container to handle requests.
- Invoked by: `dokku deploy`
- Arguments: `$CONTAINER_ID $APP $INTERNAL_PORT $INTERNAL_IP_ADDRESS`
- Example:
```shell
#!/usr/bin/env bash
# Disables deploys of containers based on whether the
# `DOKKU_DISABLE_DEPLOY` env var is set to `true` for an app
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
CONTAINERID="$1"; APP="$2"; PORT="$3" ; HOSTNAME="${4:-localhost}"
[[ -f "$DOKKU_ROOT/$APP/ENV" ]] && source $DOKKU_ROOT/$APP/ENV
DOKKU_DISABLE_DEPLOY="${DOKKU_DISABLE_DEPLOY:-false}"
if [[ "$DOKKU_DISABLE_DEPLOY" = "true" ]]; then
echo -e "\033[31m\033[1mDeploys disabled, sorry.\033[0m"
exit 1
fi
```
### `pre-deploy`
- Description: Allows the running of code before the container's process is started.
- Invoked by: `dokku deploy`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
# Runs gulp in our container
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$(dirname $0)/../common/functions"
APP="$1"
IMAGE="dokku/$APP"
dokku_log_info1 "Running gulp"
id=$(docker run -d $IMAGE /bin/bash -c "cd /app && gulp default")
test $(docker wait $id) -eq 0
docker commit $id $IMAGE > /dev/null
dokku_log_info1 "Building UI Complete"
```
### `post-deploy`
- Description: Allows running of commands after a deploy has completed. Dokku core currently uses this to switch traffic on nginx.
- Invoked by: `dokku deploy`
- Arguments: `$APP $INTERNAL_PORT $INTERNAL_IP_ADDRESS`
- Example:
```shell
#!/usr/bin/env bash
# Notify an external service that a successful deploy has occurred.
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
curl "http://httpstat.us/200"
```
### `pre-delete`
- Description: Can be used to run commands before an app is deleted.
- Invoked by: `dokku apps:destroy`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
# Clears out the gulp asset build cache for applications
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1"; IMAGE="dokku/$APP"; GULP_CACHE_DIR="$DOKKU_ROOT/$APP/gulp"
if [[ -d $GULP_CACHE_DIR ]]; then
docker run --rm -v "$GULP_CACHE_DIR:/gulp" "$IMAGE" find /gulp -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} \; || true
fi
```
### `post-delete`
- Description: Can be used to run commands after an application is deleted.
- Invoked by: `dokku apps:destroy`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
# Runs a command to ensure that an app's
# postgres installation is removed
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1";
dokku postgres:destroy $APP
```
### `docker-args-build`
- Description:
- Invoked by: `dokku build`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
# TODO
```
### `docker-args-deploy`
- Description:
- Invoked by: `dokku deploy`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
# TODO
```
### `docker-args-run`
- Description:
- Invoked by: `dokku run`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
# TODO
```
### `bind-external-ip`
- Description: Allows you to disable binding to the external box ip
- Invoked by: `dokku deploy`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
# Force always binding to the docker ip, no matter
# what the settings are for a given app.
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
echo false
```
### `post-domains-update`
- Description: Allows you to run commands once the domain for an application has been updated.
- Invoked by: `dokku domains:add`, `dokku domains:clear`, `dokku domains:remove`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
# Reloads haproxy for our imaginary haproxy plugin
# that replaces the nginx-vhosts plugin
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
sudo service haproxy reload
```
### `git-pre-pull`
- Description:
- Invoked by: `dokku git-upload-pack`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
# TODO
```
### `git-post-pull`
- Description:
- Invoked by: `dokku git-upload-pack`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
# TODO
```
### `nginx-hostname`
- Description: Allows you to customize the hostname for a given application.
- Invoked by: `dokku domains:setup`
- Arguments: `$APP $SUBDOMAIN $VHOST`
- Example:
```shell
#!/usr/bin/env bash
# Reverses the hostname for the application
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1"; SUBDOMAIN="$2"; VHOST="$3"
NEW_SUBDOMAIN=`echo $SUBDOMAIN | rev`
echo "$NEW_SUBDOMAIN.$VHOST"
```
### `nginx-pre-reload`
- Description: Run before nginx reloads hosts
- Invoked by: `dokku nginx:build-config`
- Arguments: `$APP $INTERNAL_PORT $INTERNAL_IP_ADDRESS`
- Example:
```shell
#!/usr/bin/env bash
# Runs a check against all nginx conf files
# to ensure they are valid
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
nginx -t
```
### `receive-app`
- Description: Allows you to customize what occurs when an app is received. Normally just triggers an application build.
- Invoked by: `dokku git-hook`, `dokku ps:rebuild`
- Arguments: `$APP $REV`
- Example:
```shell
#!/usr/bin/env bash
# For our imaginary mercurial plugin, triggers a rebuild
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1"; REV="$2"
dokku hg-build $APP $REV
```
### `receive-branch`
- Description: Allows you to customize what occurs when a specific branch is received. Can be used to add support for specific branch names
- Invoked by: `dokku git-hook`, `dokku ps:rebuild`
- Arguments: `$APP $REV $REFNAME`
- Example:
```shell
#!/bin/bash
# Gives dokku the ability to support multiple branches for a given service
# Allowing you to have multiple staging environments on a per-branch basis
reference_app=$1
refname=$3
newrev=$2
APP=${refname/*\//}.$reference_app
if [[ ! -d "$DOKKU_ROOT/$APP" ]]; then
REFERENCE_REPO="$DOKKU_ROOT/$reference_app
git clone --bare --shared --reference "$REFERENCE_REPO" "$REFERENCE_REPO" "$DOKKU_ROOT/$APP" > /dev/null
fi
pluginhook receive-app $APP $newrev
```

View File

@@ -0,0 +1,68 @@
# Release Process
Dokku is released in intervals *at most* three weeks apart, though may be released much quicker.
To propose a release, the following tasks need to be performed:
- The installable version must be changed in the `docs/installation.md` file.
- The installable version must be changed in the `README.md` file.
- The installable version must be changed in the `contrib/dokku-installer.rb` file.
- A list of changes must be made in the `HISTORY.md`.
- A tag must be created locally with your release version
- Debian packages *must* be created via `vagrant up build`
- The packages should be uploaded to packagecloud.io
- All changes are pushed to master and the tag should be turned into a release which will contain the changelog.
## Versioning
Dokku follows semver standards. As we are not yet at a stable release, breaking changes will require *only* a minor release, while all other changes only require a patch release. Once we hit stable, breaking changes will require a major release.
Tags should be created via the following method:
```shell
git tag v0.9.9
```
At the moment, tags need not be signed, though that may change in the future.
## Debian Packages
The `build` target in the dokku `Vagrantfile` creates debian packages for dokku at a point in time. The version will be based upon the latest local tag - you may create your own, internal tags/releases if that is so desired.
Debian package information is held in the `debian` directory of the dokku project.
For the public project, releases should be pushed to packagecloud.io *after* a tag is created but *before* said tag is pushed to github. The following may be the release workflow:
```shell
git tag v0.9.9
vagrant up build
export PACKAGECLOUD_TOKEN=SOME_TOKEN
package_cloud push dokku/dokku/ubuntu/trusty dokku_0.9.9_amd64.deb
```
If new versions of other packages were created, these should also be pushed at this time.
> If you are a maintainer and need the PACKAGECLOUD_TOKEN in order to make a release, please contact @josegonzalez to get this information.
## Changelog format
The `HISTORY.md` should be added to based on the changes made since the previous release. This can be done by reviewing all merged pull requests to the master branch on github. The format is as follows:
```
## 0.9.9
Some description concerning major changes in this release, or potential incompatibilities.
### New Features
- #SOME_ID: @pull-request-creator Description
### Bug Fixes
- #SOME_ID: @pull-request-creator Description
### Docs Changes
- #SOME_ID: @pull-request-creator Description
```

View File

@@ -0,0 +1,36 @@
# Dokku test suite
Dokku now has a full test suite to assist in quick iterating development. These tests include a linter using [shellcheck](https://github.com/koalaman/shellcheck), functional unit tests using the [bats testing framework](https://github.com/sstephenson/bats), and a deployment suite of example apps that use the most popular languages and frameworks.
Bats tests can be found here:
```
tests/unit/*.bats
```
Example apps can be found here:
```
tests/apps/
```
### Executing tests locally
- Setup dokku in a [vagrant vm](http://progrium.viewdocs.io/dokku/getting-started/install/vagrant)
- Test setup and execution
```shell
$ vagrant ssh
$ sudo su -
$ cd ~/dokku
$ make ci-dependencies setup-deploy-tests
$ make test # run the entire test suite (linter, bats tests, and app deployment tests)
$
$ make lint # linter
$ make unit-tests # bats tests
$ make deploy-tests # app deployment tests
```
- Additionally you may run a specific app deployment tests with a target similar to:
```shell
make deploy-test-nodejs-express
```
- For a full list of test make targets check out `tests.mk` in the root of the dokku repository.

88
docs/dns.md Normal file
View File

@@ -0,0 +1,88 @@
# Overview
This is a work in progress.
## DNS Versions
There are many different DNS servers 'in the wild'. Some of the popular ones on Linux are BIND, dnsmasq, and pdns. Windows has its own built-in DNS server as well as Unbound, Posadis, and more. A full list of DNS packages can be found on Wikipedia under [Comparison of DNS Server Software](http://en.wikipedia.org/wiki/Comparison_of_DNS_server_software). In addition to the various DNS packages, there are tens of thousands of [Managed DNS Providers](http://en.wikipedia.org/wiki/List_of_managed_DNS_providers) out that all have different DNS interfaces.
## Focus
Because there are so many different DNS server packages out there as well as a tremendous number of Managed DNS Providers, we will focus on the concepts of DNS as well as providing examples in the 'BIND' format so you can adapt the information to your own server package or managed DNS provider.
## Assumptions
* We assume you have a passing familiarity with DNS. If not, you can read an [in-depth article](http://www.diaryofaninja.com/blog/2012/03/03/devops-dns-for-developers-ndash-now-therersquos-no-excuse-not-to-know) on DNS. But basically you need to know that DNS changes names (like example.tld) into addresses (like 127.0.0.1)
* We assume you already have a domain name registered and pointed to your favorite Managed DNS Provider or have your own BIND DNS server running.
* You have a server on the internet and are about to follow the instructions in the [README](https://github.com/progrium/dokku/blob/master/README.md) to get dokku installed. Don't do the install just yet though.
## HELP!
Don't be afraid to ask if you need help. Create a [new issue](https://github.com/progrium/dokku/issues) and someone will be glad to assist you.
# Getting started
For the examples, we will use the domain name 'example.tld' and the IP address '127.0.0.1'.
Dokku uses a DNS to differentiate between apps on your dokku-powered server. If you are using the domain 'example.tld', and you have two apps 'myapp1' and 'myapp2', dokku will make them available at 'myapp1.example.tld' and 'myapp2.example.tld'.
To get started, you need to know the IP address of your dokku server. Connect in to it and run 'ifconfig' or 'ip addr' to see the IP address.
# Caching
Please remember that DNS relies heavily on _caching_. Changes you make to DNS could take anywhere from a few seconds to a few *days* to 'propagate'. If you tried surfing to example.tld, then changed the IP address in DNS, it could be a while before your computer picks up on the changes.
## The two methods
Now you have to make a decision about your domain. Do you want everything and anything at example.tld to go to your dokku server, or would you rather use a 'sub domain' for your dokku server?
In other words, do you want your applications on your dokku server accessible via myapp.example.tld or via myapp.myserver.example.tld?
### Using a sub-domain (myapp.myserver.example.tld)
Using a sub-domain is easy. When you set up your server, you probably gave it a name like myserver.example.tld.
Go in to your Managed DNS provider and create an 'A' record named 'myserver' and put in the IP address you got from your server a few moments ago.
Hopefully your managed DNS provider also supports wildcards. Create a second 'A' record named '*.myserver' along with the IP address you got from your server a few moments ago.
If you are using BIND, your zone file will look similar to this:
```
$ORIGIN example.tld
$TTL 5m
myserver IN A 127.0.0.1
*.myserver IN A 127.0.0.1
```
You can verify your changes in Linux by trying one or more of the following commands:
* host myserver.example.tld
* dig -t A myserver.example.tld
* nslookup myserver.example.tld
Now is a good time to remind you that the answers you get MAY BE CACHED.
If everything is working correctly, you should also be able to query for any other name 'under' myserver.example.tld and get back the IP address of your server. Try:
* host test.myserver.example.tld
* host xyzzy.myserver.example.tld
If they all return your IP address, you have set DNS up properly for dokku. You should also be able to 'ssh root@myserver.example.tld' and access your server.
Proceed with the setup instructions in the [README](https://github.com/progrium/dokku/blob/master/README.md)
### Using the root of your domain (myapp.example.tld)
This section is a work in progress. It is incomplete.
Using the 'root' of your domain is nearly identical to the previous example.
* hostname is under example.tld, still needs A record
* Need to modify /home/dokku/HOSTNAME and /home/dokku/VHOST

68
docs/docker-options.md Normal file
View File

@@ -0,0 +1,68 @@
docker-options
========================
Usage
-----
```bash
$ dokku help
...
docker-options <app> Display apps docker options for all phases
docker-options <app> <phase(s)> Display apps docker options for phase (comma-separated phase list)
docker-options:add <app> <phase(s)> OPTION Add docker option to app for phase (comma-separated phase list)
docker-options:remove <app> <phase(s)> OPTION Remove docker option from app for phase (comma-separated phase list)
...
````
Add some options (first, for the deployed/running app and second when executing `dokku run`)
```bash
$ dokku docker-options:add myapp deploy "-v /host/path:/container/path"
$ dokku docker-options:add myapp run "-v /another/container/path"
```
Check what we added
```bash
$ dokku docker-options myapp
Deploy options:
-v /host/path:/container/path
Run options:
-v /another/container/path
```
Remove an option
```bash
$ dokku docker-options:remove myapp run "--link container_name:alias"
```
Note about `dokku` phases and `docker-options`
------------
`dokku` deploys your application in multiple "phases" and the `docker-options` plugin allows you to pass arguments to the underlying docker container in the following 3 phases/containers
- `build`: the container that executes the appropriate buildpack
- `deploy`: the container that executes your running/deployed application
- `run`: the container that executes any arbitrary command via `dokku run myapp`
Advanced Usage (avoid if possible)
------------
In your applications folder (`/home/dokku/app_name`) create a file called `DOCKER_OPTIONS_RUN` (or `DOCKER_OPTIONS_BUILD` or `DOCKER_OPTIONS_DEPLOY`).
Inside this file list one docker option per line. For example:
```bash
--link container_name:alias
-v /host/path:/container/path
-v /another/container/path
```
The above example will result in the following options being passed to docker during `dokku run`:
```bash
--link container_name:alias -v /host/path:/container/path -v /another/container/path
```
You may also include comments (lines beginning with a #) and blank lines in the DOCKER_OPTIONS file.
Move information on docker options can be found here: http://docs.docker.io/en/latest/reference/run/ .

73
docs/dokku-events-logs.md Normal file
View File

@@ -0,0 +1,73 @@
# Dokku Event Logs
Docker provides an _events_ command to show system's real time events. Likewise, Dokku can record events as syslog entries and also provides a plugin to display the last ones.
```
events [-t] Show the last events (-t follows)
events:list List logged events
events:on Enable events logger
events:off Disable events logger
```
## Usage
Enable the plugin:
```
$ dokku events:on
Enabling dokku events logger
```
Dokku will then write log entries to ``/var/log/syslog`` as well as a Dokku-specific logs sub-directory ``/var/log/dokku/events.log``, which can be easily displayed with the command `dokku events`:
```
Jul 3 16:09:48 dokku.me dokku[127630]: INVOKED: pre-release-buildstep( pythonapp )
Jul 3 16:10:02 dokku.me dokku[128095]: INVOKED: docker-args-run( rubyapp )
Jul 3 16:10:02 dokku.me dokku[128114]: INVOKED: docker-args-run( nhl )
Jul 3 16:10:03 dokku.me dokku[128136]: INVOKED: post-release-buildstep( pythonapp )
Jul 3 16:10:03 dokku.me dokku[128195]: INVOKED: pre-deploy( pythonapp )
Jul 3 16:10:23 dokku.me dokku[129253]: INVOKED: docker-args-deploy( pythonapp )
Jul 3 16:10:24 dokku.me dokku[129337]: INVOKED: bind-external-ip( pythonapp )
Jul 3 16:10:24 dokku.me dokku[129451]: INVOKED: check-deploy( pythonapp 6274ced0d4be11af4490cd18abaf77cdd593f025133f403d984e80d86a39acec web 5000 10.0.16.80 )
Jul 3 16:10:35 dokku.me dokku[129561]: INVOKED: docker-args-deploy( pythonapp )
Jul 3 16:10:35 dokku.me dokku[129649]: INVOKED: bind-external-ip( pythonapp )
Jul 3 16:10:36 dokku.me dokku[129760]: INVOKED: check-deploy( pythonapp ac88a56ee4161ff37e4b92d1498c3eadc91f0aa7c8b81b44fc077e2a51d54cc0 worker )
Jul 3 16:10:46 dokku.me dokku[129851]: INVOKED: post-deploy( pythonapp )
Jul 3 16:10:46 dokku.me dokku[129945]: INVOKED: nginx-pre-reload( pythonapp )
Jul 3 16:15:02 dokku.me dokku[130397]: INVOKED: docker-args-run( goapp )
Jul 3 16:21:02 dokku.me dokku[130796]: INVOKED: docker-args-run( rubyapp )
Jul 3 16:30:02 dokku.me dokku[131384]: INVOKED: docker-args-run( rubyapp )
```
You can list all events that are currently being recorded via `dokku events:list`:
```
=====> Events currently logged
backup-check
docker-args-build
pre-delete
post-deploy
receive-app
pre-release-buildstep
nginx-pre-reload
docker-args-deploy
post-build-buildstep
post-domains-update
post-release-dockerfile
check-deploy
backup-import
backup-export
git-pre-pull
git-post-pull
nginx-hostname
bind-external-ip
pre-deploy
post-delete
dependencies
pre-build-buildstep
docker-args-run
pre-build-dockerfile
post-release-buildstep
post-build-dockerfile
pre-release-dockerfile
update
```

View File

@@ -0,0 +1,36 @@
# Debian Package Installation Notes
As of 0.3.18, dokku defaults to being installed via debian package. While certain hosts may require extra work to get running, you may optionally wish to automate the installation of dokku without the use of our `bootstrap.sh` bash script. The following are the steps run by said script:
```shell
curl -sL https://get.docker.io/gpg 2> /dev/null | sudo apt-key add - 2>&1 >/dev/null
curl -sL https://packagecloud.io/gpg.key 2> /dev/null | sudo apt-key add - 2>&1 >/dev/null
echo "deb https://get.docker.io/ubuntu docker main" | sudo tee /etc/apt/sources.list.d/docker.list >/dev/null
echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ trusty main" | sudo tee /etc/apt/sources.list.d/dokku.list >/dev/null
sudo apt-get update -qq
sudo apt-get install -qq -y linux-image-extra-`uname -r` apt-transport-https
sudo apt-get install -qq -y dokku
```
## Unattended installation
In case you want to perform an unattended installation of dokku, this is made possible through [debconf](https://en.wikipedia.org/wiki/Debconf_%28software_package%29), which allows you to configure a package before installing it.
You can set any of the below options through the `debconf-set-selections` command, for example to enable vhost-based deployments:
```bash
sudo echo "dokku dokku/vhost_enable boolean true" | debconf-set-selections
```
After setting the desired options, proceed with the installation as described above.
### debconf options
| Name | Type | Default | Description |
| ------------------ | ------- | --------------------- | ------------------------------------------------------------------------ |
| dokku/web_config | boolean | true | Use web-based config for below options |
| dokku/vhost_enable | boolean | false | Use vhost-based deployments (e.g. <app>.dokku.me) |
| dokku/hostname | string | dokku.me | Hostname, used as vhost domain and for showing app URL after deploy |
| dokku/key_file | string | /root/.ssh/id_rsa.pub | SSH key to add to the Dokku user (Will be ignored on `dpkg-reconfigure`) |

View File

@@ -0,0 +1,7 @@
# Digital Ocean
On Digital Ocean, there is a pre-made image that can be run for Dokku. You can choose to run this image on any sized droplet, though larger droplets will allow you to run larger applications.
When choosing your Droplet configuration, please disable IPv6 on the droplet. There are known issues with IPv6 on Digital Ocean and Docker, and many have been reported to the Dokku issue tracker.
If you would like to run Dokku on an IPv6 Digital Ocean Droplet, please consult [this guide](https://jeffloughridge.wordpress.com/2015/01/17/native-ipv6-functionality-in-docker/) for modifying Docker to run under the Digital Ocean IPv6 configuration.

View File

@@ -0,0 +1,36 @@
# Installing on Linode
Due to how Linode installs custom kernels, Linode instances *require* a reboot before they can fully work with Docker/Dokku. The Official Dokku StackScript should take care of this process for you, and will email notify you when the instance is running and you can proceed with installation.
## Using StackScript
Deploy using the following (experimental) Official StackScript:
- https://www.linode.com/stackscripts/view/11348
## Without StackScript
* Build a Ubuntu 13.04 instance
* Follow these instructions: https://www.linode.com/docs/tools-reference/custom-kernels-distros/run-a-distributionsupplied-kernel-with-pvgrub#ubuntu-1304-raring
* If `apt-get update` no longer works:
* Verify if apt-get is trying to use ipv6 instead of ipv4 (e.g. you read something like "[Connecting to us.archive.ubuntu.com (2001:67c:1562::14)]" and apt-get would not proceed). In that case, follow these instructions: http://unix.stackexchange.com/questions/9940/convince-apt-get-not-to-use-ipv6-method (append "precedence ::ffff:0:0/96 100" to /etc/gai.conf)
* OR: change `/etc/apt/sources.list` to one mentioned in http://mirrors.ubuntu.com/mirrors.txt
* Run the following commands:
```shell
apt-get update
apt-get install lxc wget bsdtar linux-image-extra-$(uname -r)
modprobe aufs
```
* After this, you can install dokku the default way:
```shell
wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash
```

View File

@@ -0,0 +1,40 @@
# Install Dokku using Vagrant
- Download and install [VirtualBox](https://www.virtualbox.org/wiki/Downloads)
- Download and install [Vagrant](http://www.vagrantup.com/downloads.html)
- Clone Dokku
```
git clone https://github.com/progrium/dokku.git
```
- Setup SSH hosts in your `/etc/hosts`
```
10.0.0.2 dokku.me
```
- Create VM
```
# Optional ENV arguments:
# - `BOX_NAME`
# - `BOX_URI`
# - `BOX_MEMORY`
# - `DOKKU_DOMAIN`
# - `DOKKU_IP`
# - `FORWARDED_PORT`.
cd path/to/dokku
vagrant up
```
- Setup SSH Config in `~/.ssh/config`. The port listed here is usually correct, though you may want to verify that it is the same as the one listed in the output of `vagrant ssh-config dokku`
```
Host dokku.me
Port 22
```
- Copy your SSH key via `cat ~/.ssh/id_rsa.pub | pbcopy` and paste it into the dokku-installer at http://dokku.me . Change the `Hostname` field on the Dokku Setup screen to your domain and then check the box that says `Use virtualhost naming`. Then click *Finish Setup* to install your key. You'll be directed to application deployment instructions from here.
You are now ready to deploy an app or install plugins.
For a different, complete, example see https://github.com/RyanBalfanz/dokku-vagrant-example.

View File

@@ -0,0 +1,25 @@
# Where to Get Help
If you’re stuck, there are a number of places you can get help:
## The Official Dokku Website
[http://progrium.viewdocs.io/dokku](http://progrium.viewdocs.io/dokku)
The Official Dokku website is always a great place to visit. It features links to oft-used developer tools, community plugins, and guides on using dokku.
## The IRC Channel
IRC Channel on irc.freenode.net:
- #dokku – General Discussion
If you’re stumped, give us a holler in the Dokku IRC channel. Someone from the development team is usually there, especially during the daylight hours for North and South America users. We’d love to hear from you, whether you need some help, want to find users in your area, or would like to donate your brand new sports car.
If [here](http://webchat.freenode.net/?channels=dokku) for a web-based client IRC client.
## Stackoverflow
http://stackoverflow.com/
Tag your questions with `dokku` to enable existing users of stackoverflow to find your questions.

128
docs/home.html Normal file
View File

@@ -0,0 +1,128 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<style type="text/css">
body{padding-bottom:40px;color:#5a5a5a}
h1{color:#5a5a5a;font-family:'montserrat',Optima,Segoe,"Segoe UI",Candara,Calibri,Arial,sans-serif;font-weight:700;line-height:1.1;margin-bottom:12px;margin-top:12px;text-rendering:optimizelegibility}
.header{background-color:#2a8fbd;padding:22px 0}
.header .heading{color:#fff;font-size:23px;margin:0;padding:0}
.blurb{color:#424242;background-color:#ededed;background-image:url(./assets/gplaypattern.png);padding:45px 0;text-align:center}
.blurb p{font-size:17px;font-weight:300;margin:18px 0;text-align:center}
.quickstart-code{display:block;font-size:12px;line-height:1.3em;margin:45px auto;max-width:650px;padding:0}
.quickstart-code .title{background-color:#dfdfdf;background-image:linear-gradient(top,#f7f7f7 0%,#dfdfdf 7%,#ccc 100%);border-bottom:1px solid #111;color:#444;display:block;font-weight:400;font-size:14px;margin:0 20px;padding:3px 0;text-align:center;text-shadow:0 1px 0 rgba(255,255,255,0.5);border-radius:5px 5px 0 0;box-shadow:0 3px 0 rgba(0,0,0,0.5)}
.quickstart-code .shell{background-color:#171717;font-family:Menlo,Consolas,"Courier New",Courier,"Liberation Mono",monospace;margin:0 20px;padding:20px;text-shadow:none;border-radius:0 0 5px 5px;box-shadow:0 5px 30px rgba(0,0,0,0.3)}
.quickstart-code .line{display:block;margin:0;padding:0}
.quickstart-code .line span{display:inline-block}
.quickstart-code .path{color:#2a8fbd;user-select:none}
.quickstart-code .prompt{color:#f90;user-select:none}
.quickstart-code .command{color:#ffc}
.marketing .col-lg-4{margin-bottom:20px;text-align:center}
.marketing .col-lg-4 p{margin-right:10px;margin-left:10px}
.featurette-divider{margin:20px 0}
.featurette-heading{font-weight:400;line-height:1;letter-spacing:-1px}
.featurette-heading .text-muted{font-weight:300}
@media (min-width: 768px) {
.quickstart-code{font-size:14px;line-height:22px}
.featurette-heading{font-size:50px}
}
@media (min-width: 992px) {
.featurette-heading{margin-top:120px}
}
</style>
</head>
<body>
<div class="header">
<div class="container">
<h1 class="heading">Dokku</h1>
</div>
</div>
<div class="blurb">
<div class="container">
<h2>The smallest PaaS implementation you've ever seen</h2>
<p>Docker powered mini-Heroku in around 200 lines of Bash</p>
<div class="blurb-buttons">
<a class="btn btn-lg btn-warning" href="http://progrium.viewdocs.io/dokku/installation">View Documentation</a>
</div>
</div>
</div>
<div class="container marketing">
<div class="quickstart-code">
<p class="title">Quick-start Instructions</p>
<div class="shell">
<p class="line">
<span class="path">~</span>
<span class="prompt">$</span>
<span class="command">wget https://raw.github.com/progrium/dokku/v0.3.26/bootstrap.sh</span>
</p>
<p class="line">
<span class="path">~</span>
<span class="prompt">$</span>
<span class="command">sudo DOKKU_TAG=v0.3.26 bash bootstrap.sh</span>
</p>
<p class="line">
<span class="output"># =&gt; Go to your server's IP and follow the web installer</span>
</p>
</div>
</div>
<hr class="featurette-divider">
<!-- START THE FEATURETTES -->
<div class="row featurette">
<div class="col-md-7">
<h2 class="featurette-heading">Own Your PaaS. <span class="text-muted">Infrastructure at a fraction of the cost.</span></h2>
<p class="lead">Powered by Docker, you can install Dokku on any hardware. Use it on inexpensive cloud providers. Use the extra cash to buy a pony or feed kittens. You'll save tens of dollars a year on your dog photo sharing website.</p>
</div>
<div class="col-md-5">
<img class="featurette-image img-responsive center-block" alt="Docker Logo" src="./assets/docker.png">
</div>
</div>
<hr class="featurette-divider">
<div class="row featurette">
<div class="col-md-7 col-md-push-5">
<h2 class="featurette-heading">Easy Git Deploys. <span class="text-muted">From your command-line to the cloud.</span></h2>
<p class="lead">Once it's set up on a host, you can push Heroku-compatible applications to it via Git. They'll build using Heroku buildpacks and then run in isolated containers. The end result is your own, single-host version of Heroku.</p>
</div>
<div class="col-md-5 col-md-pull-7">
<img class="featurette-image img-responsive center-block" alt="Git Logo" src="./assets/git.png">
</div>
</div>
<hr class="featurette-divider">
<div class="row featurette">
<div class="col-md-7">
<h2 class="featurette-heading">Extensible Platform. <span class="text-muted">Customize your PaaS.</span></h2>
<p class="lead">Write dokku plugins in any language. Share them online with others, and extend those already available. Dokku's simple core is easy to hack and add the features you need to get your job done.</p>
</div>
<div class="col-md-5">
<img class="featurette-image img-responsive center-block" alt="Extend Logo" src="./assets/extend.png">
</div>
</div>
<hr class="featurette-divider">
</div>
<div class="container">
<footer>
<p class="pull-right"><a href="#">Back to top</a></p>
<p>&copy; 2013 Dokku</p>
</footer>
</div>
</body>
</html>

View File

@@ -1,3 +1,70 @@
# Dokku Documentation
<div class="blurb">
<div class="container">
<h2>The smallest PaaS implementation you've ever seen</h2>
<p>Docker powered mini-Heroku in around 200 lines of Bash</p>
<div class="blurb-buttons">
<a class="btn btn-lg btn-warning" href="http://progrium.viewdocs.io/dokku/installation">View Documentation</a>
</div>
</div>
</div>
Docs go here.
<div class="container marketing">
<div class="quickstart-code">
<p class="title">Quick-start Instructions</p>
<div class="shell">
<p class="line">
<span class="path">~</span>
<span class="prompt">$</span>
<span class="command">wget https://raw.github.com/progrium/dokku/v0.3.26/bootstrap.sh</span>
</p>
<p class="line">
<span class="path">~</span>
<span class="prompt">$</span>
<span class="command">sudo DOKKU_TAG=v0.3.26 bash bootstrap.sh</span>
</p>
<p class="line">
<span class="output"># =&gt; Go to your server's IP and follow the web installer</span>
</p>
</div>
</div>
<hr class="featurette-divider">
<!-- START THE FEATURETTES -->
<div class="row featurette">
<div class="col-md-7">
<h2 class="featurette-heading">Own Your PaaS. <span class="text-muted">Infrastructure at a fraction of the cost.</span></h2>
<p class="lead">Powered by Docker, you can install Dokku on any hardware. Use it on inexpensive cloud providers. Use the extra cash to buy a pony or feed kittens. You'll save tens of dollars a year on your dog photo sharing website.</p>
</div>
<div class="col-md-5">
<img class="featurette-image img-responsive center-block" alt="Docker Logo" src="assets/docker.png">
</div>
</div>
<hr class="featurette-divider">
<div class="row featurette">
<div class="col-md-7 col-md-push-5">
<h2 class="featurette-heading">Easy Git Deploys. <span class="text-muted">From your command-line to the cloud.</span></h2>
<p class="lead">Once it's set up on a host, you can push Heroku-compatible applications to it via Git. They'll build using Heroku buildpacks and then run in isolated containers. The end result is your own, single-host version of Heroku.</p>
</div>
<div class="col-md-5 col-md-pull-7">
<img class="featurette-image img-responsive center-block" alt="Git Logo" src="assets/git.png">
</div>
</div>
<hr class="featurette-divider">
<div class="row featurette">
<div class="col-md-7">
<h2 class="featurette-heading">Extensible Platform. <span class="text-muted">Customize your PaaS.</span></h2>
<p class="lead">Write dokku plugins in any language. Share them online with others, and extend those already available. Dokku's simple core is easy to hack and add the features you need to get your job done.</p>
</div>
<div class="col-md-5">
<img class="featurette-image img-responsive center-block" alt="Extend Logo" src="assets/extend.png">
</div>
</div>
<hr class="featurette-divider">
</div>

33
docs/installation.md Normal file
View File

@@ -0,0 +1,33 @@
# Installation
## Requirements
- A fresh VM running Ubuntu `14.04 x64`
- At least `1GB` of system memory ([workaround for 512MB machines](http://progrium.viewdocs.io/dokku/advanced-installation))
- The VM should have a FQDN set before installation (check by running `sudo hostname -f`).
Ubuntu 14.04 x64. Ideally have a domain ready to point to your host. It's designed for and is probably best to use a fresh VM. The bootstrapper will install everything it needs.
## Installing the latest Stable version
To install the latest stable version of dokku, you can run the following bootstrapper command:
```shell
# installs dokku via apt-get
wget https://raw.github.com/progrium/dokku/v0.3.26/bootstrap.sh
sudo DOKKU_TAG=v0.3.26 bash bootstrap.sh
# By default, this will do cli-based setup, though you may *also*
# go to your server's IP and follow the web installer
```
For various reasons, certain hosting providers may have other steps that should be preferred to the above. If hosted on any of the following popular hosts, please follow the linked to instructions:
- [Digital Ocean Installation Notes](http://progrium.viewdocs.io/dokku/getting-started/install/digitalocean)
- [Linode Installation Notes](http://progrium.viewdocs.io/dokku/getting-started/install/linode)
As well, you may wish to customize your installation in some other fashion. or experiment with vagrant. The guides below should get you started:
- [Debian Package Installation Notes](http://progrium.viewdocs.io/dokku/getting-started/install/debian)
- [Vagrant Installation Notes](http://progrium.viewdocs.io/dokku/getting-started/install/vagrant)
- [Advanced Install Customization](http://progrium.viewdocs.io/dokku/advanced-installation)

210
docs/nginx.md Normal file
View File

@@ -0,0 +1,210 @@
# Nginx
Dokku uses nginx as it's server for routing requests to specific applications. By default, access and error logs are written for each app to `/var/log/nginx/${APP}-access.log` and `/var/log/nginx/${APP}-error.log` respectively
## TLS/SPDY support
Dokku provides easy TLS/SPDY support out of the box. This can be done app-by-app or for all subdomains at once. Note that whenever TLS support is enabled SPDY is also enabled.
### Per App
To enable TLS connections to to one of your applications, do the following:
* Create a key file and a cert file.
* You can find detailed steps for generating a self-signed certificate at https://devcenter.heroku.com/articles/ssl-certificate-self
* If you are not paranoid and need it just for a DEV or STAGING app, you can use http://www.selfsignedcertificate.com/ to generate your 2 files more easily.
* Rename your files to server.key and server.crt
* tar these 2 files together, *without* subdirectories. Example: tar cvf cert-key.tar server.crt server.key
* Install the pair for your app, like this: ssh dokku@ip-of-your-dokku-server nginx:import-ssl < cert-key.tar
You will need to repeat the steps above for each domain used to serve your app. You can't simply create a single tar with all key/cert files in it (see https://github.com/progrium/dokku/issues/1195).
### All Subdomains
To enable TLS connections for all your applications at once you will need a wildcard TLS certificate.
To enable TLS across all apps, copy or symlink the `.crt` and `.key` files into the `/home/dokku/tls` folder (create this folder if it doesn't exist) as `server.crt` and `server.key` respectively. Then, enable the certificates by editing `/etc/nginx/conf.d/dokku.conf` and uncommenting these two lines (remove the #):
```
ssl_certificate /home/dokku/tls/server.crt;
ssl_certificate_key /home/dokku/tls/server.key;
```
The nginx configuration will need to be reloaded in order for the updated TLS configuration to be applied. This can be done either via the init system or by re-deploying the application. Once TLS is enabled, the application will be accessible by `https://` (redirection from `http://` is applied as well).
**Note**: TLS will not be enabled unless the application's VHOST matches the certificate's name. (i.e. if you have a cert for *.example.com TLS won't be enabled for something.example.org or example.net)
### HSTS Header
The [HSTS header](https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security) is an HTTP header that can inform browsers that all requests to a given site should be made via HTTPS. dokku does not, by default, enable this header. It is thus left up to you, the user, to enable it for your site.
Beware that if you enable the header and a subsequent deploy of your application results in an HTTP deploy (for whatever reason), the way the header works means that a browser will not attempt to request the HTTP version of your site if the HTTPS version fails.
### Importing ssl certificates
You can import ssl certificates via tarball using the following command:
``` bash
dokku nginx:import-ssl myapp < archive-of-certs.tar
```
This archive should is expanded via `tar xvf`. It should contain `server.crt` and `server.key`.
## Customizing the nginx configuration
> New as of 0.3.17.
Dokku currently templates out an nginx configuration that is included in the `nginx-vhosts` plugin. If you'd like to provide a custom template for your application, you should copy the existing template - ssl or non-ssl - into your application repository's root directory as the file `nginx.conf.template`. The next time you deploy, Nginx will use your template instead of the default.
> New as of 0.3.10.
You may also place this file on disk at the path `/home/dokku/myapp/nginx.conf.template`. If placed on disk on the dokku server, the template file **must** be owned by the user `dokku:dokku`.
For instance - assuming defaults - to customize the nginx template in use for the `myapp` application, create the file `nginx.conf.template` in your repo or on disk with the with the following contents:
```
server {
listen [::]:80;
listen 80;
server_name $NOSSL_SERVER_NAME;
access_log /var/log/nginx/${APP}-access.log;
error_log /var/log/nginx/${APP}-error.log;
# set a custom header for requests
add_header X-Served-By www-ec2-01;
location / {
proxy_pass http://$APP;
proxy_http_version 1.1;
proxy_set_header Upgrade \$http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host \$http_host;
proxy_set_header X-Forwarded-Proto \$scheme;
proxy_set_header X-Forwarded-For \$remote_addr;
proxy_set_header X-Forwarded-Port \$server_port;
proxy_set_header X-Request-Start \$msec;
}
include $DOKKU_ROOT/$APP/nginx.conf.d/*.conf;
}
```
The above is a sample http configuration that adds an `X-Served-By` header to requests.
A few tips for custom nginx templates:
- Special characters - dollar signs, spaces inside of quotes, etc. - should be escaped with a single backslash or can cause deploy failures.
- Templated files will be validated via `nginx -t`.
- Application environment variables can be used within your nginx configuration.
After your changes a `dokku deploy myapp` will regenerate the `/home/dokku/myapp/nginx.conf` file which is then used.
### Customizing via configuration files included by the default templates
The default nginx.conf- templates will include everything from your apps `nginx.conf.d/` subdirectory in the main `server {}` block (see above):
include $DOKKU_ROOT/$APP/nginx.conf.d/*.conf;
. That means you can put additional configuration in separate files, for example to limit the uploaded body size to 50 megabytes, do
mkdir /home/dokku/myapp/nginx.conf.d/
echo 'client_max_body_size 50M;' > /home/dokku/myapp/nginx.conf.d/upload.conf
chown dokku:dokku /home/dokku/myapp/nginx.conf.d/upload.conf
service nginx reload
## Customizing hostnames
Applications typically have the following structure for their hostname:
```
scheme://subdomain.domain.tld
```
The `subdomain` is inferred from the pushed application name, while the `domain` is set during initial configuration in the `$DOKKU_ROOT/VHOST` file.
You can optionally override this in a plugin by implementing the `nginx-hostname` pluginhook. For example, you can reverse the subdomain with the following sample `nginx-hostname` pluginhook:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1"; SUBDOMAIN="$2"; VHOST="$3"
NEW_SUBDOMAIN=`echo $SUBDOMAIN | rev`
echo "$NEW_SUBDOMAIN.$VHOST"
```
If the `nginx-hostname` has no output, the normal hostname algorithm will be executed.
You can also use the built-in `domains` plugin to handle:
### Disabling VHOSTS
If desired, it is possible to disable vhosts by setting the `NO_VHOST` environment variable:
```shell
dokku config:set myapp NO_VHOST=1
```
On subsequent deploys, the nginx virtualhost will be discarded. This is useful when deploying internal-facing services that should not be publicly routeable.
### Domains plugin
> New as of 0.3.10
The domains plugin allows you to specify custom domains for applications. This plugin is aware of any ssl certificates that are imported via `nginx:import-ssl`. Be aware that setting `NO_VHOST` will override any custom domains.
Custom domains are also backed up via the built-in `backup` plugin
```shell
# where `myapp` is the name of your app
# add a domain to an app
dokku domains:add myapp example.com
# list custom domains for app
dokku domains myapp
# clear all custom domains for app
dokku domains:clear myapp
# remove a custom domain from app
dokku domains:remove myapp example.com
```
### Container network interface binding
> New as of 0.3.13
The deployed docker container running your app's web process will bind to either the internal docker network interface (i.e. `docker inspect --format '{{ .NetworkSettings.IPAddress }}' $CONTAINER_ID`) or an external interface (i.e. 0.0.0.0) depending on dokku's VHOST configuration. Dokku will attempt to bind to the internal docker network interface unless you specifically set NO_VHOST for the given app or your dokku installation is not setup to use VHOSTS (i.e. $DOKKU_ROOT/VHOST is missing or $DOKKU_ROOT/HOSTNAME is set to an IPv4 or IPv6 address)
```shell
# container bound to docker interface
root@dokku:~/dokku# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1b88d8aec3d1 dokku/node-js-app:latest "/bin/bash -c '/star About a minute ago Up About a minute goofy_albattani
root@dokku:~/dokku# docker inspect --format '{{ .NetworkSettings.IPAddress }}' goofy_albattani
172.17.0.6
# container bound to all interfaces (previous default)
root@dokku:/home/dokku# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d6499edb0edb dokku/node-js-app:latest "/bin/bash -c '/star About a minute ago Up About a minute 0.0.0.0:49153->5000/tcp nostalgic_tesla
```
# Default site
By default, dokku will route any received request with an unknown HOST header value to the lexicographically first site in the nginx config stack. If this is not the desired behavior, you may want to add the following configuration to nginx. This will catch all unknown HOST header values and return a `410 Gone` response. You can replace the `return 410;` with `return 444;` which will cause nginx to not respond to requests that do not match known domains (connection refused).
```
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 410;
log_not_found off;
}
```

229
docs/plugins.md Normal file
View File

@@ -0,0 +1,229 @@
# Plugins
Dokku itself is built out of plugins and uses [pluginhook](https://github.com/progrium/pluginhook) for its plugin system. In essence a plugin is a collection of scripts that will be run based on naming convention.
Let's take a quick look at the current dokku nginx plugin that's shipped with dokku by default.
nginx-vhosts/
├── commands # contains additional commands
├── install # runs on dokku installation
└── post-deploy # runs after an app is deployed
## Installing a plugin
```shell
cd /var/lib/dokku/plugins
git clone <git url>
dokku plugins-install
```
## Creating your own plugin
[See the full documentation](http://progrium.viewdocs.io/dokku/development/plugin-creation).
## Community plugins
Note: The following plugins have been supplied by our community and may not have been tested by dokku maintainers.
[agco-adm]: https://github.com/agco-adm
[ademuk]: https://github.com/ademuk
[alessio]: https://github.com/alessio
[alex-sherwin]: https://github.com/alex-sherwin
[alexanderbeletsky]: https://github.com/alexanderbeletsky
[Aomitayo]: https://github.com/Aomitayo
[apmorton]: https://github.com/apmorton
[blag]: https://github.com/blag
[cameron-martin]: https://github.com/cameron-martin
[cedricziel]: https://github.com/cedricziel
[cef]: https://github.com/cef
[cjblomqvist]: https://github.com/cjblomqvist
[darkpixel]: https://github.com/darkpixel
[dyson]: https://github.com/dyson
[F4-Group]: https://github.com/F4-Group
[fermuch]: https://github.com/fermuch
[fgrehm]: https://github.com/fgrehm
[gdi2290]: https://github.com/gdi2290
[heichblatt]: https://github.com/heichblatt
[hughfletcher]: https://github.com/hughfletcher
[iskandar]: https://github.com/iskandar
[jeffutter]: https://github.com/jeffutter
[jlachowski]: https://github.com/jlachowski
[krisrang]: https://github.com/krisrang
[Kloadut]: https://github.com/Kloadut
[luxifer]: https://github.com/luxifer
[mlebkowski]: https://github.com/mlebkowski
[matto1990]: https://github.com/matto1990
[michaelshobbs]: https://github.com/michaelshobbs
[mikecsh]: https://github.com/mikecsh
[mikexstudios]: https://github.com/mikexstudios
[motin]: https://github.com/motin
[musicglue]: https://github.com/musicglue
[neam]: https://github.com/neam
[nickstenning]: https://github.com/nickstenning
[nornagon]: https://github.com/nornagon
[ohardy]: https://github.com/ohardy
[pauldub]: https://github.com/pauldub
[pnegahdar]: https://github.com/pnegahdar
[RaceHub]: https://github.com/racehub
[rlaneve]: https://github.com/rlaneve
[robv]: https://github.com/robv
[scottatron]: https://github.com/scottatron
[sehrope]: https://github.com/sehrope
[statianzo]: https://github.com/statianzo
[stuartpb]: https://github.com/stuartpb
[thrashr888]: https://github.com/thrashr888
[wmluke]: https://github.com/wmluke
[Zenedith]: https://github.com/Zenedith
[sekjun9878]: https://github.com/sekjun9878
[Flink]: https://github.com/Flink
[ribot]: https://github.com/ribot
[Benjamin-Dobell]: https://github.com/Benjamin-Dobell
[jagandecapri]: https://github.com/jagandecapri
[mixxorz]: https://github.com/mixxorz
[Maciej Łebkowski]: https://github.com/mlebkowski
[abossard]: https://github.com/dudagroup
[alexkruegger]: https://github.com/alexkruegger
### Datastores
#### Relational
| Plugin | Author | Compatibility |
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
| [MariaDB](https://github.com/Kloadut/dokku-md-plugin) | [Kloadut][] | Compatible with 0.2.0 |
| [MariaDB (single container)](https://github.com/ohardy/dokku-mariadb) | [ohardy][] | Compatible with 0.2.0 |
| [MySQL](https://github.com/hughfletcher/dokku-mysql-plugin) | [hughfletcher][] | |
| [PostgreSQL](https://github.com/Kloadut/dokku-pg-plugin) | [Kloadut][] | Compatible with 0.2.0 |
| [PostgreSQL](https://github.com/jlachowski/dokku-pg-plugin) | [jlachowski][] | IP & PORT available directly in linked app container env variables (requires link plugin)|
| [PostgreSQL (single container)](https://github.com/jeffutter/dokku-postgresql-plugin) | [jeffutter][] | This plugin creates a single postgresql container that all your apps can use. Thus only one instance of postgresql running (good for servers without a ton of memory). |
| [PostgreSQL (single container)](https://github.com/ohardy/dokku-psql) | [ohardy][] | Compatible with 0.2.0 |
| [PostgreSQL (single container)](https://github.com/Flink/dokku-psql-single-container) | [Flink][] | Single Postgresql container with official Postgresql docker image. Compatible with 0.3.16 |
| [PostGIS](https://github.com/fermuch/dokku-pg-plugin) | [fermuch][] | |
#### Caching
| Plugin | Author | Compatibility |
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
| [Memcached](https://github.com/jlachowski/dokku-memcached-plugin) | [jlachowski][] | IP & PORT available directly in linked app container env variables (requires link plugin)|
| [Redis](https://github.com/luxifer/dokku-redis-plugin) | [luxifer][] | |
| [Redis](https://github.com/sekjun9878/dokku-redis-plugin) | [sekjun9878][] | A better Redis plugin with automatic instance creation and Dokku Link support
| [Redis (single container)](https://github.com/ohardy/dokku-redis) | [ohardy][] | Compatible with 0.2.0 |
| [Varnish](https://github.com/Zenedith/dokku-varnish-plugin) | [Zenedith][] | Varnish cache between nginx and application with base configuration|
#### Queuing
| Plugin | Author | Compatibility |
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
| [RabbitMQ](https://github.com/jlachowski/dokku-rabbitmq-plugin) | [jlachowski][] | IP & PORT available directly in linked app container env variables (requires link plugin)|
| [RabbitMQ (single container)](https://github.com/jlachowski/dokku-rabbitmq-single-plugin) | [jlachowski][] | IP & PORT available directly in linked app container env variables (requires link plugin)|
#### Other
| Plugin | Author | Compatibility |
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
| [CouchDB](https://github.com/racehub/dokku-couchdb-plugin) | [RaceHub][] | Compatible with 0.2.0 |
| [Elasticsearch](https://github.com/robv/dokku-elasticsearch) | [robv][] | Not compatible with >= 0.3.0 (still uses /home/git) |
| [Elasticsearch](https://github.com/blag/dokku-elasticsearch-plugin)<sup>1</sup> | [blag][] | Compatible with 0.2.0 |
| [MongoDB (single container)](https://github.com/jeffutter/dokku-mongodb-plugin) | [jeffutter][] | |
| [Neo4j](https://github.com/Aomitayo/dokku-neo4j-plugin) | [Aomitayo][] | |
| [RethinkDB](https://github.com/stuartpb/dokku-rethinkdb-plugin) | [stuartpb][] | 2014-02-22: targeting dokku @ [latest][217d00a]; will fail with Dokku earlier than [28de3ec][]. |
| [RiakCS (single container)](https://github.com/jeffutter/dokku-riakcs-plugin) | [jeffutter][] | Incompatible with 0.2.0 (checked at [dccee02][]) |
[dccee02]: https://github.com/jeffutter/dokku-riakcs-plugin/commit/dccee02702e7001851917b7814e78a99148fb709
### Process Managers
| Plugin | Author | Compatibility |
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
| [Circus](https://github.com/apmorton/dokku-circus) | [apmorton][] | |
| [Forego](https://github.com/iskandar/dokku-forego) | [iskandar][] | Compatible with 0.2.x |
| [Logging Supervisord](https://github.com/sehrope/dokku-logging-supervisord) | [sehrope][] | Works with dokku @ [c77cbf1][] - no 0.2.0 compatibility |
| [Monit](https://github.com/cjblomqvist/dokku-monit) | [cjblomqvist][] | |
| [Shoreman ](https://github.com/statianzo/dokku-shoreman) | [statianzo][] | Compatible with 0.2.0 |
| [Supervisord](https://github.com/statianzo/dokku-supervisord) | [statianzo][] | Compatible with 0.2.0 |
[c77cbf1]: https://github.com/progrium/dokku/commit/c77cbf1d3ae07f0eafb85082ed7edcae9e836147
[28de3ec]: https://github.com/progrium/dokku/commit/28de3ecaa3231a223f83fd8d03f373308673bc40
### Dokku Features
| Plugin | Author | Compatibility |
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
| [app-url](https://github.com/mikecsh/dokku-app-url) | [mikecsh][] | Works with 0.2.0 |
| [Docker Direct](https://github.com/heichblatt/dokku-docker-direct) | [heichblatt][] | |
| [Dokku Name](https://github.com/alex-sherwin/dokku-name) | [alex-sherwin][] | dokku >= [c77cbf1][] |
| [Dokku Registry](https://github.com/agco-adm/dokku-registry)<sup>1</sup> | [agco-adm][] | |
| [git rev-parse HEAD in env](https://github.com/cjblomqvist/dokku-git-rev) | [cjblomqvist][] | Compatible with 0.3.0 |
| [Graduate (Environment Management)](https://github.com/glassechidna/dokku-graduate) | [Benjamin-Dobell][] | dokku >= v0.3.14 |
| [HTTP Auth](https://github.com/Flink/dokku-http-auth) | [Flink][] | |
| [HTTP Auth Secure Apps](https://github.com/matto1990/dokku-secure-apps) | [matto1990][] | Works with v0.2.3 |
| [Hostname](https://github.com/michaelshobbs/dokku-hostname) | [michaelshobbs][] | |
| [Link Containers](https://github.com/rlaneve/dokku-link) | [rlaneve][] | dokku >= [c77cbf1][] |
| [Maintenance mode](https://github.com/Flink/dokku-maintenance) | [Flink][] | |
| [Multi-Buildpack](https://github.com/pauldub/dokku-multi-buildpack) | [pauldub][] | |
| [Ports](https://github.com/heichblatt/dokku-ports) | [heichblatt][] | |
| [Pre-Deploy Tasks](https://github.com/michaelshobbs/dokku-app-predeploy-tasks) | [michaelshobbs][] | |
| [SSH Deployment Keys](https://github.com/cedricziel/dokku-deployment-keys)<sup>2</sup> | [cedricziel][] | 2014-01-17: compatible with upstream/master |
| [SSH Hostkeys](https://github.com/cedricziel/dokku-hostkeys-plugin)<sup>3</sup> | [cedricziel][] | 2014-01-17: compatible with upstream/master |
| [Volume (persistent storage)](https://github.com/ohardy/dokku-volume) | [ohardy][] | Compatible with 0.2.0 |
| [App Configfiles](https://github.com/alexkruegger/dokku-app-configfiles) | [alexkruegger][] | Compatible with 0.3.17+ |
[217d00a]: https://github.com/progrium/dokku/commit/217d00a1bc47a7e24d8847617bb08a1633025fc7
<sup>1</sup> On Heroku similar functionality is offered by the [heroku-labs pipeline feature](https://devcenter.heroku.com/articles/labs-pipelines), which allows you to promote builds across multiple environments (staging -> production)
<sup>2</sup> Adds the possibility to add SSH deployment keys to receive private hosted packages
<sup>3</sup> Adds the ability to add custom hosts to the containers known_hosts file to be able to ssh them easily (useful with deployment keys)
### Other Plugins
| Plugin | Author | Compatibility |
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
| [Airbrake deploy](https://github.com/Flink/dokku-airbrake-deploy) | [Flink][] | |
| [APT](https://github.com/F4-Group/dokku-apt) | [F4-Group][] | |
| [Chef cookbooks](https://github.com/fgrehm/chef-dokku) | [fgrehm][] | |
| [Bower install](https://github.com/alexanderbeletsky/dokku-bower-install) | [alexanderbeletsky][] | |
| [Bower/Grunt](https://github.com/thrashr888/dokku-bower-grunt-build-plugin) | [thrashr888][] | |
| [Bower/Gulp](https://github.com/gdi2290/dokku-bower-gulp-build-plugin) | [gdi2290][] | |
| [Bower/Gulp](https://github.com/jagandecapri/dokku-bower-gulp-build-plugin) | [jagandecapri][] | |
| [Docker auto volumes](https://github.com/Flink/dokku-docker-auto-volumes) | [Flink][] | 0.3.17+, auto-persist docker volumes |
| [HipChat Notifications](https://github.com/cef/dokku-hipchat) | [cef][] | |
| [Graphite/statsd](https://github.com/jlachowski/dokku-graphite-plugin) | [jlachowski][] | |
| [Logspout](https://github.com/michaelshobbs/dokku-logspout) | [michaelshobbs][] | |
| [Node](https://github.com/pnegahdar/dokku-node) | [pnegahdar][] | |
| [Node](https://github.com/ademuk/dokku-nodejs) | [ademuk][] | |
| [Rails logs](https://github.com/Flink/dokku-rails-logs) | [Flink][] | |
| [Reset mtime](https://github.com/mixxorz/dokku-docker-reset-mtime) | [mixxorz][] | 0.3.15+, Dockerfile support |
| [Slack Notifications](https://github.com/ribot/dokku-slack) | [ribot][] | |
| [User ACL](https://github.com/mlebkowski/dokku-acl) | [Maciej Łebkowski][] | |
| [Webhooks](https://github.com/nickstenning/dokku-webhooks) | [nickstenning][] | |
| [Wordpress](https://github.com/dudagroup/dokku-wordpress-template) | [abossard][] | Dokku dev, mariadb, volume, domains |
<sup>1</sup> Forked from [jezdez/dokku-elasticsearch-plugin](https://github.com/jezdez/dokku-elasticsearch-plugin): uses Elasticsearch 1.2 (instead of 0.90), doesn't depend on dokku-link, runs as elasticsearch user instead of root, and turns off multicast autodiscovery for use in a VPS environment.
### Deprecated Plugins
The following plugins have been removed as their functionality is now in Dokku Core.
| Plugin | Author | In Dokku Since |
| ------------------------------------------------------------------------------------------------- | --------------------- | ------------------------------- |
| [Custom Domains](https://github.com/neam/dokku-custom-domains) | [motin][] | v0.3.10 (domains plugin) |
| [Debug](https://github.com/heichblatt/dokku-debug) | [heichblatt][] | v0.3.9 (trace command) |
| [Docker Options](https://github.com/dyson/dokku-docker-options) | [dyson][] | v0.3.17 (docker-options plugin) |
| [Events Logger](https://github.com/alessio/dokku-events) | [alessio][] | v0.3.21 (events plugin) |
| [Host Port binding](https://github.com/stuartpb/dokku-bind-port) | [stuartpb][] | v0.3.17 (docker-options plugin) |
| [Multiple Domains](https://github.com/wmluke/dokku-domains-plugin)<sup>1</sup> | [wmluke][] | v0.3.10 (domains plugin) |
| [Nginx-Alt](https://github.com/mikexstudios/dokku-nginx-alt) | [mikexstudios][] | v0.3.10 (domains plugin) |
| [Persistent Storage](https://github.com/dyson/dokku-persistent-storage) | [dyson][] | v0.3.17 (docker-options plugin) |
| [PrimeCache](https://github.com/darkpixel/dokku-prime-cache) | [darkpixel][] | v0.3.0 (zero downtime deploys) |
| [Rebuild application](https://github.com/scottatron/dokku-rebuild) | [scottatron][] | v0.3.14 (ps plugin) |
| [Supply env vars to buildpacks](https://github.com/cameron-martin/dokku-build-env)<sup>2</sup> | [cameron-martin][] | v0.3.9 (build-env plugin) |
| [user-env-compile](https://github.com/musicglue/dokku-user-env-compile)<sup>2</sup> | [musicglue][] | v0.3.9 (build-env plugin) |
| [user-env-compile](https://github.com/motin/dokku-user-env-compile)<sup>2</sup> | [motin][] | v0.3.9 (build-env plugin) |
| [VHOSTS Custom Configuration](https://github.com/neam/dokku-nginx-vhosts-custom-configuration) | [motin][] | v0.3.10 (domains plugin) |
<sup>1</sup> Conflicts with [VHOSTS Custom Configuration](https://github.com/neam/dokku-nginx-vhosts-custom-configuration)
<sup>2</sup> Similar to the heroku-labs feature (see https://devcenter.heroku.com/articles/labs-user-env-compile)
[a043e98]: https://github.com/stuartpb/dokku-bind-port/commit/a043e9892f4815b6525c850131e09fd64db5c1fa

View File

@@ -0,0 +1,44 @@
# Process/Container management
Dokku supports rudimentary process (really container) management via the `ps` plugin.
```
ps <app> List processes running in app container(s)
ps:rebuildall Rebuild all apps
ps:rebuild <app> Rebuild an app
ps:restartall Restart all deployed app containers
ps:restart <app> Restart app container(s)
ps:scale <app> <proc>=<count> [<proc>=<count>] Set how many processes of a given process to run
ps:start <app> Start app container(s)
ps:stop <app> Stop app container(s)
```
*NOTE*: As of v0.3.14, `dokku deploy:all` in now deprecated by `ps:restartall` and will be removed in a future version.
## Scaling
Dokku allows you to run multiple process types at different container counts. For example, if you had an app that contained 1 web app listener and 1 background job processor, dokku can, spin up 1 container for each process type defined in the Procfile. By default we will only start the web process. However, if you wanted 2 job processors running simultaneously, you can modify this behavior in a few ways.
### DOKKU_SCALE file
You can optionally create a `DOKKU_SCALE` file in the root of your repository. Dokku expects this file to contain one line for every process defined in your Procfile. Example:
```
web=1
worker=2
```
### `ps:scale` command
Dokku can also manage scaling itself via the `ps:scale` command. This command can be used to scale multiple process types at the same time.
```
dokku ps:scale app_name web=1 worker=2
```
*NOTE*: Dokku will always use the DOKKU_SCALE file that ships with the repo to override any local settings.
## The web proctype
Like Heroku, we handle the `web` proctype differently from others. The `web` proctype is the only proctype that will invoke custom checks as defined by a CHECKS file. It is also the only proctype that will be launched in a container that is either proxied via nginx or bound to an external port.

31
docs/remote-commands.md Normal file
View File

@@ -0,0 +1,31 @@
# Remote commands
Dokku commands can be run over ssh. Anywhere you would run `dokku <command>`, just run `ssh -t dokku@dokku.me <command>`
The `-t` is used to request a pty. It is highly recommended to do so.
To avoid the need to type the `-t` option each time, simply create/modify a section in the `.ssh/config` on the client side, as follows:
```
Host dokku.me
RequestTTY yes
```
## Run a command in the app environment
It's possible to run commands in the environment of the deployed application:
```shell
dokku run node-js-app ls -alh
dokku run <app> <cmd>
```
## Behavioral modifiers
Dokku also supports certain command-line arguments that augment it's behavior. If using these over ssh, you must use the form `ssh -t dokku@dokku.me -- <command>`
in order to avoid ssh interpretting dokku arguments for itself.
```shell
--quiet suppress output headers
--trace enable DOKKU_TRACE for current execution only
--rm|--rm-container remove docker container after successful dokku run <app> <command>
--force force flag. currently used in apps:destroy
```

116
docs/template.html Normal file
View File

@@ -0,0 +1,116 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<style type="text/css">
body{padding-bottom:40px;color:#5a5a5a}
h1{color:#5a5a5a;font-family:'montserrat',Optima,Segoe,"Segoe UI",Candara,Calibri,Arial,sans-serif;font-weight:700;line-height:1.1;margin-bottom:12px;margin-top:12px;text-rendering:optimizelegibility}
.header{background-color:#2a8fbd;padding:22px 0}
.header .heading{color:#fff;font-size:23px;margin:0;padding:0}
.blurb{color:#424242;background-color:#ededed;background-image:url(gplaypattern.png);padding:45px 0;text-align:center}
.blurb p{font-size:17px;font-weight:300;margin:18px 0;text-align:center}
.quickstart-code{display:block;font-size:12px;line-height:1.3em;margin:45px auto;max-width:650px;padding:0}
.quickstart-code .title{background-color:#dfdfdf;background-image:linear-gradient(top,#f7f7f7 0%,#dfdfdf 7%,#ccc 100%);border-bottom:1px solid #111;color:#444;display:block;font-weight:400;font-size:14px;margin:0 20px;padding:3px 0;text-align:center;text-shadow:0 1px 0 rgba(255,255,255,0.5);border-radius:5px 5px 0 0;box-shadow:0 3px 0 rgba(0,0,0,0.5)}
.quickstart-code .shell{background-color:#171717;font-family:Menlo,Consolas,"Courier New",Courier,"Liberation Mono",monospace;margin:0 20px;padding:20px;text-shadow:none;border-radius:0 0 5px 5px;box-shadow:0 5px 30px rgba(0,0,0,0.3)}
.quickstart-code .line{display:block;margin:0;padding:0}
.quickstart-code .line span{display:inline-block}
.quickstart-code .path{color:#2a8fbd;user-select:none}
.quickstart-code .prompt{color:#f90;user-select:none}
.quickstart-code .command{color:#ffc}
.marketing .col-lg-4{margin-bottom:20px;text-align:center}
.marketing .col-lg-4 p{margin-right:10px;margin-left:10px}
.featurette-divider{margin:20px 0}
.featurette-heading{font-weight:400;line-height:1;letter-spacing:-1px}
.featurette-heading .text-muted{font-weight:300}
@media (min-width: 768px) {
.quickstart-code{font-size:14px;line-height:22px}
.featurette-heading{font-size:50px}
}
@media (min-width: 992px) {
.featurette-heading{margin-top:120px}
}
</style>
</head>
<body>
<div class="header">
<div class="container">
<h1 class="heading">Dokku</h1>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-xs-4 col-md-2" style="padding-top:16px">
<div class="list-group">
<a href="#" class="list-group-item disabled">Getting Started</a>
<a href="http://progrium.viewdocs.io/dokku/installation" class="list-group-item">Installation</a>
<a href="http://progrium.viewdocs.io/dokku/upgrading" class="list-group-item">Upgrading</a>
<a href="http://progrium.viewdocs.io/dokku/troubleshooting" class="list-group-item">Troubleshooting</a>
<a href="http://progrium.viewdocs.io/dokku/getting-started/where-to-get-help" class="list-group-item">Getting Help</a>
<a href="#" class="list-group-item disabled">Deployment</a>
<a href="http://progrium.viewdocs.io/dokku/application-deployment" class="list-group-item">Application Deployment</a>
<a href="http://progrium.viewdocs.io/dokku/configuration-management" class="list-group-item">Configuration management</a>
<a href="http://progrium.viewdocs.io/dokku/process-management" class="list-group-item">Process management</a>
<a href="http://progrium.viewdocs.io/dokku/dns" class="list-group-item">DNS Configuration</a>
<a href="http://progrium.viewdocs.io/dokku/nginx" class="list-group-item">Nginx Configuration</a>
<a href="http://progrium.viewdocs.io/dokku/remote-commands" class="list-group-item">Running Remote commands</a>
<a href="http://progrium.viewdocs.io/dokku/docker-options" class="list-group-item">Container Options</a>
<a href="http://progrium.viewdocs.io/dokku/dokku-events-logs" class="list-group-item">Dokku Event Logs</a>
<a href="#" class="list-group-item disabled">Community Contributions</a>
<a href="http://progrium.viewdocs.io/dokku/community/clients" class="list-group-item">Clients</a>
<a href="http://progrium.viewdocs.io/dokku/plugins" class="list-group-item">Plugins</a>
<a href="#" class="list-group-item disabled">Development</a>
<a href="http://progrium.viewdocs.io/dokku/development/plugin-creation" class="list-group-item">Plugin Creation</a>
<a href="http://progrium.viewdocs.io/dokku/development/pluginhooks" class="list-group-item">Pluginhooks</a>
<a href="http://progrium.viewdocs.io/dokku/development/testing" class="list-group-item">Test Suite</a>
<a href="http://progrium.viewdocs.io/dokku/development/release-process" class="list-group-item">Release Process</a>
</div>
</div>
<div class="col-xs-8 col-md-10">
{{CONTENT}}
</div>
</div>
</div>
<div class="container">
<footer>
<p class="pull-right"><a href="#">Back to top</a></p>
<p>&copy; 2013 Dokku</p>
</footer>
</div>
<script>
document.addEventListener("DOMContentLoaded", function (e) {
var elements = document.querySelectorAll('table'),
classNames = ['table', 'table-striped', 'table-hover', 'table-condensed'],
addClass = function (el, className) {
if (el.classList) {
el.classList.add(className);
} else {
el.className += ' ' + className;
}
}
Array.prototype.forEach.call(classNames, function (className, i) {
Array.prototype.forEach.call(elements, function (el, i) {
addClass(el, className);
});
});
});
</script>
</body>
</html>

151
docs/troubleshooting.md Normal file
View File

@@ -0,0 +1,151 @@
## Troubleshooting
__Symptom:__ I deployed my app but I am getting the default nginx page
__Solution:__
Most of the time it's caused by some defaults newer versions of nginx set. To make sure that's the issue you're having run the following:
```
root@dockerapps:/home/git# nginx
nginx: [emerg] could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32
```
If you get a similar error just edit __/etc/nginx/nginx.conf__ and add the following line to your http section:
```
http {
(... existing content ...)
server_names_hash_bucket_size 64;
(...)
}
```
Note that the `server_names_hash_bucket_size` setting defines the maximum domain name length.
A value of 64 would allow domains with up to 64 characters. Set it to 128 if you need longer ones.
Save the file and try stopping nginx and starting it again:
```
root@dockerapps:~/dokku# /etc/init.d/nginx stop
* Stopping nginx nginx [ OK ]
root@dockerapps:~/dokku# /etc/init.d/nginx start
* Starting nginx nginx [ OK ]
```
***
__Symptom:__ I want to deploy my app, but while pushing I get the following error
! [remote rejected] master -> master (pre-receive hook declined)
__Solution:__
The `remote rejected` error does not give enough information. Anything could have failed.
To enable dokku tracing, simply run the following command:
# Since 0.3.9
dokku trace
In versions older than 0.3.9, you can create a `/home/dokku/dokkurc` file containing the following :
export DOKKU_TRACE=1
This will trace all of dokku's activity. If this does not help you, create a [gist](https://gist.github.com) containing the full log, and create an issue.
***
__Symptom:__ I get the aforementioned error in the build phase (after turning on dokku tracing)
Most errors that happen in this phase are due to transient network issues (either locally or remotely) buildpack bugs.
__Solution (Less solution, more helpful troubleshooting steps):__
Find the failed phase's container image (*077581956a92* in this example)
```
root@dokku:~# docker ps -a | grep build
94d9515e6d93 077581956a92 "/build" 29 minutes ago Exited (0) 25 minutes ago cocky_bell
```
Start a new container with the failed image and poke around (i.e. ensure you can access the internet from within the container or attempt the failed command, if known)
```
root@dokku:~# docker run -ti 077581956a92 /bin/bash
root@9763ab86e1b4:/# curl -s -S icanhazip.com
192.168.0.1
curl http://s3pository.heroku.com/node/v0.10.30/node-v0.10.30-linux-x64.tar.gz -o node-v0.10.30-linux-x64.tar.gz
tar tzf node-v0.10.30-linux-x64.tar.gz
...
```
Sometimes (especially on DO) deploying again seems to get past these seemingly transient issues
Additionally we've seen issues if changing networks that have different DNS resolvers. In this case, you can run the following to update your resolv.conf
```
root@dokku:~# resolvconf -u
```
Please see https://github.com/progrium/dokku/issues/841 and https://github.com/progrium/dokku/issues/649
***
__Symptom:__ I want to deploy my app but I am getting asked for the password of the git user and the error message
fatal: 'NAME' does not appear to be a git repository
fatal: Could not read from remote repository.
__Solution:__
You get asked for a password because your ssh secret key can't be found. This may happen if the private key corresponding to the public key you added with `sshcommand acl-add` is not located in the default location `~/.ssh/id_rsa`.
You have to point ssh to the correct secret key for your domain name. Add the following to your `~/.ssh/config`:
Host DOKKU_HOSTNAME
IdentityFile "~/.ssh/KEYNAME"
Also see [issue #116](https://github.com/progrium/dokku/issues/116)
***
__Symptom:__ I successfully deployed my application with no deployment errors and receiving Bad Gateway when attempting to access the application
__Solution:__
In many cases the application will require the a `process.env.PORT` port opposed to a specified port.
When specifying your port you may want to use something similar to:
var port = process.env.PORT || 3000
Please see https://github.com/progrium/dokku/issues/282
***
__Symptom:__ Deployment fails because of slow internet connection, messages shows `gzip: stdin: unexpected end of file`
__Solution:__
If you see output similar this when deploying:
```
Command: 'set -o pipefail; curl --fail --retry 3 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/ruby-2.0.0-p451-default-cache.tgz -s -o - | tar zxf -' failed unexpectedly:
!
! gzip: stdin: unexpected end of file
! tar: Unexpected EOF in archive
! tar: Unexpected EOF in archive
! tar: Error is not recoverable: exiting now
```
it might that the curl command that is supposed to fetch the buildpack (anything in the low megabyte file size range) takes too long to finish, due to slowish connection. To overwrite the default values (connection timeout: 3 seconds, total maximum time for operation: 30 seconds), edit `/home/dokku/ENV` like the following:
```
#/home/dokku/ENV
export CURL_TIMEOUT=600
export CURL_CONNECT_TIMEOUT=30
```
References
* https://github.com/progrium/dokku/issues/509
* https://github.com/dokku-alt/dokku-alt/issues/169

62
docs/upgrading.md Normal file
View File

@@ -0,0 +1,62 @@
# Upgrading
This document covers upgrades for the 0.3.0 series and up. If upgrading from previous versions, we recommend [a fresh install](http://progrium.viewdocs.io/dokku/installation) on a new server.
> As of 0.3.18, dokku is installed by default via a debian package. Source-based installations are still available, though not recommended.
## Dokku
If dokku was installed via a debian package, you can upgrade dokku via the following command:
```shell
sudo apt-get install dokku
```
For unattended upgrades, you may run the following command:
```shell
sudo apt-get install -qq -y dokku
```
If you have installed dokku from source, you may run the following commands to upgrade:
```shell
cd ~/dokku
git pull --tags origin master
# continue to install from source
sudo DOKKU_BRANCH=master make install
# upgrade to debian package-based installation
sudo make install
```
All changes will take effect upon next application deployment. To trigger a rebuild of every application, simply run the following command:
```shell
dokku ps:rebuildall
```
## Herokuish image
If dokku was installed via a debian package, you can upgrade herokuish via the following command:
```shell
sudo apt-get install Herokush
```
For unattended upgrades, you may run the following command:
```shell
sudo apt-get install -qq -y herokuish
```
In some cases, it may be desirable to run a specific version of herokuish. To install/upgrade herokuish from source, run the following commands:
```shell
cd /tmp
git clone https://github.com/gliderlabs/herokuish.git
cd herokuish
git pull origin master
IMAGE_NAME=gliderlabs/herokuish BUILD_TAG=latest VERSION=master make -e build-in-docker
```

285
dokku
View File

@@ -1,84 +1,209 @@
#!/usr/bin/env bash
set -eo pipefail
export DOKKU_ROOT=${DOKKU_ROOT:="/home/dokku"}
shopt -s nullglob
export DOKKU_DISTRO=${DOKKU_DISTRO:="ubuntu"}
export DOKKU_IMAGE=${DOKKU_IMAGE:="gliderlabs/herokuish"}
export DOKKU_ROOT=${DOKKU_ROOT:=~dokku}
export PLUGIN_PATH=${PLUGIN_PATH:="/var/lib/dokku/plugins"}
export DOKKU_NOT_IMPLEMENTED_EXIT=10
export DOKKU_VALID_EXIT=0
export DOKKU_LOGS_DIR=${DOKKU_LOGS_DIR:="/var/log/dokku"}
export DOKKU_EVENTS_LOGFILE=${DOKKU_EVENTS_LOGFILE:="$DOKKU_LOGS_DIR/events.log"}
source "$PLUGIN_PATH/common/functions"
[[ -f $DOKKU_ROOT/dokkurc ]] && source $DOKKU_ROOT/dokkurc
[[ -d $DOKKU_ROOT/.dokkurc ]] && for f in $DOKKU_ROOT/.dokkurc/*; do source $f; done
[[ $DOKKU_TRACE ]] && set -x
if [[ $(id -un) != "dokku" && $1 != "plugins-install" ]]; then
sudo -u dokku -H $0 "$@"
parse_args "$@"
args=("$@")
if [[ "${args[0]}" =~ ^--.* ]]; then
for arg in "$@"; do
if [[ "$arg" =~ ^--.* ]];then
shift 1
else
break
fi
done
fi
! has_tty && DOKKU_QUIET_OUTPUT=1
if [[ $(id -un) != "dokku" && $1 != plugins-install* && $1 != "plugins-update" ]]; then
sudo -u dokku -E -H $0 "$@"
exit
fi
if [[ -n "$SSH_ORIGINAL_COMMAND" ]]; then
export -n SSH_ORIGINAL_COMMAND
if [[ $1 =~ config-* ]] || [[ $1 =~ docker-options* ]];then
xargs $0 <<<$SSH_ORIGINAL_COMMAND
exit $?
else
$0 $SSH_ORIGINAL_COMMAND
exit $?
fi
fi
case "$1" in
receive)
APP="$2"; IMAGE="dokku/$APP"
echo "-----> Cleaning up ..."
APP="$2"; IMAGE="dokku/$APP"; IMAGE_SOURCE_TYPE="$3"; TMP_WORK_DIR="$4"
dokku_log_info1 "Cleaning up..."
dokku cleanup
echo "-----> Building $APP ..."
cat | dokku build $APP
echo "-----> Releasing $APP ..."
dokku release $APP
echo "-----> Deploying $APP ..."
dokku deploy $APP
echo "=====> Application deployed:"
echo " $(dokku url $APP)"
dokku_log_info1 "Building $APP from $IMAGE_SOURCE_TYPE..."
dokku build "$APP" "$IMAGE_SOURCE_TYPE" "$TMP_WORK_DIR"
dokku_log_info1 "Releasing $APP..."
dokku release "$APP" "$IMAGE_SOURCE_TYPE"
dokku_log_info1 "Deploying $APP..."
dokku deploy "$APP"
dokku_log_info2 "Application deployed:"
dokku urls "$APP" | sed "s/^/ /"
echo
;;
build)
APP="$2"; IMAGE="dokku/$APP"; CACHE_DIR="$DOKKU_ROOT/$APP/cache"
id=$(cat | docker run -i -a stdin progrium/buildstep /bin/bash -c "mkdir -p /app && tar -xC /app")
test $(docker wait $id) -eq 0
docker commit $id $IMAGE > /dev/null
[[ -d $CACHE_DIR ]] || mkdir $CACHE_DIR
pluginhook pre-build $APP
id=$(docker run -d -v $CACHE_DIR:/cache $IMAGE /build/builder)
docker attach $id
test $(docker wait $id) -eq 0
docker commit $id $IMAGE > /dev/null
pluginhook post-build $APP
;;
release)
APP="$2"; IMAGE="dokku/$APP"
pluginhook pre-release $APP
if [[ -f "$DOKKU_ROOT/$APP/ENV" ]]; then
id=$(cat "$DOKKU_ROOT/$APP/ENV" | docker run -i -a stdin $IMAGE /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/app-env.sh")
test $(docker wait $id) -eq 0
docker commit $id $IMAGE > /dev/null
fi
pluginhook post-release $APP
;;
deploy)
[[ -z $2 ]] && dokku_log_fail "Please specify an app to deploy"
APP="$2"; IMAGE="dokku/$APP"
verify_app_name "$APP"
pluginhook pre-deploy $APP
# kill the app when running
if [[ -f "$DOKKU_ROOT/$APP/CONTAINER" ]]; then
oldid=$(< "$DOKKU_ROOT/$APP/CONTAINER")
docker inspect $oldid &> /dev/null && docker kill $oldid > /dev/null
is_image_herokuish_based "$IMAGE" && DOKKU_HEROKUISH=true
DOKKU_SCALE_FILE="$DOKKU_ROOT/$APP/DOKKU_SCALE"
oldids=$(get_app_container_ids $APP)
while read line || [ -n "$line" ]
do
TRIM=${line%#*}
PROC_TYPE=${TRIM%%=*}
PROC_COUNT=${TRIM#*=}
CONTAINER_INDEX=1
while [[ $CONTAINER_INDEX -le $PROC_COUNT ]];do
id=""; port=""; ipaddr=""
DOKKU_CONTAINER_ID_FILE="$DOKKU_ROOT/$APP/CONTAINER.$PROC_TYPE.$CONTAINER_INDEX"
DOKKU_IP_FILE="$DOKKU_ROOT/$APP/IP.$PROC_TYPE.$CONTAINER_INDEX"
DOKKU_PORT_FILE="$DOKKU_ROOT/$APP/PORT.$PROC_TYPE.$CONTAINER_INDEX"
# start the app
DOCKER_ARGS=$(: | pluginhook docker-args $APP deploy)
DOCKER_ARGS+=" -e DYNO=$PROC_TYPE "
DOCKER_ARGS+=$(: | pluginhook docker-args-deploy $APP)
BIND_EXTERNAL=$(pluginhook bind-external-ip $APP)
[[ -n "$DOKKU_HEROKUISH" ]] && START_CMD="/start $PROC_TYPE"
if [[ -z "$DOKKU_HEROKUISH" ]];then
DOKKU_DOCKERFILE_PORT=$(dokku config:get $APP DOKKU_DOCKERFILE_PORT || true)
START_CMD=$(dokku config:get $APP DOKKU_DOCKERFILE_START_CMD || $START_CMD)
fi
if [[ "$PROC_TYPE" == "web" ]]; then
port=${DOKKU_DOCKERFILE_PORT:=5000}
if [[ "$BIND_EXTERNAL" = "true" ]];then
id=$(docker run -d -p $port -e PORT=$port $DOCKER_ARGS $IMAGE $START_CMD)
port=$(docker port $id $port | sed 's/[0-9.]*://')
ipaddr=127.0.0.1
else
id=$(docker run -d -e PORT=$port $DOCKER_ARGS $IMAGE $START_CMD)
ipaddr=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' $id)
fi
else
id=$(docker run -d $DOCKER_ARGS $IMAGE $START_CMD)
fi
# if we can't post-deploy successfully, kill new container
kill_new() {
docker inspect $id &> /dev/null && docker stop $id > /dev/null && docker kill $id > /dev/null
trap - INT TERM EXIT
kill -9 $$
}
DOKKU_APP_SKIP_ALL_CHECKS=$(dokku config:get $APP DOKKU_SKIP_ALL_CHECKS || true)
DOKKU_APP_SKIP_DEFAULT_CHECKS=$(dokku config:get $APP DOKKU_SKIP_DEFAULT_CHECKS || true)
DOKKU_GLOBAL_SKIP_ALL_CHECKS=$(dokku config:get --global DOKKU_SKIP_ALL_CHECKS || true)
DOKKU_GLOBAL_SKIP_DEFAULT_CHECKS=$(dokku config:get --global DOKKU_SKIP_DEFAULT_CHECKS || true)
DOKKU_SKIP_ALL_CHECKS=${DOKKU_APP_SKIP_ALL_CHECKS:="$DOKKU_GLOBAL_SKIP_ALL_CHECKS"}
DOKKU_SKIP_DEFAULT_CHECKS=${DOKKU_APP_SKIP_DEFAULT_CHECKS:="$DOKKU_GLOBAL_SKIP_DEFAULT_CHECKS"}
# run checks first, then post-deploy hooks, which switches Nginx traffic
if [[ "$DOKKU_SKIP_ALL_CHECKS" = "true" ]]; then
dokku_log_info1 "Skipping pre-flight checks"
else
trap kill_new INT TERM EXIT
dokku_log_info1 "Running pre-flight checks"
pluginhook check-deploy $APP $id $PROC_TYPE $port $ipaddr
trap - INT TERM EXIT
fi
# now using the new container
[[ -n "$id" ]] && echo $id > "$DOKKU_CONTAINER_ID_FILE"
[[ -n "$ipaddr" ]] && echo $ipaddr > "$DOKKU_IP_FILE"
[[ -n "$port" ]] && echo $port > "$DOKKU_PORT_FILE"
[[ -n "$port" ]] && echo "http://$(< "$DOKKU_ROOT/HOSTNAME"):$port" > "$DOKKU_ROOT/$APP/URL"
# cleanup pre-migration files
rm -f $DOKKU_ROOT/$APP/CONTAINER $DOKKU_ROOT/$APP/IP $DOKKU_ROOT/$APP/PORT
CONTAINER_INDEX=$(( CONTAINER_INDEX + 1 ))
done
# cleanup when we scale down
if [[ "$PROC_COUNT" == 0 ]]; then
CONTAINER_IDX_OFFSET=0
else
CONTAINER_IDX_OFFSET=$((PROC_COUNT + 1))
fi
for container_state_filetype in CONTAINER IP PORT; do
cd $DOKKU_ROOT/$APP
find . -maxdepth 1 -name "$container_state_filetype.$PROC_TYPE.*" -printf "%f\n" | sort -t . -k 3 -n | tail -n +$CONTAINER_IDX_OFFSET | xargs rm -f
done
done < "$DOKKU_SCALE_FILE"
dokku_log_info1 "Running post-deploy"
pluginhook post-deploy $APP $port $ipaddr
# kill the old container
if [[ -n "$oldids" ]]; then
if [[ -z "$DOKKU_WAIT_TO_RETIRE" ]];then
DOKKU_APP_DOKKU_WAIT_TO_RETIRE=$(dokku config:get $APP DOKKU_WAIT_TO_RETIRE || true)
DOKKU_GLOBAL_DOKKU_WAIT_TO_RETIRE=$(dokku config:get --global DOKKU_WAIT_TO_RETIRE || true)
DOKKU_WAIT_TO_RETIRE=${DOKKU_APP_DOKKU_WAIT_TO_RETIRE:="$DOKKU_GLOBAL_DOKKU_WAIT_TO_RETIRE"}
fi
# Let the old container finish processing requests, before terminating it
WAIT="${DOKKU_WAIT_TO_RETIRE:-60}"
dokku_log_info1 "Shutting down old containers in $WAIT seconds"
for oldid in $oldids; do
dokku_log_info2 "$oldid"
done
(
exec >/dev/null 2>/dev/null </dev/null
trap '' INT HUP
sleep $WAIT
for oldid in $oldids; do
docker stop $oldid &> /dev/null
docker kill $oldid &> /dev/null # force a kill as docker seems to not send SIGKILL as the docs would indicate
done
) & disown -a
# Use trap since disown/nohup don't seem to keep child alive
# Give child process just enough time to set the traps
sleep 0.1
fi
# start the app
DOCKER_ARGS=$(: | pluginhook docker-args $APP)
id=$(docker run -d -p 5000 -e PORT=5000 $DOCKER_ARGS $IMAGE /bin/bash -c "/start web")
echo $id > "$DOKKU_ROOT/$APP/CONTAINER"
port=$(docker port $id 5000 | sed 's/0.0.0.0://')
echo $port > "$DOKKU_ROOT/$APP/PORT"
echo "http://$(< "$DOKKU_ROOT/HOSTNAME"):$port" > "$DOKKU_ROOT/$APP/URL"
pluginhook post-deploy $APP $port
;;
cleanup)
# delete all non-running container
docker ps -a | grep 'Exit' | awk '{print $1}' | xargs docker rm &> /dev/null &
# shellcheck disable=SC2046
docker rm $(docker ps -a -f 'status=exited' -q) &> /dev/null || true
# delete unused images
docker images | grep '<none>' | awk '{print $3}' | xargs docker rmi &> /dev/null &
# shellcheck disable=SC2046
docker rmi $(docker images -f 'dangling=true' -q) &> /dev/null &
;;
plugins)
@@ -89,26 +214,52 @@ case "$1" in
pluginhook install
;;
# temporary hack for https://github.com/progrium/dokku/issues/82
deploy:all)
for app in $(ls -d $DOKKU_ROOT/*/); do
APP=$(basename $app);
dokku deploy $APP
done
plugins-install-dependencies)
pluginhook dependencies
;;
help)
cat<<EOF | pluginhook commands help | sort
help Print the list of commands
plugins Print active plugins
plugins-install Install active plugins
plugins-update)
pluginhook update
;;
# DEPRECATED as of v0.3.14
deploy:all)
echo "*DEPRECATED* in v0.3.14: deploy:all will be removed in future versions"
dokku ps:restartall
;;
help|'')
echo "Usage: dokku [--quiet|--trace|--rm-container|--rm|--force] COMMAND <app> [command-specific-options]"
echo ""
echo "Options:"
cat<<EOF | pluginhook commands help | sort | column -c2 -t -s,
help, Print the list of commands
plugins, Print active plugins
plugins-install, Install active plugins
plugins-update, Update active plugins
EOF
;;
*)
for script in $(ls -d /var/lib/dokku/plugins/*/commands); do
$script "$@"
implemented=0
for script in $PLUGIN_PATH/*/commands; do
set +e; $script "$@" ; exit_code=$? ; set -e
if [[ "$exit_code" -eq "$DOKKU_NOT_IMPLEMENTED_EXIT" ]]; then
continue
fi
implemented=1
if [[ "$exit_code" -ne "$DOKKU_VALID_EXIT" ]]; then
exit $exit_code
fi
done
if [[ "$implemented" -eq 0 ]]; then
dokku_log_warn "\`$*\` is not a dokku command."
dokku_log_warn "See \`dokku help\` for a list of available commands."
exit 1
fi
;;
esac

58
dokku.1
View File

@@ -1,58 +0,0 @@
.TH DOKKU 1 2014-03-08
.\"Make sure to change that date when you commit a change!
.\"
.SH NAME
dokku \- configure and get information from your dokku installation
.\"
.SH SYNOPSIS
.B dokku
.I <command>
.\"
.SH DESCRIPTION
.B dokku
is a catch-all command to configure your apps,
work with plugins and inspect the current state of your server.
.\"
.SH OPTIONS
.TP
.BI backup:import " file"
Import dokku config files.
.TP
.BI backup:export " file"
Export dokku config files.
.TP
.BI config " <app>"
Display the config vars for an app.
.TP
.BI config:get " <app> KEY"
Display a specific config var for an app.
.TP
.BI config:set " <app> KEY1=VAL1" \fR\ (KEY2=VAL2\ \.\.\.)
Set one or more config vars for an app.
.TP
.BI config:unset " <app> KEY1" \fR\ (KEY2\ \.\.\.)
Remove one or more config vars from an app.
.TP
.BI delete " <app>"
Delete an application.
.TP
.B help
Print the list of commands.
.TP
.B logs \ \fI<app> \fR[\fI-t\fR]
Show the last logs for an application (-t follows)
.TP
.B plugins-install
Install active plugins.
.TP
.B plugins
Print active plugins.
.TP
.BI run " <app> command"
Run a command in the environment of an app.
.TP
.BI url " <app>"
Show the url for an app.
.TP
.B version
Print dokku's version.

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
VERSION="$1"
IMPORT_DIR="$2"
TARGET_DIR="$3"
@@ -15,4 +16,3 @@ for app in $APPS; do
done
exit $ret

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
VERSION="$1"
BASE_DIR="$2"

View File

@@ -1,15 +1,16 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
VERSION="$1"
IMPORT_DIR="$2"
TARGET_DIR="$3"
[[ -f $IMPORT_DIR/.sshcommand ]] && mv $IMPORT_DIR/.sshcommand $TARGET_DIR/.sshcommand
if [[ -f $IMPORT_DIR/.ssh/authorized_keys ]]; then
mkdir -p $TARGET_DIR/.ssh
cat $IMPORT_DIR/.ssh/authorized_keys $TARGET_DIR/.ssh/authorized_keys | uniq > $TARGET_DIR/.ssh/authorized_keys
chmod 0700 $TARGET_DIR/.ssh
chmod 0600 $TARGET_DIR/.ssh/*
mkdir -p $TARGET_DIR/.ssh
cat $IMPORT_DIR/.ssh/authorized_keys $TARGET_DIR/.ssh/authorized_keys | uniq > tmpfile && mv tmpfile $TARGET_DIR/.ssh/authorized_keys
chmod 0700 $TARGET_DIR/.ssh
chmod 0600 $TARGET_DIR/.ssh/*
fi
[[ -f $IMPORT_DIR/HOSTNAME ]] && mv $IMPORT_DIR/HOSTNAME $TARGET_DIR/HOSTNAME
[[ -f $IMPORT_DIR/VHOST ]] && mv $IMPORT_DIR/VHOST $TARGET_DIR/VHOST

View File

@@ -1,80 +1,218 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$(dirname $0)/../common/functions"
case "$1" in
build)
APP="$2"; IMAGE="dokku/$APP"; IMAGE_SOURCE_TYPE="$3"; TMP_WORK_DIR="$4"
CACHE_DIR="$DOKKU_ROOT/$APP/cache"
[[ -f "$DOKKU_ROOT/$APP/ENV" ]] && source "$DOKKU_ROOT/$APP/ENV"
pushd "$TMP_WORK_DIR" &> /dev/null
case "$IMAGE_SOURCE_TYPE" in
herokuish)
id=$(tar -c . | docker run -i -a stdin $DOKKU_IMAGE /bin/bash -c "mkdir -p /app && tar -xC /app")
test "$(docker wait $id)" -eq 0
docker commit $id $IMAGE > /dev/null
[[ -d $CACHE_DIR ]] || mkdir $CACHE_DIR
# *DEPRECATED* in v0.3.15: `pluginhook pre-build` will be removed in future releases
pluginhook pre-build "$APP"
# *DEPRECATED* in v0.3.22: `pluginhook pre-build-buildstep` will be removed in future releases
pluginhook pre-build-buildstep "$APP"
pluginhook pre-build-buildpack "$APP"
# *DEPRECATED* in v0.3.14: `pluginhook docker-args` will be removed in future releases
# https://github.com/progrium/dokku/issues/896 & https://github.com/progrium/dokku/issues/906
DOCKER_ARGS=$(: | pluginhook docker-args $APP build)
DOCKER_ARGS+=$(: | pluginhook docker-args-build $APP)
id=$(docker run -d -v $CACHE_DIR:/cache -e CACHE_PATH=/cache $DOCKER_ARGS $IMAGE /build)
docker attach $id
test "$(docker wait $id)" -eq 0
docker commit $id $IMAGE > /dev/null
# *DEPRECATED* in v0.3.15: `pluginhook post-build` will be removed in future releases
pluginhook post-build "$APP"
# *DEPRECATED* in v0.3.22: `pluginhook post-build-buildstep` will be removed in future releases
pluginhook post-build-buildstep "$APP"
pluginhook post-build-buildpack "$APP"
;;
dockerfile)
# extract first port from Dockerfile
DOCKERFILE_PORT=$(get_dockerfile_exposed_port Dockerfile)
[[ -n "$DOCKERFILE_PORT" ]] && dokku config:set-norestart $APP DOKKU_DOCKERFILE_PORT=$DOCKERFILE_PORT
pluginhook pre-build-dockerfile "$APP"
[[ "$DOKKU_DOCKERFILE_CACHE_BUILD" == "false" ]] && DOKKU_DOCKER_BUILD_OPTS="$DOKKU_DOCKER_BUILD_OPTS --no-cache"
docker build $DOKKU_DOCKER_BUILD_OPTS -t "$IMAGE" .
pluginhook post-build-dockerfile "$APP"
;;
*)
dokku_log_fail "Building image source type $IMAGE_SOURCE_TYPE not supported!"
;;
esac
;;
release)
APP="$2"; IMAGE="dokku/$APP"; IMAGE_SOURCE_TYPE="$3"
case "$IMAGE_SOURCE_TYPE" in
herokuish)
# *DEPRECATED* in v0.3.15: `pluginhook pre-release` will be removed in future releases
pluginhook pre-release "$APP"
# *DEPRECATED* in v0.3.22: `pluginhook pre-release-buildstep` will be removed in future releases
pluginhook pre-release-buildstep "$APP"
pluginhook pre-release-buildpack "$APP"
if [[ -f "$DOKKU_ROOT/ENV" ]]; then
id=$(docker run -i -a stdin $IMAGE /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/00-global-env.sh" < "$DOKKU_ROOT/ENV")
test "$(docker wait $id)" -eq 0
docker commit $id $IMAGE > /dev/null
fi
if [[ -f "$DOKKU_ROOT/$APP/ENV" ]]; then
id=$(docker run -i -a stdin $IMAGE /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/01-app-env.sh" < "$DOKKU_ROOT/$APP/ENV")
test "$(docker wait $id)" -eq 0
docker commit $id $IMAGE > /dev/null
fi
# *DEPRECATED* in v0.3.15: `pluginhook post-release` will be removed in future releases
pluginhook post-release "$APP"
# *DEPRECATED* in v0.3.22: `pluginhook post-release-buildstep` will be removed in future releases
pluginhook post-release-buildstep "$APP"
pluginhook post-release-buildpack "$APP"
;;
dockerfile)
pluginhook pre-release-dockerfile "$APP"
pluginhook post-release-dockerfile "$APP"
;;
*)
dokku_log_fail "Releasing image source type $IMAGE_SOURCE_TYPE not supported!"
;;
esac
;;
trace)
[[ -d $DOKKU_ROOT/.dokkurc ]] || mkdir -p $DOKKU_ROOT/.dokkurc
[[ "$2" == "on" ]] || [[ "$2" == "off" ]] || {
echo "Valid trace options are [on/off]"
exit 1
}
if [[ "$2" == "on" ]]; then
echo "Enabling dokku trace"
echo "export DOKKU_TRACE=1" > $DOKKU_ROOT/.dokkurc/DOKKU_TRACE
fi
if [[ "$2" == "off" ]]; then
echo "Disabling dokku trace"
rm -f $DOKKU_ROOT/.dokkurc/DOKKU_TRACE
fi
;;
delete)
if [[ -z $2 ]]; then
echo "Please specify an app to delete"
exit 1
fi
APP="$2"; IMAGE="dokku/$APP";
if [[ ! -d "$DOKKU_ROOT/$APP" ]]; then
echo "App does not exist"
exit 1
fi
dokku apps:destroy $2
;;
pluginhook pre-delete $APP
if [[ -f "$DOKKU_ROOT/$APP/CONTAINER" ]]; then
ID=$(< "$DOKKU_ROOT/$APP/CONTAINER")
ls)
dokku_apps=$(ls -d $DOKKU_ROOT/*/ 2>/dev/null) || (echo "You haven't deployed any applications yet" && exit 1)
docker stop $ID > /dev/null || true
docker rm $ID > /dev/null || true
fi
dokku_col_log_info1_quiet "App Name" "Container Type" "Container Id" "Status"
docker images | grep $IMAGE | awk '{print $3}' | xargs docker rmi &> /dev/null &
pluginhook post-delete $APP
for dokku_app in $dokku_apps; do
APP=$(basename $dokku_app)
DOKKU_APP_CIDS=$(get_app_container_ids $APP)
DOCKER_RUNNING_CONTAINERS=$(docker ps -q --no-trunc)
if [[ -n $DOKKU_APP_CIDS ]]; then
for DOKKU_APP_CID in $DOKKU_APP_CIDS; do
DOKKU_APP_CONTAINER_STATUS="stopped"
[[ $DOCKER_RUNNING_CONTAINERS =~ $DOKKU_APP_CID ]] && DOKKU_APP_CONTAINER_STATUS="running"
DOKKU_APP_CONTAINER_TYPE=$(grep -l $DOKKU_APP_CID $DOKKU_ROOT/$APP/CONTAINER.* | awk -F '/' '{ print $5 }' | awk -F '.' '{ print $2 }')
dokku_col_log_msg "$APP" "$DOKKU_APP_CONTAINER_TYPE" "${DOKKU_APP_CID:0:12}" "$DOKKU_APP_CONTAINER_STATUS"
done
else
dokku_col_log_msg "$APP" "NOT_DEPLOYED" "NOT_DEPLOYED" "NOT_DEPLOYED"
fi
done
;;
logs)
if [[ -z $2 ]]; then
echo "Please specify an app to run the command on"
exit 1
fi
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
verify_app_name "$2"
APP="$2";
if [[ ! -d "$DOKKU_ROOT/$APP" ]]; then
echo "App $APP does not exist"
exit 1
fi
if [[ -f "$DOKKU_ROOT/$APP/CONTAINER" ]]; then
CONTAINER=$(<$DOKKU_ROOT/$APP/CONTAINER)
if (is_deployed $APP); then
CONTAINER_IDS=( $(get_app_container_ids $APP) )
LAST_CONTAINER_ID=${CONTAINER_IDS[${#CONTAINER_IDS[@]} - 1]}
if [[ $3 == "-t" ]]; then
docker logs --follow $CONTAINER
DOKKU_LOGS_ARGS="--follow"
else
docker logs $CONTAINER | tail -n 100
DOKKU_LOGS_ARGS="--tail 100"
fi
for CID in "${CONTAINER_IDS[@]}";do
if [[ "$CID" != "$LAST_CONTAINER_ID" ]];then
DOKKU_LOGS_CMD+="docker logs $DOKKU_LOGS_ARGS $CID& "
else
DOKKU_LOGS_CMD+="docker logs $DOKKU_LOGS_ARGS $CID; "
fi
done
bash -c "($DOKKU_LOGS_CMD)"
else
echo "Application's container not found"
fi
;;
run)
if [[ -z $2 ]]; then
echo "Please specify an app to run the command on"
exit 1
fi
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
verify_app_name "$2"
APP="$2"; IMAGE="dokku/$APP"
if [[ ! -d "$DOKKU_ROOT/$APP" ]]; then
echo "App $APP does not exist"
exit 1
fi
shift 2
DOCKER_ARGS=$(: | pluginhook docker-args $APP)
docker run -i -t $DOCKER_ARGS $IMAGE /exec "$@"
DOCKER_ARGS=$(: | pluginhook docker-args $APP run)
DOCKER_ARGS+=$(: | pluginhook docker-args-run $APP)
[[ $DOKKU_RM_CONTAINER ]] && DOKKU_RUN_OPTS="--rm"
has_tty && DOKKU_RUN_OPTS+=" -i -t"
is_image_herokuish_based "$IMAGE" && EXEC_CMD="/exec"
docker run $DOKKU_RUN_OPTS $DOCKER_ARGS $IMAGE $EXEC_CMD "$@"
;;
url)
url | urls)
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
verify_app_name "$2"
APP="$2";
if [[ ! -d "$DOKKU_ROOT/$APP" ]]; then
echo "App $APP does not exist"
exit 1
[[ -f "$DOKKU_ROOT/$APP/ENV" ]] && source "$DOKKU_ROOT/$APP/ENV"
if [[ -s "$DOKKU_ROOT/$APP/URLS" ]]; then
case "$1" in
url)
grep "^http" "$DOKKU_ROOT/$APP/URLS" | head -1
;;
urls)
grep "^http" "$DOKKU_ROOT/$APP/URLS"
;;
esac
exit 0
fi
if [[ -f "$DOKKU_ROOT/$APP/URL" ]]; then
echo $(< "$DOKKU_ROOT/$APP/URL")
SCHEME="http"; SSL="$DOKKU_ROOT/$APP/tls"; WILDCARD_SSL="$DOKKU_ROOT/tls"
if [[ -e "$SSL/server.crt" && -e "$SSL/server.key" ]] || [[ -e "$WILDCARD_SSL/server.crt" && -e "$WILDCARD_SSL/server.key" ]]; then
SCHEME="https"
fi
;;
if [[ -f "$DOKKU_ROOT/VHOST" ]] && [[ "$NO_VHOST" != "1" ]]; then
echo "$SCHEME://$(< "$DOKKU_ROOT/VHOST")"
else
for PORT_FILE in $DOKKU_ROOT/$APP/PORT.*; do
echo "$SCHEME://$(< "$DOKKU_ROOT/HOSTNAME"):$(< "$PORT_FILE")"
done
fi
;;
version)
cat "$DOKKU_ROOT/VERSION" || {
@@ -85,13 +223,17 @@ case "$1" in
help)
cat && cat<<EOF
delete <app> Delete an application
logs <app> [-t] Show the last logs for an application (-t follows)
run <app> <cmd> Run a command in the environment of an application
url <app> Show the URL for an application
version Print dokku's version
ls, Pretty listing of deployed applications and containers
logs <app> [-t], Show the last logs for an application (-t follows)
run <app> <cmd>, Run a command in the environment of an application
url <app>, Show the first URL for an application (compatibility)
urls <app>, Show all URLs for an application
version, Print dokku's version
EOF
;;
esac
*)
exit $DOKKU_NOT_IMPLEMENTED_EXIT
;;
esac

View File

@@ -2,18 +2,57 @@
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
if [[ ! -f "$DOKKU_ROOT/HOSTNAME" ]]; then
echo $(hostname -f) > $DOKKU_ROOT/HOSTNAME
hostname -f > $DOKKU_ROOT/HOSTNAME
fi
if [[ ! -f "$DOKKU_ROOT/VHOST" ]]; then
[[ $(dig +short "$(< "$DOKKU_ROOT/HOSTNAME")") ]] && cp "$DOKKU_ROOT/HOSTNAME" "$DOKKU_ROOT/VHOST"
fi
# temporary hack for https://github.com/progrium/dokku/issues/82
# redeploys all apps after a reboot
cat<<EOF > /etc/init/dokku-redeploy.conf
case "$DOKKU_DISTRO" in
ubuntu)
cat<<EOF > /etc/init/dokku-redeploy.conf
description "Dokku app redeploy service"
start on (started docker)
start on filesystem and started docker
script
sleep 2 # give docker some time
sudo -i -u dokku /usr/local/bin/dokku deploy:all
sudo -i -u dokku /usr/local/bin/dokku ps:restartall
end script
EOF
;;
opensuse)
cat<<EOF > /etc/systemd/system/dokku-redeploy.service
[Unit]
Description=Dokku app redeploy service
After=docker.target
[Service]
Type=simple
User=dokku
ExecStart=/usr/local/bin/dokku ps:restartall
[Install]
WantedBy=multi-user.target
EOF
;;
esac
cat<<EOF > /etc/update-motd.d/99-dokku
#!/bin/sh
if [ ! -f "/home/dokku/HOSTNAME" ]; then
echo "\nTo avoid cli-based dokku configuration, use the web installer"
echo "Debian-based installs should have this running and available"
echo "on port 80. You can also install it via the following commands:"
echo ""
echo " cd /root/dokku"
echo " sudo make dokku-installer\n"
fi
EOF
chmod +x /etc/update-motd.d/99-dokku

View File

@@ -1,10 +0,0 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1"
IMAGE=dokku/"$1"
CACHE_DIR="$DOKKU_ROOT/$APP/cache"
docker run -v $CACHE_DIR:/cache $IMAGE find /cache -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} \;

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

55
plugins/20_events/commands Executable file
View File

@@ -0,0 +1,55 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$(dirname $0)/../common/functions"
PLUGIN_DIR="$(dirname $0)"
case "$1" in
events)
if [[ -f $DOKKU_EVENTS_LOGFILE ]] ; then
if [[ $2 == "-t" ]]; then
tail -f $DOKKU_EVENTS_LOGFILE
else
tail -n 100 $DOKKU_EVENTS_LOGFILE
fi
fi
;;
events:on)
echo "Enabling dokku events logger"
[[ -d $DOKKU_ROOT/.dokkurc ]] || mkdir -p $DOKKU_ROOT/.dokkurc
echo "export DOKKU_EVENTS=1" > $DOKKU_ROOT/.dokkurc/DOKKU_EVENTS
;;
events:off)
echo "Disabling dokku events logger"
rm -f $DOKKU_ROOT/.dokkurc/DOKKU_EVENTS
;;
events:list)
if [[ "$DOKKU_EVENTS" ]]; then
logged="$(find $PLUGIN_DIR -type l -printf '%f ' | sort)"
dokku_col_log_info2_quiet "Events currently logged"
for hook in $logged ; do
dokku_col_log_msg "$hook"
done
else
dokku_log_warn "Events logger disabled"
fi
;;
help | events:help)
cat && cat<<EOF
events [-t], Show the last events (-t follows)
events:list, List logged events
events:on, Enable events logger
events:off, Disable events logger
EOF
;;
*)
exit $DOKKU_NOT_IMPLEMENTED_EXIT
;;
esac

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

5
plugins/20_events/hook Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$(dirname $0)/../common/functions"
[[ ! "$DOKKU_EVENTS" ]] || dokku_log_pluginhook_call "$(basename $0)" "$@"

54
plugins/20_events/install Executable file
View File

@@ -0,0 +1,54 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$(dirname $0)/../common/functions"
DOKKU_RSYSLOG_FILTER=/etc/rsyslog.d/99-dokku.conf
DOKKU_LOGROTATE_FILE=/etc/logrotate.d/dokku
flag_rsyslog_needs_restart=n
# This can be done unconditionally as mkdir -p
# exits gracefully if the path already exists
mkdir -m 775 -p "$DOKKU_LOGS_DIR"
chown syslog:dokku "$DOKKU_LOGS_DIR"
if [[ ! -f "$DOKKU_EVENTS_LOGFILE" ]]; then
touch "$DOKKU_EVENTS_LOGFILE"
# chown syslog:root might not work on SUSE
chown syslog:dokku "$DOKKU_EVENTS_LOGFILE"
chmod 664 "$DOKKU_EVENTS_LOGFILE"
fi
if [[ ! -f "$DOKKU_RSYSLOG_FILTER" ]]; then
cat >"$DOKKU_RSYSLOG_FILTER" <<EOF
:syslogtag, contains, "dokku" $DOKKU_EVENTS_LOGFILE
EOF
flag_rsyslog_needs_restart=y
fi
if [[ ! -f "$DOKKU_LOGROTATE_FILE" ]]; then
cat >"$DOKKU_LOGROTATE_FILE" <<EOF
$DOKKU_LOGS_DIR/*.log {
daily
rotate 7
missingok
notifempty
su syslog dokku
compress
delaycompress
postrotate
reload rsyslog >/dev/null 2>&1 || true
endscript
create 664 syslog dokku
}
EOF
flag_rsyslog_needs_restart=y
fi
if [[ "$flag_rsyslog_needs_restart" == "y" ]]; then
service rsyslog restart
fi
[[ ! "$DOKKU_EVENTS" ]] || dokku_log_pluginhook_call "$(basename $0)" "$@"
exit 0

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

1
plugins/20_events/update Symbolic link
View File

@@ -0,0 +1 @@
hook

68
plugins/apps/commands Executable file
View File

@@ -0,0 +1,68 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$(dirname $0)/../common/functions"
case "$1" in
apps)
dokku_log_info2_quiet "My Apps"
find $DOKKU_ROOT -follow -maxdepth 1 -type d \( ! -iname ".*" \) -not -path $DOKKU_ROOT/tls | sed 's|^\./||g' | sed 's|'$DOKKU_ROOT'\/||' | tail -n +2 | sort
;;
apps:create)
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
[[ -d "$DOKKU_ROOT/$2" ]] && dokku_log_warn "Name is already taken" && exit 1
APP="$2"
mkdir -p "$DOKKU_ROOT/$APP"
echo "Creating $APP... done"
;;
apps:destroy)
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
verify_app_name "$2"
[[ "$2" == "tls" ]] && echo "Unable to destroy tls directory" && exit 1
APP="$2"; IMAGE="dokku/$APP"
[[ "$3" == "force" ]] && DOKKU_APPS_FORCE_DELETE=1
if [[ -z "$DOKKU_APPS_FORCE_DELETE" ]]; then
dokku_log_warn "WARNING: Potentially Destructive Action"
dokku_log_warn "This command will destroy $APP (including all add-ons)."
dokku_log_warn "To proceed, type \"$APP\""
echo ""
read -p "> " app_name
if [[ "$app_name" != "$APP" ]]; then
dokku_log_warn "Confirmation did not match $APP. Aborted."
exit 1
fi
fi
echo "Destroying $APP (including all add-ons)"
pluginhook pre-delete $APP
DOKKU_APP_CIDS=$(get_app_container_ids $APP)
if [[ -n $DOKKU_APP_CIDS ]]; then
for ID in $DOKKU_APP_CIDS;do
docker stop $ID > /dev/null || true
docker rm $ID > /dev/null || true
done
fi
docker images | grep $IMAGE | awk '{print $3}' | xargs docker rmi &> /dev/null &
pluginhook post-delete $APP
;;
help | apps:help)
cat && cat<<EOF
apps, List your apps
apps:create <app>, Create a new app
apps:destroy <app>, Permanently destroy an app
EOF
;;
*)
exit $DOKKU_NOT_IMPLEMENTED_EXIT
;;
esac

View File

@@ -1,3 +1,4 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
[[ -n $1 ]] && rm -r "$DOKKU_ROOT/$1" > /dev/null

7
plugins/apps/pre-delete Executable file
View File

@@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1"; IMAGE="dokku/$APP"; CACHE_DIR="$DOKKU_ROOT/$APP/cache"
if [[ -d $CACHE_DIR ]]; then
docker run --rm -v "$CACHE_DIR:/cache" "$IMAGE" find /cache -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} \; || true
fi

View File

@@ -1,7 +1,9 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
CURRENT_BACKUP_VERSION=1
set -e; case "$1" in
case "$1" in
backup:export)
OUTPUT_FILE="$2"
BACKUP_DIR="$DOKKU_ROOT"
@@ -12,7 +14,7 @@ set -e; case "$1" in
: | pluginhook backup-export 1 $BACKUP_DIR | tar -cf $BACKUP_TMP_FILE --files-from -
pushd $BACKUP_DIR > /dev/null
ls -d */ | grep -oE '[^/]+' > "$BACKUP_TMP_DIR/.dokku_backup_apps"
find . -maxdepth 1 -type d -not -name . | sed 's:./::g' > "$BACKUP_TMP_DIR/.dokku_backup_apps"
popd > /dev/null
# we want to insert the files in the root of the tar
@@ -24,9 +26,9 @@ set -e; case "$1" in
# if no file specified, output to stdout
if [[ -z $OUTPUT_FILE ]]; then
cat $BACKUP_TMP_FILE
cat $BACKUP_TMP_FILE
else
mv $BACKUP_TMP_FILE $OUTPUT_FILE
mv $BACKUP_TMP_FILE $OUTPUT_FILE
fi
rm -rf $BACKUP_TMP_DIR
@@ -48,14 +50,14 @@ set -e; case "$1" in
tar xf $INPUT_FILE --directory=$BACKUP_TMP_DIR
if [[ ! -f $BACKUP_TMP_DIR/.dokku_backup_version ]]; then
echo "Unable to determine backup version"
exit 1
echo "Unable to determine backup version"
exit 1
fi
VERSION=$(< $BACKUP_TMP_DIR/.dokku_backup_version)
if [[ $VERSION -ne 1 ]]; then
echo "Unknown format version $VERSION"
exit 1
echo "Unknown format version $VERSION"
exit 1
fi
echo "Importing a version $VERSION backup..."
@@ -83,12 +85,15 @@ set -e; case "$1" in
echo "Import complete."
;;
help)
help | backup:help)
cat && cat<<EOF
backup:export [file] Export dokku configuration files
backup:import [file] Import dokku configuration files
backup:export [file], Export dokku configuration files
backup:import [file], Import dokku configuration files
EOF
;;
esac
*)
exit $DOKKU_NOT_IMPLEMENTED_EXIT
;;
esac

Some files were not shown because too many files have changed in this diff Show More