Compare commits
517 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c4622a8255 | ||
|
|
c31133687c | ||
|
|
9be1f21e5f | ||
|
|
1b3b7175cc | ||
|
|
e739138ab5 | ||
|
|
f00930224e | ||
|
|
16372845a8 | ||
|
|
02cde31efb | ||
|
|
d6205bff14 | ||
|
|
aacfcbcb3e | ||
|
|
990431be3d | ||
|
|
ef2bbc60df | ||
|
|
e5eb99276f | ||
|
|
11f618d30c | ||
|
|
5b4b608a5d | ||
|
|
1106212f18 | ||
|
|
eb8afc4f34 | ||
|
|
9fdfb07c9b | ||
|
|
5d4a9f9d6d | ||
|
|
6f68943c94 | ||
|
|
da2d00cf46 | ||
|
|
d26f8941bb | ||
|
|
9265bd8e37 | ||
|
|
d654c75a6b | ||
|
|
45f05615c4 | ||
|
|
7ccfdabc48 | ||
|
|
c3f39fe512 | ||
|
|
07786f5a15 | ||
|
|
0841888b67 | ||
|
|
344162da5e | ||
|
|
e6b9283a6a | ||
|
|
5002f46bb8 | ||
|
|
f7c00d06ca | ||
|
|
7ac284bdb6 | ||
|
|
54708637cd | ||
|
|
e3df81f020 | ||
|
|
f26b3f1966 | ||
|
|
7cfeb090ed | ||
|
|
6171cc881b | ||
|
|
befb5a0dd9 | ||
|
|
c731480360 | ||
|
|
be8853e01f | ||
|
|
1243e50c6d | ||
|
|
3acf446f2b | ||
|
|
d498177cdc | ||
|
|
e642a4eb85 | ||
|
|
d60a58ffdd | ||
|
|
3bbb3f22a8 | ||
|
|
3a1335dd2d | ||
|
|
4bdbb54573 | ||
|
|
45d9d7f951 | ||
|
|
9d3f9f55f7 | ||
|
|
e8fc4dc2e3 | ||
|
|
5fe1b5b34b | ||
|
|
03c2218b88 | ||
|
|
35dca5570f | ||
|
|
8f9c003a9f | ||
|
|
a00a9219da | ||
|
|
87d1af753a | ||
|
|
3ef5c993af | ||
|
|
14aad665b3 | ||
|
|
8b90a2c453 | ||
|
|
c57207447e | ||
|
|
992301e9eb | ||
|
|
a506fd5b20 | ||
|
|
a9358eaed7 | ||
|
|
eb4e3485fe | ||
|
|
ab8063e88a | ||
|
|
c3f90add8c | ||
|
|
600d872b76 | ||
|
|
5a084d899c | ||
|
|
e0e9c3f72c | ||
|
|
a27cd84905 | ||
|
|
b644e04038 | ||
|
|
0e779e98c0 | ||
|
|
f46650d289 | ||
|
|
204031306f | ||
|
|
6e4ad6311b | ||
|
|
36ed8e1fa8 | ||
|
|
b861f98868 | ||
|
|
e23e491967 | ||
|
|
4e4c8cebc4 | ||
|
|
5fe9e19865 | ||
|
|
9923199760 | ||
|
|
776f1e4e58 | ||
|
|
8dc5617104 | ||
|
|
c42cde0fb1 | ||
|
|
98ec2979ea | ||
|
|
36ee71cb0a | ||
|
|
6f9662af50 | ||
|
|
83a8cd2f53 | ||
|
|
e3463613d4 | ||
|
|
3651e56ca5 | ||
|
|
434951028d | ||
|
|
45e1a20d01 | ||
|
|
59f9b50112 | ||
|
|
a1e166065f | ||
|
|
89d1997d63 | ||
|
|
f3edf7dcd5 | ||
|
|
03fb58b961 | ||
|
|
97a55cd063 | ||
|
|
65b9c2103f | ||
|
|
3dfe6f67eb | ||
|
|
9454971b1d | ||
|
|
8e3710f69c | ||
|
|
fc0ab27332 | ||
|
|
b930ed9600 | ||
|
|
5a8a4fe75c | ||
|
|
4f17e0fa04 | ||
|
|
60a44c88af | ||
|
|
edd7c3c248 | ||
|
|
6f04d84b59 | ||
|
|
926a752e31 | ||
|
|
cc05a64fbe | ||
|
|
159e6e8c98 | ||
|
|
080b7b98bd | ||
|
|
c16e75197f | ||
|
|
828404c285 | ||
|
|
5983a1e673 | ||
|
|
12360639bb | ||
|
|
f01afb541d | ||
|
|
1d08888234 | ||
|
|
e61f55671c | ||
|
|
53fac6d5dd | ||
|
|
1cbdde748e | ||
|
|
cb9c5b6988 | ||
|
|
124e331e52 | ||
|
|
117bb9ea96 | ||
|
|
1f1efe97e1 | ||
|
|
b2fac23d58 | ||
|
|
2474c87bbd | ||
|
|
115b939071 | ||
|
|
9dfeb16329 | ||
|
|
b3b1f12e69 | ||
|
|
372802f834 | ||
|
|
be3574136b | ||
|
|
8ffbbffb53 | ||
|
|
2732dda770 | ||
|
|
de550094da | ||
|
|
0d4560177a | ||
|
|
c93396aff9 | ||
|
|
85bdeaf47a | ||
|
|
a441a7ac00 | ||
|
|
9093827424 | ||
|
|
9d387fd666 | ||
|
|
81f444c807 | ||
|
|
a269f8e003 | ||
|
|
514ebf4d84 | ||
|
|
5337a3a479 | ||
|
|
f4f2c1e4db | ||
|
|
002e3b457d | ||
|
|
714da78df6 | ||
|
|
3de1c73592 | ||
|
|
920c4d5011 | ||
|
|
c6776c5e49 | ||
|
|
d9e90f0128 | ||
|
|
fa6084786b | ||
|
|
cab258d75a | ||
|
|
002bc3d80e | ||
|
|
ce04cb14ac | ||
|
|
2a62763cc1 | ||
|
|
d743a27de8 | ||
|
|
93d42c0aa8 | ||
|
|
391dc39e95 | ||
|
|
b2fd5676eb | ||
|
|
4a74156e88 | ||
|
|
01d65fccdd | ||
|
|
fb2c7af9e1 | ||
|
|
9aef528edc | ||
|
|
c8405ddf34 | ||
|
|
d2854b9e90 | ||
|
|
2d0374ec52 | ||
|
|
283ed52520 | ||
|
|
0c5123410b | ||
|
|
9b28d80e95 | ||
|
|
fc452e90d4 | ||
|
|
bdc3353a5c | ||
|
|
fa9c09ee7d | ||
|
|
f58ae52886 | ||
|
|
43e3c51f3f | ||
|
|
371949f4ec | ||
|
|
164f48913f | ||
|
|
6286962c5c | ||
|
|
0ae459a933 | ||
|
|
64c5a24919 | ||
|
|
72f1a85459 | ||
|
|
3dccf814e8 | ||
|
|
b10de90682 | ||
|
|
905b3028b4 | ||
|
|
0c62804b1d | ||
|
|
6f6f2b6f9a | ||
|
|
7848ab2a8c | ||
|
|
c940b7f979 | ||
|
|
3ae6b3f1a8 | ||
|
|
35947100b8 | ||
|
|
29847b7ab6 | ||
|
|
f623a0a8bf | ||
|
|
a05792b363 | ||
|
|
b615e55ec5 | ||
|
|
388642e388 | ||
|
|
edc0961e19 | ||
|
|
8c7a031061 | ||
|
|
a45da81396 | ||
|
|
900943a1b6 | ||
|
|
49b48a6828 | ||
|
|
a4b2447c85 | ||
|
|
a9617f23ce | ||
|
|
2e9b1c9bd6 | ||
|
|
24aef3781e | ||
|
|
47db01550f | ||
|
|
ef5a0a3524 | ||
|
|
39ab116bac | ||
|
|
b26da8e3a5 | ||
|
|
4c976d8097 | ||
|
|
04ec0ff5c4 | ||
|
|
866e55d436 | ||
|
|
50060df55c | ||
|
|
3dc4724e60 | ||
|
|
d24031ab49 | ||
|
|
d69fa55b7d | ||
|
|
55747cfea8 | ||
|
|
59c9207797 | ||
|
|
b4481cfd3a | ||
|
|
d21f5811d1 | ||
|
|
4bf29f276a | ||
|
|
7eba7bf722 | ||
|
|
7f0ac9bbee | ||
|
|
7e4dea82f5 | ||
|
|
aa74315389 | ||
|
|
b7bb766f53 | ||
|
|
ae972cf3cd | ||
|
|
b20a91d24f | ||
|
|
bd8ca6ca5c | ||
|
|
1b690d4d49 | ||
|
|
10e05635a7 | ||
|
|
4625db771e | ||
|
|
6543f5d11c | ||
|
|
f0000a18ba | ||
|
|
80d13234f9 | ||
|
|
f6c1ad1b8f | ||
|
|
2f5fce36e4 | ||
|
|
8d14d15acc | ||
|
|
3cc1b42160 | ||
|
|
2a76f7c3b3 | ||
|
|
2b019aef2f | ||
|
|
7dc6d449bd | ||
|
|
a7ec68e107 | ||
|
|
3192f9b724 | ||
|
|
3decb4e780 | ||
|
|
a1ae7d76f4 | ||
|
|
47dfde16f5 | ||
|
|
99632b7141 | ||
|
|
424827d813 | ||
|
|
b7d1f54bd5 | ||
|
|
bc93e5da17 | ||
|
|
71a8142ed9 | ||
|
|
688cb910dd | ||
|
|
d3b4c49d17 | ||
|
|
25422a4a2a | ||
|
|
62143b1fa1 | ||
|
|
a522adfecb | ||
|
|
83f4df3017 | ||
|
|
3df37bcc99 | ||
|
|
4b0163103e | ||
|
|
bd7deae883 | ||
|
|
d4cf23ec07 | ||
|
|
bdd2b4bfe5 | ||
|
|
ecd47dcdeb | ||
|
|
3762b7b9f9 | ||
|
|
98ef078d33 | ||
|
|
a79cd7aebf | ||
|
|
aa345fad01 | ||
|
|
ed06b8961e | ||
|
|
8e2a3783ce | ||
|
|
d9ab4d1424 | ||
|
|
833db67f25 | ||
|
|
01f370ab82 | ||
|
|
9d4a288579 | ||
|
|
b6f9672d40 | ||
|
|
8f8ee9c5da | ||
|
|
9effe275bd | ||
|
|
c1ae280a78 | ||
|
|
ce3aa4b93e | ||
|
|
fcefd4a29b | ||
|
|
4f8c1b64c9 | ||
|
|
2ece0e1bf8 | ||
|
|
1216a5e65a | ||
|
|
aca2540651 | ||
|
|
2cb20f3fd0 | ||
|
|
946756bd43 | ||
|
|
d74006b51a | ||
|
|
e6dfdc0732 | ||
|
|
21d0859253 | ||
|
|
2b19881f01 | ||
|
|
39375342e0 | ||
|
|
ab94a9fc67 | ||
|
|
ff18e0d6be | ||
|
|
6c1d6225f9 | ||
|
|
99c56ccd6d | ||
|
|
f99aa2b128 | ||
|
|
a43fc39d9a | ||
|
|
6be1fd33cd | ||
|
|
5e9df3a92d | ||
|
|
5c741696fc | ||
|
|
8e30722c1e | ||
|
|
cd48505922 | ||
|
|
24cab65d9c | ||
|
|
dc8acc0da6 | ||
|
|
0297dd9e1f | ||
|
|
e4268148cf | ||
|
|
f226dc7c27 | ||
|
|
b71c5b668f | ||
|
|
30ae651a59 | ||
|
|
d2ee0994c0 | ||
|
|
1e5a8b146c | ||
|
|
6bf9ef0aa5 | ||
|
|
100afca1ca | ||
|
|
9a29cc59a8 | ||
|
|
6c08b9b343 | ||
|
|
48965e05bd | ||
|
|
2c1f32199a | ||
|
|
1e0c585b74 | ||
|
|
0c58aeaa52 | ||
|
|
2cedc19b2a | ||
|
|
9bb554e5bc | ||
|
|
4aab4dcfcf | ||
|
|
d4660d9fe9 | ||
|
|
9a7d4fb402 | ||
|
|
d302316549 | ||
|
|
327db3d07a | ||
|
|
1cba46f3a1 | ||
|
|
54c5d0dfa6 | ||
|
|
ef59ff38f6 | ||
|
|
683113ef78 | ||
|
|
79a7342808 | ||
|
|
eab69bd6d5 | ||
|
|
b1deb45c81 | ||
|
|
5ff73995f2 | ||
|
|
e0f6435d86 | ||
|
|
2565ea1543 | ||
|
|
cb8a9648c9 | ||
|
|
17f7708226 | ||
|
|
166f7f38e4 | ||
|
|
74e861417e | ||
|
|
0487083f37 | ||
|
|
3c6982a942 | ||
|
|
6760a2d143 | ||
|
|
a9fd2cdbf6 | ||
|
|
377412f9f8 | ||
|
|
848f92ef7f | ||
|
|
8bbb210a10 | ||
|
|
401a42f5c4 | ||
|
|
5a99b8f0ed | ||
|
|
346efbfdd8 | ||
|
|
498f0eda22 | ||
|
|
c268432bc3 | ||
|
|
a833688355 | ||
|
|
4917330b79 | ||
|
|
4d91b2085e | ||
|
|
29c69f9f86 | ||
|
|
476429a7db | ||
|
|
2d045d1ae1 | ||
|
|
9bd0c69dac | ||
|
|
b232f7cd49 | ||
|
|
904dfb64aa | ||
|
|
a5ef53f2f5 | ||
|
|
88db4daa62 | ||
|
|
56dde3ff31 | ||
|
|
2da58ff351 | ||
|
|
af48605054 | ||
|
|
66790e3d82 | ||
|
|
2c201a7d6f | ||
|
|
78d2b3e7d2 | ||
|
|
9b60f0c3c6 | ||
|
|
668437a9e5 | ||
|
|
5f30115796 | ||
|
|
5c6e39d2c0 | ||
|
|
6a9d9f212f | ||
|
|
599bd59c6f | ||
|
|
e4dd40bbcc | ||
|
|
325b9258e4 | ||
|
|
8cef6b2074 | ||
|
|
fe00835aa7 | ||
|
|
ad0d2b1f6d | ||
|
|
c27b0c08ed | ||
|
|
c73094615e | ||
|
|
989ea72490 | ||
|
|
d9e1548683 | ||
|
|
e474d49320 | ||
|
|
e4d916c308 | ||
|
|
e30c01c234 | ||
|
|
9ae9c7ad11 | ||
|
|
ea240f117e | ||
|
|
68fb0e7b98 | ||
|
|
9d74f1ecf2 | ||
|
|
2356dbd594 | ||
|
|
7aa48d3426 | ||
|
|
b8b4f6fedf | ||
|
|
25a2801cb1 | ||
|
|
86ef6ae5d1 | ||
|
|
4e99078ac1 | ||
|
|
7de160b64d | ||
|
|
99030a110c | ||
|
|
ee18909935 | ||
|
|
4f621916a7 | ||
|
|
f89f946c40 | ||
|
|
8e34477c96 | ||
|
|
5940e43c85 | ||
|
|
c1c76362e7 | ||
|
|
a034ec9803 | ||
|
|
2da4f5ef03 | ||
|
|
d7386317fc | ||
|
|
851ca592d5 | ||
|
|
9d584ed145 | ||
|
|
ac1c4dc571 | ||
|
|
32505b14e7 | ||
|
|
1bcd76ffe9 | ||
|
|
565cd5c0e8 | ||
|
|
8597b692ee | ||
|
|
e9447a26d9 | ||
|
|
17a602efe8 | ||
|
|
7b1bc522f6 | ||
|
|
64f83f976e | ||
|
|
cb9efa3322 | ||
|
|
28f83ab0d5 | ||
|
|
be13b0149a | ||
|
|
e73c89abc8 | ||
|
|
7a36ecf196 | ||
|
|
33dd90a091 | ||
|
|
c67a4dcc7d | ||
|
|
546551e6e9 | ||
|
|
bd4aee0864 | ||
|
|
06d18b4cbd | ||
|
|
075de78442 | ||
|
|
3cead25acf | ||
|
|
559347f985 | ||
|
|
613679352b | ||
|
|
d6c7682068 | ||
|
|
4cd847fb27 | ||
|
|
58e3556e0e | ||
|
|
500a6dd73b | ||
|
|
7d3571757d | ||
|
|
26ee0d7ae2 | ||
|
|
13f7727fe3 | ||
|
|
8a14b34446 | ||
|
|
6a39fd70e1 | ||
|
|
fff050c71d | ||
|
|
61327620da | ||
|
|
80cc57caa0 | ||
|
|
55f38414d1 | ||
|
|
96da38a8e4 | ||
|
|
25b144e496 | ||
|
|
478f5e34d3 | ||
|
|
47dfa921cd | ||
|
|
c162f57dbd | ||
|
|
92073eda12 | ||
|
|
bb9b36b291 | ||
|
|
8b93d9bf54 | ||
|
|
d7566daacc | ||
|
|
7b8cefbadc | ||
|
|
579ffa5a62 | ||
|
|
c6fa061604 | ||
|
|
fd811b020a | ||
|
|
9ae2ab105b | ||
|
|
1a94a62fe3 | ||
|
|
a13a0df35e | ||
|
|
f6bdd948b1 | ||
|
|
1ceee12fc4 | ||
|
|
dbacfed855 | ||
|
|
3ac21ae9a3 | ||
|
|
7985e93e29 | ||
|
|
4230e816df | ||
|
|
ae3aae9af8 | ||
|
|
67d7a64a51 | ||
|
|
cdc327b777 | ||
|
|
3c9a1d488b | ||
|
|
72d46ba64b | ||
|
|
d9feca5606 | ||
|
|
f29f4294c7 | ||
|
|
db94fcb6b4 | ||
|
|
4945bd79ca | ||
|
|
22d053c9d0 | ||
|
|
6482ae164c | ||
|
|
7900a2e97e | ||
|
|
95993955c5 | ||
|
|
6b48b250a7 | ||
|
|
66ad41f814 | ||
|
|
a36d35d752 | ||
|
|
89d1a9751c | ||
|
|
841c8c22d7 | ||
|
|
cb9d98a819 | ||
|
|
a62bae8c7c | ||
|
|
344a63b956 | ||
|
|
0ea44cfafb | ||
|
|
1948a41949 | ||
|
|
50e928b685 | ||
|
|
7352cd05c5 | ||
|
|
94980c8394 | ||
|
|
ba66a42891 | ||
|
|
1ec1a6cd7d | ||
|
|
58eb6f3c54 | ||
|
|
78e106cff2 | ||
|
|
1cf82a6020 | ||
|
|
7938bd08ae | ||
|
|
20312ffa4b | ||
|
|
539b765e21 | ||
|
|
36edeb2401 | ||
|
|
58af2417e2 | ||
|
|
5fc97e9553 | ||
|
|
3e868a41e9 | ||
|
|
2e7dde73ab | ||
|
|
c72d337f69 | ||
|
|
a8c1b728d2 | ||
|
|
f073ebe4cd | ||
|
|
5bc3e14eb4 | ||
|
|
6548cc4477 | ||
|
|
e64daa18cf |
7
.gitignore
vendored
@@ -1,6 +1,7 @@
|
||||
.vagrant
|
||||
*.deb
|
||||
.DS_Store
|
||||
.ruby-version
|
||||
.vagrant
|
||||
data/
|
||||
stack.tgz
|
||||
tmp
|
||||
*.deb
|
||||
.ruby-version
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# How to contribute
|
||||
|
||||
Dokku loves to welcome your contributions. There are several ways to help out:
|
||||
The Dokku project would love to welcome your contributions. There are
|
||||
several ways to help out:
|
||||
|
||||
* Create an [issue](https://github.com/dokku/dokku/issues) on GitHub, if you
|
||||
have found a bug
|
||||
@@ -8,6 +9,9 @@ Dokku loves to welcome your contributions. There are several ways to help out:
|
||||
* Write patches for open bug/feature issues, preferably with test cases
|
||||
included
|
||||
* Contribute to the [documentation](http://dokku.viewdocs.io/dokku/)
|
||||
* Come up with new ways to show off our [lovely logo](https://avatars1.githubusercontent.com/u/13455795)
|
||||
* Blog about different ways you are using dokku
|
||||
* [Sponsor](https://opencollective.com/dokku#support) the Dokku project financially
|
||||
|
||||
There are a few guidelines that we need contributors to follow so that we have
|
||||
a chance of keeping on top of things.
|
||||
@@ -40,10 +44,10 @@ A great way to contribute to the project is to send a detailed report when you
|
||||
encounter an issue. We always appreciate a well-written, thorough bug report,
|
||||
and will thank you for it!
|
||||
|
||||
Sometimes dokku is missing a feature you need. In some cases, those features can
|
||||
Sometimes Dokku is missing a feature you need. In some cases, those features can
|
||||
be found in pre-existing [plugins](http://dokku.viewdocs.io/dokku/plugins/),
|
||||
and we encourage our users to create and contribute such packages. From time to
|
||||
time, we will also pull plugins into the dokku core when the task they solve is
|
||||
time, we will also pull plugins into the Dokku core when the task they solve is
|
||||
a common one for our users.
|
||||
|
||||
Check that [our issue database](https://github.com/dokku/dokku/issues)
|
||||
@@ -70,7 +74,7 @@ Our Issue Report Template is available [here](https://github.com/dokku/dokku/blo
|
||||
|
||||
## Contributing
|
||||
|
||||
Before you contribute to the dokku project, there are a few things that you'll
|
||||
Before you contribute to the Dokku project, there are a few things that you'll
|
||||
need to do
|
||||
|
||||
* Make sure you have a [GitHub account](https://github.com/signup/free).
|
||||
@@ -118,7 +122,7 @@ All changes should be be based on the latest master commit.
|
||||
|
||||
### When will my change be merged?
|
||||
|
||||
Be patient! The dokku maintainers will review all pull requests and comment as
|
||||
Be patient! The Dokku maintainers will review all pull requests and comment as
|
||||
quickly as possible. There may be some back and forth while the details of your
|
||||
pull request are discussed.
|
||||
|
||||
|
||||
339
HISTORY.md
@@ -1,5 +1,344 @@
|
||||
# History
|
||||
|
||||
## 0.7.2
|
||||
|
||||
This minor release contains mostly documentation changes, and should be fully backwards compatible with previous 0.7.x releases.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2392: @swg Specify python2 for get_json functions
|
||||
- #2408: @jcscottiii Use $DOKKU_VHOST_ENABLE instead of $VHOST_ENABLE in bootstrap.sh
|
||||
- #2417: @PWAckerman Remove extra quotes from DYNO environment variable
|
||||
- #2426: @michaelshobbs add force option on docker tag when available
|
||||
|
||||
### New Features
|
||||
|
||||
- #2418: @michaelshobbs Update to plugn 0.2.2
|
||||
- #2423: @michaelshobbs Update to herokuish 0.3.19
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2393: @josegonzalez Deprecate all process manager plugins
|
||||
- #2394: @josegonzalez Deprecate old graphite plugin and add official graphite plugin
|
||||
- #2395: @josegonzalez Deprecate sekjun9878/redis
|
||||
- #2396: @josegonzalez Deprecate multi-buildpack plugin
|
||||
- #2397: @josegonzalez Update compatibility of dokku feature plugin
|
||||
- #2398: @josegonzalez Update compatibility of "other plugins"
|
||||
- #2404: @bascht Fix docker build syntax in image tags documentation
|
||||
- #2405: @josegonzalez Fully document the ps plugin
|
||||
- #2409: @josegonzalez Document caveats around ps:rebuild and tags/tar deployed applications
|
||||
- #2416: @njaxx Adds a mention of manually adding nginx entry
|
||||
- #2420: @c990802 Update command example for consistency
|
||||
- #2410: @IlyaSemenov Clarify domains help, improve domains unit tests
|
||||
- #2429: @enisozgen Minor documentation fixes
|
||||
- #2431: @josegonzalez Add missing redirect for deployment/deployment-tasks
|
||||
|
||||
## 0.7.1
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2348: @josegonzalez Correct the version in use for ssh-keys
|
||||
- #2369: @u2mejc Fix ssh-keys:add permission error
|
||||
- #2377: @ebeigarts Do not use http_proxy env variables for CHECKS
|
||||
- #2360: @xadh00m Allow hyphen in TLD
|
||||
- #2387: @michaelshobbs Silence find warnings under Ubuntu 16.04
|
||||
- #2390: @josegonzalez Actually stop the dokku-installer service
|
||||
|
||||
### New Features
|
||||
|
||||
- #2358: @josegonzalez Guard against poodle vulnerability by default
|
||||
- #2385: @michaelshobbs Actually merge dokku-app-user into core
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2337: @josegonzalez Update deprecated plugins list
|
||||
- #2352: @miguelcobain Fix typos in plugin-triggers docs
|
||||
- #2353: @miguelcobain Add a note about making plugins executable
|
||||
- #2345: @johnfraney Update list of officially supported distributions
|
||||
- #2354: @josegonzalez Dockerfile deploys do not support mounted volumes
|
||||
- #2371: @michaelshobbs Moved some plugin repos to michaelshobbs
|
||||
- #2381: @michaelshobbs Fail rest of bats file on first test failure
|
||||
- #2382: @alexgleason Fix typo "exampple" to "example"
|
||||
- #2386: @josegonzalez Add a migration guide for 0.7.0
|
||||
- #2388: @josegonzalez Add documentation for proxy ports scheme handling
|
||||
- #2389: @josegonzalez Add plugin management documentation
|
||||
|
||||
|
||||
## 0.7.0
|
||||
|
||||
Another great minor release! There are no known backwards incompatibilities with this release, though the following may be of interest to our users:
|
||||
|
||||
- #2316 #2326: Support for setting the correct user/group permissions on files stored in persistent storage
|
||||
- #2290: Container restart policy support in the core
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2302: @u2mejc Fix is_valid_hostname regex
|
||||
- #2331: @josegonzalez Fix repo plugin version
|
||||
- #2334: @josegonzalez Cleanup image retrieval
|
||||
- #2332: @josegonzalez Properly handle non-deployed applications during apps:rename
|
||||
|
||||
### New Features
|
||||
|
||||
- #2316: @michaelshobbs Use default privileged user in herokuish-0.3.17
|
||||
- #2335: @xtian Update herokuish to 0.3.18
|
||||
- #2317: @josegonzalez Properly remap http port 80 mappings to https 443 when adding an ssl certificate
|
||||
- #2290: @josegonzalez Implement restart-policy handling
|
||||
- #2287: @u2mejc Add ssh-keys core plugin
|
||||
- #2283: @xadh00m Add support for multiple global domains
|
||||
- #2277: @josegonzalez Add support for config values with double-quotes
|
||||
- #2273: @josegonzalez Add the ability to manually execute checks against an application
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2308: @josegonzalez Clarify that nginx.conf.sigil is only extracted from repo root for buildpack applications
|
||||
- #2314: @dm-wyncode Add flags to apt-get command in unattended docs so that the installation is truly unattended
|
||||
- #2315: @smaffulli Adding DreamHost Cloud installation with cloud-init
|
||||
- #2325: @fanminjian Update to without -qq for proper Grub prompt.
|
||||
- #2326: @josegonzalez Document the user and group id to use for persistent storage permissions
|
||||
- #2336: @josegonzalez Clarify documentation
|
||||
|
||||
## 0.6.5
|
||||
|
||||
This was a big documentation release with a minor bugfix to the `app.json` functionality introduced in 0.5.0.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2301: @michaelshobbs Fix app.json extraction in dockerfile apps not using /app
|
||||
|
||||
### New Features
|
||||
|
||||
- #2297: @josegonzalez Add plugin trigger to override the image repository
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2296: @josegonzalez Add an example plugin trigger for cache busting Dockerfile builds
|
||||
- #2295: @josegonzalez Add documentation for the apps, repo, and tar plugin
|
||||
- #2292: @josegonzalez General documentation cleanup
|
||||
- #2291: @josegonzalez Clean up documentation surrounding persistent storage
|
||||
- #2289: @PeterDaveHello Optimize png images using zopflipng
|
||||
- #2282: @prodicus Fixed link to sponsors doc
|
||||
|
||||
## 0.6.4
|
||||
|
||||
Included in this release are a couple of bug fixes for existing features.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2275: @sseemayer Prefer file import in certs:add if files given
|
||||
- #2279: @michaelshobbs Only attempt to stop a checks-disabled container if it is actually running
|
||||
|
||||
### New Features
|
||||
|
||||
- #2270: @guillaumewuip Allow apps:destroy when not in a project
|
||||
- #2271: @josegonzalez Handle purging the dokku user, group, and logs directory during `apt-get purge`
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2272: @josegonzalez Add documentation surrounding when the /app/.env file is populated
|
||||
|
||||
## 0.6.3
|
||||
|
||||
This release is mostly a documentation release.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2258: @michaelshobbs Support domains that start with digits per RFC1123
|
||||
|
||||
### New Features
|
||||
|
||||
- #2260: @josegonzalez Add ability to remove a specific port mapping tuple
|
||||
- #2261: @josegonzalez Drop apparmor requirement to support systemd systems
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2262: @josegonzalez Document that REV is optional in the receive-app trigger
|
||||
- #2264: @troy Use Markdown for sponsors page, so it's clickable from GitHub
|
||||
- #2266: @michaelshobbs Add documentation surrounding proxy port mapping
|
||||
|
||||
## 0.6.2
|
||||
|
||||
This release is a minor bugfix for the web setup, and also reverts a previous addition to the persistent storage. Please see the pull requests for more details.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2256: @michaelshobbs Revert automatically binding storage mounts in build phase
|
||||
- #2259: @andrewsomething Don't run DeleteInstallerThread() until after set_debconf_selection
|
||||
|
||||
## 0.6.1
|
||||
|
||||
This release is a minor bugfix to fix an issue with ssl support for spdy-enabled nginx servers. Users are encouraged to upgrade if they have an older version of nginx installed.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2250: @michaelshobbs Fix missing $ sign in default nginx template
|
||||
|
||||
## 0.6.0
|
||||
|
||||
The big-six-o. This release is largely comprised of new features that should allow for easier management of dokku. The highlights of this release are:
|
||||
|
||||
- The proxy plugin has been enhanced to allow users to map container ports to host ports. In the 0.5.0 release, we changed the semantics of how Dockerfile `EXPOSE` calls work to better follow Docker's lead, which ended up breaking how some applications were deployed to dokku. Please read our documentation surrounding [port management](http://dokku.viewdocs.io/dokku/proxy/) for more details.
|
||||
- Zero-downtime deploys can be disabled on a per-app and per-process basis. This can be used to speed up deploys when there are non-web processes being deployed, or when a user wishes to completely avoid any such waiting period. Please see the [checks documentation](http://dokku.viewdocs.io/dokku/checks-examples/) for further information.
|
||||
|
||||
Thanks to all the contributors who helped with this release, and a special thanks to @michaelshobbs for ferrying the majority of our new functionality to it's current state!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2241: @josegonzalez Set debconf selections from dokku-installer.py
|
||||
- #2242: @michaelshobbs Avoid calling dokku binary
|
||||
- #2243: @josegonzalez Nginx 1.9.5+ support
|
||||
|
||||
### New Features
|
||||
|
||||
- #2018: @pascalw Support running Procfile commands using `dokku run`
|
||||
- #2050: @josegonzalez Implement repo:gc and repo:purge-cache
|
||||
- #2109: @josegonzalez Allow user to modify the repository and tag when deploying an app
|
||||
- #2168: @michaelshobbs Allow zero-downtime deploys to be completely disabled
|
||||
- #2248: @michaelshobbs Allow users to map container ports to host ports via the proxy plugin
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2209: @piamancini Added backers and sponsors from OpenCollective
|
||||
- #2244: @basgys Add InfluxDB to plugins
|
||||
|
||||
## 0.5.8
|
||||
|
||||
This release is the last release in the `0.5.x` series, and as such is mainly a bugfix release. Users are highly encouraged to upgrade to this release *before* moving to the upcoming `0.6.x` release, as we will be removing deprecated features at that point.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2214: @michaelshobbs Remove git push from client
|
||||
- #2220: @josegonzalez Remove DOKKU_PROCFILE before attempting to extract it
|
||||
- #2227: @michaelshobbs Pass image tag from release_and_deploy down through extract_procfile
|
||||
- #2228: @michaelshobbs Support WORKDIR location for DOKKU_SCALE
|
||||
- #2229: @hansmi Fix removal of domains with schema
|
||||
- #2234: @michaelshobbs Cleanup container state files when a process type is removed from app
|
||||
- #2236: @michaelshobbs Hide unnecessary output from is_image_herokuish_based()
|
||||
- #2233: @josegonzalez Lintian cleanup
|
||||
|
||||
### New Features
|
||||
|
||||
- #2205: @josegonzalez Fix lintian errors in built debian packages
|
||||
- #2223: @josegonzalez De-duplicate nginx restarting
|
||||
- #2237: @michaelshobbs Reject invalid domains in domains:add
|
||||
- #2238: @michaelshobbs Mount storage mounts on build for buildpack deploys
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2212: @jbothma Warn and instruct users about unsafe publicly-accessible web installer
|
||||
- #2222: @michaelshobbs Move nginx upstream blocks to the bottom in docs examples
|
||||
|
||||
## 0.5.7
|
||||
|
||||
0.5.7 includes quite a few documentation updates, and a few minor changes in how we handle certain edge-cases in day-to-day dokku tasks.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2157: @michaelshobbs test detached container is running
|
||||
- #2170: @jvanbaarsen Do not fail domains:add when adding a duplicated domain
|
||||
- #2171: @tobru Continue to restore applications during boot when any given application does not start
|
||||
- #2173: @michaelshobbs Add test for ps:restore with undeployed app
|
||||
- #2202: @michaelshobbs Attempt to bypass inconsistencies in nginx start behavior
|
||||
|
||||
### New Features
|
||||
|
||||
- #2155: @josegonzalez Add the ability to run containers in detached mode
|
||||
- #2163: @michaelshobbs Support deployment of arbitrary docker images not built by dokku build
|
||||
- #2175: @michaelshobbs Show available types and ids on dokku enter error
|
||||
- #2193: @josegonzalez Upgrade herokuish version built via deb packaging
|
||||
- #2203: Allow specifying NO_INSTALL_RECOMMENDS via DOKKU_NO_INSTALL_RECOMMENDS in bootstrapped installs
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2164: @iloveitaly Adding longtimeout and hostname to dokku plugin list
|
||||
- #2167: @iloveitaly Adding link to rollbar plugin
|
||||
- #2182: @cu12 Add link to FakeSNS plugin
|
||||
- #2183: @Epigene Update nginx docs to mirror generated nginx.conf from core
|
||||
- #2187: @pltchuong Add missing trigger to plugin triggers documentation
|
||||
- #2190: @cu12 Add ElasticMQ plugin to documentation
|
||||
- #2191: @josegonzalez Clarify upgrade docs for bootstrap.sh installations
|
||||
- #2192: @josegonzalez Clarify that the checks are only run against the web process
|
||||
- #2194: @josegonzalez Clarify the role of process types for buildpack deployment
|
||||
- #2195: @josegonzalez Clarify when certain plugin triggers are invoked
|
||||
|
||||
## 0.5.6
|
||||
|
||||
Release 0.5.6 is mostly a documentation release. Please note, however, that we now inject application environment variables into sigil-generated nginx configurations. You can use this to further improve your generated nginx configuration files.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2120: @u2mejc Add apex help_content for certs,nginx,storage,tar plugins
|
||||
- #2122: @michaelshobbs Add 10.0.0.2 so *.dokku.me works
|
||||
- #2145: @michaelshobbs Fix dockerfile-procfile test
|
||||
|
||||
### New Features
|
||||
|
||||
- #2150: @michaelshobbs export app config vars into sigil environment for use in nginx templates
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2099: @ojosdegris Added clarification on configuration via separate files
|
||||
- #2107: @simenbrekken Add CI deployment recipe
|
||||
- #2112: @josegonzalez Alphabetize triggers
|
||||
- #2114: @josegonzalez Add table of contents to sidebar when there is a table of contents
|
||||
- #2115: @josegonzalez Document potential dockerfile/nginx.conf.sigil issues
|
||||
- #2116: @josegonzalez Warn users when there is a low memory condition on installation
|
||||
- #2127: @crisward Added dokku require plugin
|
||||
- #2129: @christiangenco Condense upgrading instructions
|
||||
- #2136: @josegonzalez Use `sleep infinity` for enter cron task
|
||||
- #2142: @Aluxian Add dokku-nginx-cache to the list of plugins
|
||||
|
||||
## 0.5.5
|
||||
|
||||
Release 0.5.5 is mostly a documentation release, further clarifying how our default proxy implementation (nginx) interacts with Dockerfiles. Note that we also updated how ssl certificates interact with application domains, so please check out our domains and ssl documentation.
|
||||
|
||||
We've also added a small section to the [dokku homepage](http://dokku.viewdocs.io/dokku/) that lists the current core team. Feel free to look at their beautiful faces and imagine yourself contributing to Dokku and joining our core team. There are [quite a few ways to contribute](https://github.com/dokku/dokku/blob/master/CONTRIBUTING.md) - even without code/documentation - so feel more than free to jump on the bandwagon!
|
||||
|
||||
Finally, we've started an [Official Dokku Blog](https://dokku.github.io/), where we will post about dokku internals, roadmaps, potential use-cases, etc. An rss feed is available [here](https://dokku.github.io/feed.xml).
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2094: @josegonzalez Create storage directories on install. Closes #2091
|
||||
- #2102: @josegonzalez Only strip .git directory from end of url
|
||||
|
||||
### New Features
|
||||
|
||||
- #2088: @josegonzalez Upgrade herokuish package
|
||||
- #2089: @michaelshobbs Update how ssl and multiple domains interact
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2076: @josegonzalez Add a note to dockerfile deploys concerning ports being exposed as http
|
||||
- #2080: @michaelshobbs Clarify the need for contents of dockerfile when debugging
|
||||
- #2082: @michaelshobbs Add use case example for ssl redirect
|
||||
- #2083: @louisbl Clarify 0.5.0 migration guide about `EXPOSE`
|
||||
- #2084: @louisbl Clarify where to put nginx custom template without `WORKDIR`
|
||||
- #2093: @fwolfst Fix path in storage example
|
||||
- #2098: @josegonzalez Add a blog link to the header area
|
||||
- #2100: @kane-c Fix docs navigation link to domain configuration
|
||||
- #2104: @crisward Added new clone plugin
|
||||
- #2105: @josegonzalez Add a note about how disabling the proxy affects the host port an application is deployed to
|
||||
|
||||
## 0.5.4
|
||||
|
||||
This release continues on our tradition of making bugfixes in patch releases. Also note that we now release dokku with `sshcommand` version `0.4.0`, which should increase usability of that package quite a bit.
|
||||
|
||||
@@ -15,18 +15,18 @@ Output of the following commands
|
||||
(BEWARE: `docker inspect` will print environment variables for some commands, be sure you're not exposing any sensitive information when posting issues. You may replace these values with XXXXXXX):
|
||||
- `cat /home/dokku/<app>/nginx.conf` (if applicable):
|
||||
- Link to the exact repository being deployed (if possible/applicable):
|
||||
- If a deploy is failing:
|
||||
- If a deploy is failing or behaving unexpectedly:
|
||||
- Application name
|
||||
- The type of application being deployed (node, php, python, ruby, etc.)
|
||||
- Whether or not you have a `Dockerfile` in the root of your repository
|
||||
- If using buildpacks, which custom buildpacks are in use
|
||||
- If using a `Dockerfile`, the contents of that file
|
||||
- If it exists, the contents of your `Procfile`.
|
||||
- Output of failing dokku commands after running `dokku trace on`
|
||||
- Output of failing Dokku commands after running `dokku trace on`
|
||||
(BEWARE: `trace on` will print environment variables for some commands, be sure you're not exposing any sensitive information when posting issues. You may replace these values with XXXXXXX):
|
||||
|
||||
Environment details (AWS, VirtualBox, physical, etc.):
|
||||
|
||||
How was dokku installed?:
|
||||
How was Dokku installed?:
|
||||
|
||||
How reproducible:
|
||||
|
||||
|
||||
8
Makefile
@@ -1,7 +1,7 @@
|
||||
DOKKU_VERSION = master
|
||||
|
||||
SSHCOMMAND_URL ?= https://raw.githubusercontent.com/dokku/sshcommand/v0.4.0/sshcommand
|
||||
PLUGN_URL ?= https://github.com/dokku/plugn/releases/download/v0.2.1/plugn_0.2.1_linux_x86_64.tgz
|
||||
SSHCOMMAND_URL ?= https://raw.githubusercontent.com/dokku/sshcommand/v0.6.0/sshcommand
|
||||
PLUGN_URL ?= https://github.com/dokku/plugn/releases/download/v0.2.2/plugn_0.2.2_linux_x86_64.tgz
|
||||
SIGIL_URL ?= https://github.com/gliderlabs/sigil/releases/download/v0.4.0/sigil_0.4.0_Linux_x86_64.tgz
|
||||
STACK_URL ?= https://github.com/gliderlabs/herokuish.git
|
||||
PREBUILT_STACK_URL ?= gliderlabs/herokuish:latest
|
||||
@@ -62,10 +62,10 @@ copyfiles:
|
||||
PLUGIN_PATH=${CORE_PLUGINS_PATH} plugn enable $$plugin ;\
|
||||
PLUGIN_PATH=${PLUGINS_PATH} plugn enable $$plugin ;\
|
||||
done
|
||||
chown dokku:dokku -R ${PLUGINS_PATH} ${CORE_PLUGINS_PATH}
|
||||
chown dokku:dokku -R ${PLUGINS_PATH} ${CORE_PLUGINS_PATH} || true
|
||||
$(MAKE) addman
|
||||
|
||||
addman:
|
||||
addman: help2man
|
||||
mkdir -p /usr/local/share/man/man1
|
||||
help2man -Nh help -v version -n "configure and get information from your dokku installation" -o /usr/local/share/man/man1/dokku.1 dokku
|
||||
mandb
|
||||
|
||||
92
README.md
@@ -1,21 +1,24 @@
|
||||
# Dokku [](https://circleci.com/gh/dokku/dokku/tree/master) [](https://packagecloud.io/dokku/dokku) [](https://webchat.freenode.net/?channels=dokku) [](https://glider-slackin.herokuapp.com/) [](http://dokku.viewdocs.io/dokku/) [](https://gratipay.com/dokku/)
|
||||
# Dokku [](https://circleci.com/gh/dokku/dokku/tree/master) [](https://packagecloud.io/dokku/dokku) [](https://aur.archlinux.org/packages/dokku/) [](https://webchat.freenode.net/?channels=dokku) [](https://glider-slackin.herokuapp.com/) [](http://dokku.viewdocs.io/dokku/)
|
||||
[](#sponsors)
|
||||
[](#backers)
|
||||
[](https://gratipay.com/dokku/)
|
||||
|
||||
Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen. Sponsored by our friends at [Deis](http://deis.io/).
|
||||
Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen.
|
||||
|
||||
## Requirements
|
||||
|
||||
- A fresh VM running Ubuntu `14.04 x64`
|
||||
- A fresh VM running `Debian 8.2 x64`, `Ubuntu 14.04 x64`, or `Ubuntu 16.04 x64`
|
||||
|
||||
## Installing
|
||||
|
||||
To install the latest stable release, you can run the following commands as a user that has access to `sudo`:
|
||||
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.5.4/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.5.4 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.7.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.7.2 bash bootstrap.sh
|
||||
|
||||
### Upgrading
|
||||
|
||||
[View the docs for upgrading](http://dokku.viewdocs.io/dokku/upgrading) from an older version of Dokku.
|
||||
[View the docs for upgrading](http://dokku.viewdocs.io/dokku/getting-started/upgrading/) from an older version of Dokku.
|
||||
|
||||
## Documentation
|
||||
|
||||
@@ -23,17 +26,86 @@ Full documentation - including advanced installation docs - are available online
|
||||
|
||||
## Support
|
||||
|
||||
You can use [Github Issues](https://github.com/dokku/dokku/issues), check [Troubleshooting](http://dokku.viewdocs.io/dokku/troubleshooting) in the documentation, or join us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku)
|
||||
You can use [Github Issues](https://github.com/dokku/dokku/issues), check [Troubleshooting](http://dokku.viewdocs.io/dokku/getting-started/troubleshooting/) in the documentation, or join us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku)
|
||||
|
||||
## Contribution
|
||||
|
||||
After checking [Github Issues](https://github.com/dokku/dokku/issues), the [Troubleshooting Guide](http://dokku.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.
|
||||
After checking [Github Issues](https://github.com/dokku/dokku/issues), the [Troubleshooting Guide](http://dokku.viewdocs.io/dokku/getting-started/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.
|
||||
|
||||
While we may not merge your PR as is, they serve to start conversations and improve the general dokku experience for all users.
|
||||
While we may not merge your PR as is, they serve to start conversations and improve the general Dokku experience for all users.
|
||||
|
||||
## Sponsors
|
||||
|
||||
Dokku is currently sponsored by the enterprise grade, multi-host PaaS project [Deis](http://deis.io/).
|
||||
See our list of past sponsors in the [SPONSORS](https://github.com/dokku/dokku/blob/master/SPONSORS.md) file.
|
||||
|
||||
Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/dokku#sponsor)]
|
||||
|
||||
<a href="https://opencollective.com/dokku/sponsor/0/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/1/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/2/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/3/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/4/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/4/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/5/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/5/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/6/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/6/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/7/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/7/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/8/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/9/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/9/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/10/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/10/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/11/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/11/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/12/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/12/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/13/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/13/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/14/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/14/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/15/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/15/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/16/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/16/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/17/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/17/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/18/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/18/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/19/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/19/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/20/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/20/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/21/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/21/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/22/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/22/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/23/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/23/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/24/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/24/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/25/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/25/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/26/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/26/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/27/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/27/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/28/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/28/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/29/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/29/avatar.svg"></a>
|
||||
|
||||
|
||||
## Backers
|
||||
|
||||
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/dokku#backer)]
|
||||
|
||||
<a href="https://opencollective.com/dokku/backer/0/website" target="_blank"><img src="https://opencollective.com/dokku/backer/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/1/website" target="_blank"><img src="https://opencollective.com/dokku/backer/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/2/website" target="_blank"><img src="https://opencollective.com/dokku/backer/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/3/website" target="_blank"><img src="https://opencollective.com/dokku/backer/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/4/website" target="_blank"><img src="https://opencollective.com/dokku/backer/4/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/5/website" target="_blank"><img src="https://opencollective.com/dokku/backer/5/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/6/website" target="_blank"><img src="https://opencollective.com/dokku/backer/6/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/7/website" target="_blank"><img src="https://opencollective.com/dokku/backer/7/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/8/website" target="_blank"><img src="https://opencollective.com/dokku/backer/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/9/website" target="_blank"><img src="https://opencollective.com/dokku/backer/9/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/10/website" target="_blank"><img src="https://opencollective.com/dokku/backer/10/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/11/website" target="_blank"><img src="https://opencollective.com/dokku/backer/11/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/12/website" target="_blank"><img src="https://opencollective.com/dokku/backer/12/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/13/website" target="_blank"><img src="https://opencollective.com/dokku/backer/13/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/14/website" target="_blank"><img src="https://opencollective.com/dokku/backer/14/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/15/website" target="_blank"><img src="https://opencollective.com/dokku/backer/15/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/16/website" target="_blank"><img src="https://opencollective.com/dokku/backer/16/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/17/website" target="_blank"><img src="https://opencollective.com/dokku/backer/17/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/18/website" target="_blank"><img src="https://opencollective.com/dokku/backer/18/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/19/website" target="_blank"><img src="https://opencollective.com/dokku/backer/19/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/20/website" target="_blank"><img src="https://opencollective.com/dokku/backer/20/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/21/website" target="_blank"><img src="https://opencollective.com/dokku/backer/21/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/22/website" target="_blank"><img src="https://opencollective.com/dokku/backer/22/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/23/website" target="_blank"><img src="https://opencollective.com/dokku/backer/23/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/24/website" target="_blank"><img src="https://opencollective.com/dokku/backer/24/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/25/website" target="_blank"><img src="https://opencollective.com/dokku/backer/25/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/26/website" target="_blank"><img src="https://opencollective.com/dokku/backer/26/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/27/website" target="_blank"><img src="https://opencollective.com/dokku/backer/27/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/28/website" target="_blank"><img src="https://opencollective.com/dokku/backer/28/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/29/website" target="_blank"><img src="https://opencollective.com/dokku/backer/29/avatar.svg"></a>
|
||||
|
||||
## License
|
||||
|
||||
|
||||
5
SPONSORS.md
Normal file
@@ -0,0 +1,5 @@
|
||||
[Deis](http://deis.io)
|
||||
|
||||
[DigitalOcean](https://www.digitalocean.com/)
|
||||
|
||||
[Melvin Lammerts](http://dokku.net)
|
||||
2
Vagrantfile
vendored
@@ -82,7 +82,7 @@ Vagrant::configure("2") do |config|
|
||||
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 deb-all"
|
||||
vm.vm.provision :shell, :inline => "export IS_RELEASE=true && cd /root/dokku && make deb-all"
|
||||
end
|
||||
|
||||
config.vm.define "build-arch", autostart: false do |vm|
|
||||
|
||||
11
bootstrap.sh
@@ -12,6 +12,7 @@ set -eo pipefail; [[ $TRACE ]] && set -x
|
||||
# It also means that we can't run a partially downloaded script.
|
||||
|
||||
ensure-environment() {
|
||||
local FREE_MEMORY
|
||||
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://dokku.viewdocs.io/dokku/advanced-installation/"
|
||||
@@ -22,6 +23,12 @@ ensure-environment() {
|
||||
echo "This installation script requires that you have a hostname set for the instance. Please set a hostname for 127.0.0.1 in your /etc/hosts"
|
||||
exit 1
|
||||
}
|
||||
|
||||
FREE_MEMORY=$(grep MemTotal /proc/meminfo | awk '{print $2}')
|
||||
if [[ "$FREE_MEMORY" -lt 1003600 ]]; then
|
||||
echo "For dokku to build containers, it is strongly suggested that you have 1024 megabytes or more of free memory"
|
||||
echo "If necessary, please consult this document to setup swap: http://dokku.viewdocs.io/dokku/advanced-installation/#vms-with-less-than-1gb-of-memory"
|
||||
fi
|
||||
}
|
||||
|
||||
install-requirements() {
|
||||
@@ -78,7 +85,7 @@ install-dokku-from-source() {
|
||||
|
||||
install-dokku-from-package() {
|
||||
local DOKKU_CHECKOUT="$1"
|
||||
local NO_INSTALL_RECOMMENDS=""
|
||||
local NO_INSTALL_RECOMMENDS=${DOKKU_NO_INSTALL_RECOMMENDS:=""}
|
||||
|
||||
if [[ -n $DOKKU_DOCKERFILE ]]; then
|
||||
NO_INSTALL_RECOMMENDS=" --no-install-recommends "
|
||||
@@ -102,7 +109,7 @@ install-dokku-from-package() {
|
||||
echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ trusty main" | tee /etc/apt/sources.list.d/dokku.list
|
||||
apt-get update -qq > /dev/null
|
||||
|
||||
[[ -n $DOKKU_VHOST_ENABLE ]] && echo "dokku dokku/vhost_enable boolean $VHOST_ENABLE" | sudo debconf-set-selections
|
||||
[[ -n $DOKKU_VHOST_ENABLE ]] && echo "dokku dokku/vhost_enable boolean $DOKKU_VHOST_ENABLE" | sudo debconf-set-selections
|
||||
[[ -n $DOKKU_WEB_CONFIG ]] && echo "dokku dokku/web_config boolean $DOKKU_WEB_CONFIG" | sudo debconf-set-selections
|
||||
[[ -n $DOKKU_HOSTNAME ]] && echo "dokku dokku/hostname string $DOKKU_HOSTNAME" | sudo debconf-set-selections
|
||||
[[ -n $DOKKU_SKIP_KEY_FILE ]] && echo "dokku dokku/skip_key_file boolean $DOKKU_SKIP_KEY_FILE" | sudo debconf-set-selections
|
||||
|
||||
@@ -11,6 +11,8 @@ dependencies:
|
||||
override:
|
||||
- ./tests/ci/parallel_runner.sh setup: { timeout: 300 }
|
||||
- echo "export DOKKU_SKIP_CLEANUP=true" > /home/dokku/.dokkurc/dokku_skip_cleanup
|
||||
# dokku.me now resolves to 10.0.0.2. add 10.0.0.2/24 to eth0
|
||||
- sudo ip a a 10.0.0.2/24 broadcast 10.0.0.255 dev eth0
|
||||
post:
|
||||
- sudo -E make -e lint
|
||||
test:
|
||||
|
||||
@@ -9,7 +9,7 @@ import subprocess
|
||||
import sys
|
||||
import threading
|
||||
|
||||
VERSION = 'v0.5.4'
|
||||
VERSION = 'v0.7.2'
|
||||
|
||||
hostname = ''
|
||||
try:
|
||||
@@ -86,8 +86,10 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||
'REQUEST_METHOD': 'POST',
|
||||
'CONTENT_TYPE': self.headers['Content-Type']})
|
||||
|
||||
vhost_enable = 'false'
|
||||
dokku_root = os.getenv('DOKKU_ROOT', '/home/dokku')
|
||||
if 'vhost' in params and params['vhost'].value == 'true':
|
||||
vhost_enable = 'true'
|
||||
with open('{0}/VHOST'.format(dokku_root), 'w') as f:
|
||||
f.write(params['hostname'].value)
|
||||
else:
|
||||
@@ -98,7 +100,6 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||
with open('{0}/HOSTNAME'.format(dokku_root), 'w') as f:
|
||||
f.write(params['hostname'].value)
|
||||
|
||||
|
||||
command = ['sshcommand', 'acl-add', 'dokku', 'admin']
|
||||
for key in params['keys'].value.split("\n"):
|
||||
proc = subprocess.Popen(command, stdin=subprocess.PIPE)
|
||||
@@ -106,6 +107,11 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||
proc.stdin.close()
|
||||
proc.wait()
|
||||
|
||||
set_debconf_selection('boolean', 'skip_key_file', 'true')
|
||||
set_debconf_selection('boolean', 'vhost_enable', vhost_enable)
|
||||
set_debconf_selection('boolean', 'web_config', 'false')
|
||||
set_debconf_selection('string', 'hostname', params['hostname'].value)
|
||||
|
||||
if 'selfdestruct' in sys.argv:
|
||||
DeleteInstallerThread()
|
||||
|
||||
@@ -114,6 +120,28 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||
self.wfile.write(json.dumps({'status': 'ok'}))
|
||||
|
||||
|
||||
def set_debconf_selection(debconf_type, key, value):
|
||||
found = False
|
||||
with open('/etc/os-release', 'r') as f:
|
||||
for line in f:
|
||||
if 'debian' in line:
|
||||
found = True
|
||||
|
||||
if not found:
|
||||
return
|
||||
|
||||
ps = subprocess.Popen(['echo', 'dokku dokku/{0} {1} {2}'.format(
|
||||
key, debconf_type, value
|
||||
)], stdout=subprocess.PIPE)
|
||||
|
||||
try:
|
||||
subprocess.check_output(['debconf-set-selections'], stdin=ps.stdout)
|
||||
except subprocess.CalledProcessError:
|
||||
pass
|
||||
|
||||
ps.wait()
|
||||
|
||||
|
||||
class DeleteInstallerThread(object):
|
||||
def __init__(self, interval=1):
|
||||
thread = threading.Thread(target=self.run, args=())
|
||||
@@ -127,7 +155,7 @@ class DeleteInstallerThread(object):
|
||||
except:
|
||||
pass
|
||||
|
||||
command = "rm -f /etc/init/dokku-installer.conf /etc/systemd/system/dokku-installer.service && stop dokku-installer"
|
||||
command = "rm -f /etc/init/dokku-installer.conf /etc/systemd/system/dokku-installer.service && (stop dokku-installer || systemctl stop dokku-installer.service)"
|
||||
try:
|
||||
subprocess.call(command, shell=True)
|
||||
except:
|
||||
@@ -190,7 +218,7 @@ PAGE = """
|
||||
$.post('/setup', data)
|
||||
.done(function() {
|
||||
$("#result").html("Success!")
|
||||
window.location.href = "http://progrium.viewdocs.io/dokku/application-deployment";
|
||||
window.location.href = "http://progrium.viewdocs.io/dokku/deployment/application-deployment/";
|
||||
})
|
||||
.fail(function(data) {
|
||||
$("#result").html("Something went wrong...")
|
||||
|
||||
@@ -33,6 +33,14 @@ client_help_msg() {
|
||||
exit 20 # exit with specific status. only used in units tests for now
|
||||
}
|
||||
|
||||
is_git_repo() {
|
||||
git rev-parse &>/dev/null
|
||||
}
|
||||
|
||||
has_dokku_remote() {
|
||||
git remote show | grep dokku
|
||||
}
|
||||
|
||||
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)
|
||||
@@ -79,11 +87,9 @@ if [[ ! -z $DOKKU_HOST ]]; then
|
||||
echo "! Dokku remote not added! Do you already have a dokku remote?"
|
||||
return
|
||||
fi
|
||||
git push dokku master
|
||||
return $?
|
||||
;;
|
||||
apps:destroy)
|
||||
git remote remove dokku
|
||||
is_git_repo && has_dokku_remote && git remote remove dokku
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
115
deb.mk
@@ -1,34 +1,57 @@
|
||||
HEROKUISH_DESCRIPTION = 'Herokuish uses Docker and Buildpacks to build applications like Heroku'
|
||||
HEROKUISH_REPO_NAME ?= gliderlabs/herokuish
|
||||
HEROKUISH_VERSION ?= 0.3.9
|
||||
HEROKUISH_VERSION ?= 0.3.19
|
||||
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_DESCRIPTION = 'Docker powered PaaS that helps you build and manage the lifecycle of applications'
|
||||
DOKKU_REPO_NAME ?= dokku/dokku
|
||||
DOKKU_ARCHITECTURE = amd64
|
||||
|
||||
PLUGN_DESCRIPTION = 'Hook system that lets users extend your application with plugins'
|
||||
define PLUGN_DESCRIPTION
|
||||
Hook system that lets users extend your application with plugins
|
||||
Plugin triggers are simply scripts that are executed by the system.
|
||||
You can use any language you want, so long as the script is
|
||||
executable and has the proper language requirements installed
|
||||
endef
|
||||
PLUGN_REPO_NAME ?= dokku/plugn
|
||||
PLUGN_VERSION ?= 0.2.1
|
||||
PLUGN_VERSION ?= 0.2.2
|
||||
PLUGN_ARCHITECTURE = amd64
|
||||
PLUGN_PACKAGE_NAME = plugn_$(PLUGN_VERSION)_$(PLUGN_ARCHITECTURE).deb
|
||||
PLUGN_URL = https://github.com/dokku/plugn/releases/download/v$(PLUGN_VERSION)/plugn_$(PLUGN_VERSION)_linux_x86_64.tgz
|
||||
|
||||
SSHCOMMAND_DESCRIPTION = 'Turn SSH into a thin client specifically for your app'
|
||||
define SSHCOMMAND_DESCRIPTION
|
||||
Turn SSH into a thin client specifically for your app
|
||||
Simplifies running a single command over SSH, and
|
||||
manages authorized keys (ACL) and users in order to do so.
|
||||
endef
|
||||
SSHCOMMAND_REPO_NAME ?= dokku/sshcommand
|
||||
SSHCOMMAND_VERSION ?= 0.4.0
|
||||
SSHCOMMAND_VERSION ?= 0.6.0
|
||||
SSHCOMMAND_ARCHITECTURE = amd64
|
||||
SSHCOMMAND_PACKAGE_NAME = sshcommand_$(SSHCOMMAND_VERSION)_$(SSHCOMMAND_ARCHITECTURE).deb
|
||||
SSHCOMMAND_URL ?= https://raw.githubusercontent.com/dokku/sshcommand/v$(SSHCOMMAND_VERSION)/sshcommand
|
||||
|
||||
SIGIL_DESCRIPTION = 'Standalone string interpolator and template processor'
|
||||
define SIGIL_DESCRIPTION
|
||||
Standalone string interpolator and template processor
|
||||
Sigil is a command line tool for template processing
|
||||
and POSIX-compliant variable expansion. It was created
|
||||
for configuration templating, but can be used for any
|
||||
text processing.
|
||||
endef
|
||||
SIGIL_REPO_NAME ?= gliderlabs/sigil
|
||||
SIGIL_VERSION ?= 0.4.0
|
||||
SIGIL_ARCHITECTURE = amd64
|
||||
SIGIL_PACKAGE_NAME = sigil_$(SIGIL_VERSION)_$(SIGIL_ARCHITECTURE).deb
|
||||
SIGIL_PACKAGE_NAME = gliderlabs_sigil_$(SIGIL_VERSION)_$(SIGIL_ARCHITECTURE).deb
|
||||
SIGIL_URL = https://github.com/gliderlabs/sigil/releases/download/v$(SIGIL_VERSION)/sigil_$(SIGIL_VERSION)_Linux_x86_64.tgz
|
||||
|
||||
ifndef IS_RELEASE
|
||||
IS_RELEASE = true
|
||||
endif
|
||||
|
||||
export PLUGN_DESCRIPTION
|
||||
export SIGIL_DESCRIPTION
|
||||
export SSHCOMMAND_DESCRIPTION
|
||||
|
||||
.PHONY: install-from-deb deb-all deb-herokuish deb-dokku deb-plugn deb-setup deb-sshcommand deb-sigil
|
||||
|
||||
install-from-deb:
|
||||
@@ -45,18 +68,18 @@ install-from-deb:
|
||||
sudo apt-get update -qq > /dev/null
|
||||
sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get install -yy dokku
|
||||
|
||||
deb-all: deb-herokuish deb-dokku deb-plugn deb-sshcommand deb-sigil
|
||||
deb-all: deb-setup deb-herokuish deb-dokku deb-plugn deb-sshcommand deb-sigil
|
||||
mv /tmp/*.deb .
|
||||
@echo "Done"
|
||||
|
||||
deb-setup:
|
||||
@echo "-> Updating deb repository and installing build requirements"
|
||||
@sudo apt-get update -qq > /dev/null
|
||||
@sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get install -qq -y gcc git ruby-dev ruby1.9.1 > /dev/null 2>&1
|
||||
@sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get install -qq -y gcc git build-essential wget ruby-dev ruby1.9.1 lintian > /dev/null 2>&1
|
||||
@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
|
||||
deb-herokuish:
|
||||
rm -rf /tmp/tmp /tmp/build $(HEROKUISH_PACKAGE_NAME)
|
||||
mkdir -p /tmp/tmp /tmp/build
|
||||
|
||||
@@ -72,7 +95,7 @@ deb-herokuish: deb-setup
|
||||
@echo "sudo docker build -t gliderlabs/herokuish /var/lib/herokuish 1> /dev/null" >> /tmp/tmp/post-install
|
||||
|
||||
@echo "-> Cloning repository"
|
||||
git clone -q "https://github.com/$(HEROKUISH_REPO_NAME).git" /tmp/tmp/herokuish > /dev/null
|
||||
git clone -q "https://github.com/$(HEROKUISH_REPO_NAME).git" --branch "v$(HEROKUISH_VERSION)" /tmp/tmp/herokuish > /dev/null
|
||||
rm -rf /tmp/tmp/herokuish/.git /tmp/tmp/herokuish/.gitignore
|
||||
|
||||
@echo "-> Copying files into place"
|
||||
@@ -83,19 +106,21 @@ deb-herokuish: deb-setup
|
||||
sudo fpm -t deb -s dir -C /tmp/build -n herokuish -v $(HEROKUISH_VERSION) -a $(HEROKUISH_ARCHITECTURE) -p $(HEROKUISH_PACKAGE_NAME) --deb-pre-depends 'docker-engine-cs (>= 1.9.1) | docker-engine (>= 1.9.1)' --deb-pre-depends sudo --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
|
||||
deb-dokku:
|
||||
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/core-plugins/available
|
||||
mkdir -p /tmp/build/usr/share/man/man1
|
||||
mkdir -p /tmp/build/usr/share/dokku/contrib
|
||||
mkdir -p /tmp/build/usr/bin
|
||||
mkdir -p /tmp/build/usr/share/doc/dokku
|
||||
mkdir -p /tmp/build/usr/share/dokku/contrib
|
||||
mkdir -p /tmp/build/usr/share/lintian/overrides
|
||||
mkdir -p /tmp/build/usr/share/man/man1
|
||||
mkdir -p /tmp/build/var/lib/dokku/core-plugins/available
|
||||
|
||||
cp dokku /tmp/build/usr/local/bin
|
||||
cp dokku /tmp/build/usr/bin
|
||||
cp LICENSE /tmp/build/usr/share/doc/dokku/copyright
|
||||
find . -name ".DS_Store" -depth -exec rm {} \;
|
||||
cp -r plugins/* /tmp/build/var/lib/dokku/core-plugins/available
|
||||
find plugins/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read plugin; do touch /tmp/build/var/lib/dokku/core-plugins/available/$$plugin/.core; done
|
||||
$(MAKE) help2man
|
||||
@@ -105,24 +130,38 @@ deb-dokku: deb-setup
|
||||
cp contrib/dokku-installer.py /tmp/build/usr/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
|
||||
ifneq (,$(findstring false,$(IS_RELEASE)))
|
||||
sed -i.bak -e "s/^/`date +%s`:/" /tmp/build/var/lib/dokku/STABLE_VERSION && rm /tmp/build/var/lib/dokku/STABLE_VERSION.bak
|
||||
endif
|
||||
rm /tmp/build/DEBIAN/lintian-overrides
|
||||
mv debian/lintian-overrides /tmp/build/usr/share/lintian/overrides/dokku
|
||||
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
|
||||
dpkg-deb --build /tmp/build "/tmp/dokku_`cat /tmp/build/var/lib/dokku/STABLE_VERSION`_$(DOKKU_ARCHITECTURE).deb"
|
||||
lintian "/tmp/dokku_`cat /tmp/build/var/lib/dokku/STABLE_VERSION`_$(DOKKU_ARCHITECTURE).deb"
|
||||
|
||||
deb-plugn: deb-setup
|
||||
deb-plugn:
|
||||
rm -rf /tmp/tmp /tmp/build $(PLUGN_PACKAGE_NAME)
|
||||
mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/local/bin
|
||||
mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/bin
|
||||
|
||||
@echo "-> Downloading package"
|
||||
wget -q -O /tmp/tmp/plugn-$(PLUGN_VERSION).tgz $(PLUGN_URL)
|
||||
cd /tmp/tmp/ && tar zxf /tmp/tmp/plugn-$(PLUGN_VERSION).tgz
|
||||
|
||||
@echo "-> Copying files into place"
|
||||
cp /tmp/tmp/plugn /tmp/build/usr/local/bin/plugn && chmod +x /tmp/build/usr/local/bin/plugn
|
||||
cp /tmp/tmp/plugn /tmp/build/usr/bin/plugn && chmod +x /tmp/build/usr/bin/plugn
|
||||
|
||||
@echo "-> Creating $(PLUGN_PACKAGE_NAME)"
|
||||
sudo fpm -t deb -s dir -C /tmp/build -n plugn -v $(PLUGN_VERSION) -a $(PLUGN_ARCHITECTURE) -p $(PLUGN_PACKAGE_NAME) --url "https://github.com/$(PLUGN_REPO_NAME)" --description $(PLUGN_DESCRIPTION) --license 'MIT License' .
|
||||
sudo fpm -t deb -s dir -C /tmp/build -n plugn \
|
||||
--version $(PLUGN_VERSION) \
|
||||
--architecture $(PLUGN_ARCHITECTURE) \
|
||||
--package $(PLUGN_PACKAGE_NAME) \
|
||||
--url "https://github.com/$(PLUGN_REPO_NAME)" \
|
||||
--maintainer "Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>" \
|
||||
--category utils \
|
||||
--description "$$PLUGN_DESCRIPTION" \
|
||||
--license 'MIT License' \
|
||||
.
|
||||
mv *.deb /tmp
|
||||
|
||||
deb-sshcommand:
|
||||
@@ -138,20 +177,38 @@ deb-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' .
|
||||
sudo fpm -t deb -s dir -C /tmp/build -n sshcommand \
|
||||
--version $(SSHCOMMAND_VERSION) \
|
||||
--architecture $(SSHCOMMAND_ARCHITECTURE) \
|
||||
--package $(SSHCOMMAND_PACKAGE_NAME) \
|
||||
--url "https://github.com/$(SSHCOMMAND_REPO_NAME)" \
|
||||
--maintainer "Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>" \
|
||||
--category admin \
|
||||
--description "$$SSHCOMMAND_DESCRIPTION" \
|
||||
--license 'MIT License' \
|
||||
.
|
||||
mv *.deb /tmp
|
||||
|
||||
deb-sigil: deb-setup
|
||||
deb-sigil:
|
||||
rm -rf /tmp/tmp /tmp/build $(SIGIL_PACKAGE_NAME)
|
||||
mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/local/bin
|
||||
mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/bin
|
||||
|
||||
@echo "-> Downloading package"
|
||||
wget -q -O /tmp/tmp/sigil-$(SIGIL_VERSION).tgz $(SIGIL_URL)
|
||||
cd /tmp/tmp/ && tar zxf /tmp/tmp/sigil-$(SIGIL_VERSION).tgz
|
||||
|
||||
@echo "-> Copying files into place"
|
||||
cp /tmp/tmp/sigil /tmp/build/usr/local/bin/sigil && chmod +x /tmp/build/usr/local/bin/sigil
|
||||
cp /tmp/tmp/sigil /tmp/build/usr/bin/sigil && chmod +x /tmp/build/usr/bin/sigil
|
||||
|
||||
@echo "-> Creating $(SIGIL_PACKAGE_NAME)"
|
||||
sudo fpm -t deb -s dir -C /tmp/build -n sigil -v $(SIGIL_VERSION) -a $(SIGIL_ARCHITECTURE) -p $(SIGIL_PACKAGE_NAME) --url "https://github.com/$(SIGIL_REPO_NAME)" --description $(SIGIL_DESCRIPTION) --license 'MIT License' .
|
||||
sudo fpm -t deb -s dir -C /tmp/build -n gliderlabs-sigil \
|
||||
--version $(SIGIL_VERSION) \
|
||||
--architecture $(SIGIL_ARCHITECTURE) \
|
||||
--package $(SIGIL_PACKAGE_NAME) \
|
||||
--url "https://github.com/$(SIGIL_REPO_NAME)" \
|
||||
--maintainer "Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>" \
|
||||
--category utils \
|
||||
--description "$$SIGIL_DESCRIPTION" \
|
||||
--license 'MIT License' \
|
||||
.
|
||||
mv *.deb /tmp
|
||||
|
||||
8
debian/config
vendored
@@ -1,6 +1,10 @@
|
||||
#!/bin/sh -e
|
||||
#!/bin/bash
|
||||
set -eo pipefail; [[ $TRACE ]] && set -x
|
||||
|
||||
. /usr/share/debconf/confmodule
|
||||
if [[ -e /usr/share/debconf/confmodule ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
. /usr/share/debconf/confmodule
|
||||
fi
|
||||
|
||||
readonly ACTION="${1:-configure}"
|
||||
readonly VERSION="${2:-dev}"
|
||||
|
||||
9
debian/control
vendored
@@ -1,11 +1,12 @@
|
||||
Package: dokku
|
||||
Version: 0.5.4
|
||||
Version: 0.7.2
|
||||
Section: web
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Depends: locales, git, make, curl, gcc, man-db, sshcommand, sigil, docker-engine-cs (>= 1.9.1) | docker-engine (>= 1.9.1), software-properties-common, python-software-properties
|
||||
Depends: locales, git, make, curl, gcc, man-db, sshcommand, gliderlabs-sigil, docker-engine-cs (>= 1.9.1) | docker-engine (>= 1.9.1), software-properties-common, python-software-properties
|
||||
Recommends: herokuish
|
||||
Pre-Depends: nginx (>= 1.4.6), dnsutils, apparmor, cgroupfs-mount | cgroup-lite, plugn, sudo, python2.7, debconf
|
||||
Pre-Depends: nginx, dnsutils, cgroupfs-mount | cgroup-lite, plugn, sudo, python2.7, debconf
|
||||
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
|
||||
Description: Docker-powered PaaS that helps build and manage the lifecycle of applications
|
||||
|
||||
Dokku is an extensible, open source Platform as a Service
|
||||
that runs on a single server of your choice.
|
||||
|
||||
3
debian/lintian-overrides
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
dokku: command-with-path-in-maintainer-script postinst:16 /usr/bin/sshcommand
|
||||
dokku: maintainer-script-calls-systemctl postinst:87
|
||||
dokku: changelog-file-missing-in-native-package
|
||||
32
debian/postinst
vendored
@@ -1,11 +1,25 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail; [[ $TRACE ]] && set -x
|
||||
|
||||
. /usr/share/debconf/confmodule
|
||||
if [[ -e /usr/share/debconf/confmodule ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
. /usr/share/debconf/confmodule
|
||||
fi
|
||||
|
||||
readonly DOKKU_ROOT="${DOKKU_ROOT:-/home/dokku}"
|
||||
readonly DOKKU_LIB_ROOT="${DOKKU_LIB_PATH:-/var/lib/dokku}"
|
||||
|
||||
call-sshcommand() {
|
||||
if [[ -x /usr/local/bin/sshcommand ]]; then
|
||||
/usr/local/bin/sshcommand "$@"
|
||||
elif [[ -x /usr/bin/sshcommand ]]; then
|
||||
/usr/bin/sshcommand "$@"
|
||||
else
|
||||
echo "Unable to find sshcommand binary" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
;;
|
||||
@@ -14,10 +28,15 @@ case "$1" in
|
||||
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
|
||||
call-sshcommand create dokku /usr/bin/dokku
|
||||
|
||||
egrep -i "^docker" /etc/group || groupadd docker
|
||||
usermod -aG docker dokku
|
||||
|
||||
echo "Setting up storage directories"
|
||||
mkdir -p ${DOKKU_LIB_ROOT}/data ${DOKKU_LIB_ROOT}/data/storage
|
||||
chown dokku:dokku -R ${DOKKU_LIB_ROOT}/data
|
||||
|
||||
echo "Setting up plugin directories"
|
||||
# should be replaced by `plugn init`
|
||||
mkdir -p ${DOKKU_LIB_ROOT}/core-plugins/available ${DOKKU_LIB_ROOT}/plugins/available
|
||||
@@ -46,6 +65,13 @@ case "$1" in
|
||||
find -L ${DOKKU_LIB_ROOT} -type l -delete
|
||||
chown dokku:dokku -R ${DOKKU_LIB_ROOT}/plugins ${DOKKU_LIB_ROOT}/core-plugins
|
||||
|
||||
echo "Ensure proper sshcommand path"
|
||||
echo '/usr/bin/dokku' > "${DOKKU_ROOT}/.sshcommand"
|
||||
if [[ -f .ssh/authorized_keys ]]; then
|
||||
sed -i.bak 's#/usr/local/bin/dokku#/usr/bin/dokku#' "${DOKKU_ROOT}/.ssh/authorized_keys"
|
||||
rm "${DOKKU_ROOT}/.ssh/authorized_keys"
|
||||
fi
|
||||
|
||||
echo "Install all core plugins"
|
||||
dokku plugin:install --core
|
||||
|
||||
@@ -88,7 +114,7 @@ case "$1" in
|
||||
if [ -z "${DEBCONF_RECONFIGURE}" ]; then
|
||||
db_get "dokku/key_file"
|
||||
if [ -f "$RET" ]; then
|
||||
sshcommand acl-add dokku default < "$RET"
|
||||
call-sshcommand acl-add dokku default < "$RET" || true
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
16
debian/postrm
vendored
@@ -1,8 +1,14 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail; [[ $TRACE ]] && set -x
|
||||
|
||||
if [[ -e /usr/share/debconf/confmodule ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
. /usr/share/debconf/confmodule
|
||||
fi
|
||||
|
||||
readonly DOKKU_ROOT="${DOKKU_ROOT:-/home/dokku}"
|
||||
readonly DOKKU_LIB_ROOT="${DOKKU_LIB_PATH:-/var/lib/dokku}"
|
||||
readonly DOKKU_LOGS_DIR="${DOKKU_LOGS_DIR:="/var/log/dokku"}"
|
||||
|
||||
main() {
|
||||
if [[ -f /etc/systemd/system/dokku-installer.conf ]] || [[ -f /etc/init/dokku-installer.conf ]]; then
|
||||
@@ -35,10 +41,12 @@ main() {
|
||||
find ${DOKKU_ROOT} -type d -empty -delete
|
||||
fi
|
||||
|
||||
if [[ -e /usr/share/debconf/confmodule ]]; then
|
||||
. /usr/share/debconf/confmodule
|
||||
db_purge
|
||||
fi
|
||||
rm -rf "${DOKKU_LOGS_DIR}"
|
||||
|
||||
deluser dokku || true
|
||||
delgroup dokku || true
|
||||
|
||||
db_purge
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
5
debian/preinst
vendored
@@ -1,7 +1,10 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail; [[ $TRACE ]] && set -x
|
||||
|
||||
. /usr/share/debconf/confmodule
|
||||
if [[ -e /usr/share/debconf/confmodule ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
. /usr/share/debconf/confmodule
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
install)
|
||||
|
||||
40
docs/advanced-usage/backup-recovery.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# Backup and Recovery
|
||||
|
||||
> The backup plugin was deprecated in 0.4.x, below are backup recommendations for 0.5.x and later.
|
||||
|
||||
## Backup and Migration Tutorial
|
||||
|
||||
Because Dokku is git based, rebuilding a deployed app is as easy as pushing from git. You can push to a new server by updating the `dokku` remote in you local app's repo.
|
||||
|
||||
```shell
|
||||
git remote rm dokku
|
||||
git remote add dokku dokku@[dokku.me:dokku.me]
|
||||
git push dokku [master]
|
||||
```
|
||||
## Databases
|
||||
|
||||
Some plugins, like the official [dokku-postgres](https://github.com/dokku/dokku-postgres) plugin, have built-in commands that allow non-volatile data be exported and imported.
|
||||
|
||||
For [dokku-postgres](https://github.com/dokku/dokku-postgres), use:
|
||||
|
||||
```shell
|
||||
dokku postgres:export [db_name] > [db_name].dump
|
||||
dokku postgres:import [db_name] < [db_name].dump
|
||||
```
|
||||
|
||||
## Volumes and Static Assets
|
||||
|
||||
Dokku doesn't enforce a [300mb](https://devcenter.heroku.com/articles/slug-compiler#slug-size) limit on apps, but it's best practice to keep binary assets outside of git. Since containers are considered volatile in Dokku, external stores like s3 or storage mounts should be used for non-volatile items like user uploads. The Dokku storage core plugin can be used to mount local directories / volumes inside the docker container.
|
||||
|
||||
See the [persistent storage documentation](/dokku/advanced-usage/persistent-storage/) for more details.
|
||||
|
||||
|
||||
## Disaster Recovery
|
||||
|
||||
The best plan for disaster recovery is to always keep multiple (remote) copies of your local repo, static assets and periodic database dumps. In case of an emergency when your git repo and backups are completely lost, you can recover the last pushed copy from your remote Dokku server (assuming you still have the ssh key).
|
||||
|
||||
```shell
|
||||
mkdir [app-name] ; cd !$
|
||||
git init && git remote add dokku dokku@[dokku.me:app-name]
|
||||
git pull dokku/master && git checkout dokku/master
|
||||
```
|
||||
@@ -5,20 +5,21 @@
|
||||
Sometimes you need to run a command on at deployment time, but before an app is completely deployed.
|
||||
Common use cases include:
|
||||
|
||||
* Checking a database is initialised
|
||||
* Checking a database is initialized
|
||||
* Running database migrations
|
||||
* Any commands required to set up the server (e.g. something like a Django `collectstatic`)
|
||||
|
||||
## `app.json` and `scripts.dokku`
|
||||
|
||||
Dokku accomplishes this by using an `app.json` file. We (mostly) use the same format as Heroku's [app.json](https://devcenter.heroku.com/articles/app-json-schema).
|
||||
However, dokku currently only supports the nodes `scripts.dokku.predeploy` and `scripts.dokku.postdeploy`.
|
||||
Simply place an `app.json` file in the root of your repository or for dockerfile apps, `ADD` it to /app.
|
||||
Dokku accomplishes this by using an `app.json` file. The format in use is similar to format of Heroku's [app.json](https://devcenter.heroku.com/articles/app-json-schema).
|
||||
However, Dokku currently only supports the nodes `scripts.dokku.predeploy` and `scripts.dokku.postdeploy`.
|
||||
For buildpack apps, simply place an `app.json` file in the root of your repository.
|
||||
For dockerfile apps, place `app.json` in the configured `WORKDIR` directory; otherwise Dokku defaults to the buildpack app behavior of looking in `/app`.
|
||||
>NOTE: postdeploy changes are *NOT* committed to the app image.
|
||||
|
||||
### Example app.json
|
||||
|
||||
```
|
||||
```json
|
||||
{
|
||||
"name": "barebones nodejs",
|
||||
"description": "A barebones Node.js app using Express 4.",
|
||||
@@ -5,14 +5,14 @@
|
||||
Pass [options](https://docs.docker.com/engine/reference/run/) to Docker during Dokku's `build`, `deploy` and `run` phases
|
||||
|
||||
```
|
||||
docker-options <app> [phase(s)] Display app's Docker options for all phases (or 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)
|
||||
docker-options <app> [phase(s)] # Display app's Docker options for all phases (or 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)
|
||||
```
|
||||
|
||||
> When specifying multiple phases, they **must** be comma-separated _without_ spaces in between each phase, like so:
|
||||
>
|
||||
> ```
|
||||
> ```shell
|
||||
> dokku docker-options:add myapp deploy,run "-v /home/dokku/logs/myapp:/app/logs"
|
||||
> ```
|
||||
|
||||
@@ -28,7 +28,7 @@ Dokku deploys your application in multiple "phases" and the `docker-options` plu
|
||||
|
||||
### Add Docker options
|
||||
|
||||
Add some options for the deployed/running app and when executing [`dokku run`](deployment/one-off-processes/):
|
||||
Add some options for the deployed/running app and when executing [`dokku run`](/dokku/deployment/one-off-processes/):
|
||||
|
||||
```shell
|
||||
# Mount a host volume in a Docker container: "-v /host/path:/container/path"
|
||||
@@ -42,10 +42,13 @@ dokku docker-options:add myapp run "-v /home/dokku/logs/myapp:/app/logs"
|
||||
|
||||
```shell
|
||||
dokku docker-options myapp
|
||||
# Deploy options:
|
||||
# -v /home/dokku/logs/myapp:/app/logs
|
||||
# Run options:
|
||||
# -v /home/dokku/logs/myapp:/app/logs
|
||||
```
|
||||
|
||||
```
|
||||
Deploy options:
|
||||
-v /home/dokku/logs/myapp:/app/logs
|
||||
Run options:
|
||||
-v /home/dokku/logs/myapp:/app/logs
|
||||
```
|
||||
|
||||
### Remove a Docker option
|
||||
@@ -5,22 +5,29 @@
|
||||
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
|
||||
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:
|
||||
|
||||
```shell
|
||||
dokku events:on
|
||||
```
|
||||
|
||||
```
|
||||
$ 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`:
|
||||
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`:
|
||||
|
||||
```shell
|
||||
dokku events
|
||||
```
|
||||
|
||||
```
|
||||
Jul 3 16:09:48 dokku.me dokku[127630]: INVOKED: pre-release-buildpack( pythonapp )
|
||||
@@ -42,6 +49,11 @@ 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`:
|
||||
|
||||
```shell
|
||||
dokku events:list
|
||||
```
|
||||
|
||||
```
|
||||
=====> Events currently logged
|
||||
docker-args-build
|
||||
89
docs/advanced-usage/persistent-storage.md
Normal file
@@ -0,0 +1,89 @@
|
||||
# Persistent Storage
|
||||
|
||||
> New as of 0.5.0
|
||||
|
||||
The preferred method to mount external containers to a Dokku managed container, is to use the Dokku storage plugin.
|
||||
|
||||
|
||||
```
|
||||
storage:list <app> # List bind mounts for app's container(s) (host:container)
|
||||
storage:mount <app> <host-dir:container-dir> # Create a new bind mount
|
||||
storage:unmount <app> <host-dir:container-dir> # Remove an existing bind mount
|
||||
```
|
||||
|
||||
## Ideology and Background
|
||||
|
||||
The storage plugin requires explicit paths on the host side. This is intentional to ensure that new users avoid running into unexpected results with implicit paths that may not exist (a feature deprecate in [Docker 1.9.0](https://github.com/docker/docker/releases/tag/v1.9.0])). The container directory is created for the mount point in the container. Any existing directory contents are not accessible after a mount is added to the container. Dokku creates a new directory `/var/lib/dokku/data/storage` during installation, it's the general consensus that new users should use this directory. Mounts are only available at run and deploy times, you must redeploy (restart) an app to mount or unmount to an existing app's container.
|
||||
|
||||
## Usage
|
||||
|
||||
This example demonstrates how to mount the recommended directory to `/storage` inside the container:
|
||||
|
||||
```shell
|
||||
dokku storage:mount app-name /var/lib/dokku/data/storage:/storage
|
||||
```
|
||||
|
||||
Dokku will then mount the shared contents of `/var/lib/dokku/data/storage` to `/storage` inside the container.
|
||||
|
||||
A more complete workflow may require making a custom directory for your application and mounting it within your `/app/storage` directory instead. The mount point is *not* relative to your application's working directory, and is instead relative to the root of the container.
|
||||
|
||||
```shell
|
||||
# creating storage for the app 'ruby-rails-sample'
|
||||
mkdir -p /var/lib/dokku/data/storage/ruby-rails-sample
|
||||
|
||||
# ensure the proper user has access to this directory
|
||||
chown -R dokku:dokku /var/lib/dokku/data/storage/ruby-rails-sample
|
||||
|
||||
# as of 0.7.x, you should chown using the `32767` user and group id
|
||||
chown -R 32767:32767 /var/lib/dokku/data/storage/ruby-rails-sample
|
||||
|
||||
# mount the directory into your container's /app/storage directory, relative to root
|
||||
dokku storage:mount app-name /var/lib/dokku/data/storage/app-name:/app/storage
|
||||
```
|
||||
|
||||
You can mount one or more directories as desired by following the above pattern.
|
||||
|
||||
## Use Cases
|
||||
|
||||
### Persistent storage
|
||||
|
||||
Dokku is powered by Docker containers, which recommends in their [best practices](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#containers-should-be-ephemeral) that containers be treated as ephemeral. In order to manage persistent storage for web applications, like user uploads or large binary assets like images, a directory outside the container should be mounted.
|
||||
|
||||
### Shared storage between containers
|
||||
|
||||
When scaling your app, you may require a common location to access shared assets between containers, a storage mount can be used in this situation.
|
||||
|
||||
### Shared storage across environments
|
||||
|
||||
Your app may be used in a cluster that requires containers or resources not running on the same host access your data. Mounting a shared file service (like S3FS or EFS) inside your container will give you great flexibility.
|
||||
|
||||
### Backing up
|
||||
|
||||
Your app may have services that are running in memory and need to be backed up locally (like a key store). Mount a non ephemeral storage mount will allow backups that are not lost when the app is shut down.
|
||||
|
||||
### Build phase
|
||||
|
||||
By default, Dokku will only bind storage mounts during the deploy and run phases. Under certain conditions, one might want to bind a storage mount during the build phase. This can be accomplished by using the `docker-options` plugin directly.
|
||||
|
||||
```shell
|
||||
dokku docker-options:add <app> build "-v /tmp/python-test:/opt/test"
|
||||
```
|
||||
|
||||
You cannot use mounted volumes during the build phase of a Dockerfile deploy. This is because Docker does not support volumes when executing `docker build`.
|
||||
|
||||
> Note: **This can cause data loss** if you bind a mount under `/app` in buildpack apps as herokuish will attempt to remove the original app path during the build phase.
|
||||
|
||||
## Docker-Options Note
|
||||
|
||||
The storage plugin is compatible with storage mounts created with the docker-options. The storage plugin will only list mounts from the deploy phase.
|
||||
|
||||
|
||||
> New as of 0.7.1
|
||||
|
||||
## Application User and Persistent Storage file ownership (buildpack apps only)
|
||||
|
||||
By default, Dokku will execute your buildpack application processes as the `herokuishuser` user. You may override this by setting the `DOKKU_APP_USER` config variable.
|
||||
|
||||
> NOTE: this user must exist in your herokuish image.
|
||||
|
||||
Additionally, Dokku will ensure your storage mounts are owned by either `herokuishuser` or the overridden value you have set in `DOKKU_APP_USER`.
|
||||
124
docs/advanced-usage/plugin-management.md
Normal file
@@ -0,0 +1,124 @@
|
||||
# Plugin Management
|
||||
|
||||
> New as of 0.4.0
|
||||
|
||||
```
|
||||
plugin # Print active plugins
|
||||
plugin:disable <name> # Disable an installed plugin (third-party only)
|
||||
plugin:enable <name> # Enable a previously disabled plugin
|
||||
plugin:install [--core|git-url [--committish tag|branch|commit|--name custom-plugin-name]] # Optionally download git-url (with custom tag/committish) & run install trigger for active plugins (or only core ones)
|
||||
plugin:install-dependencies [--core] # Run install-dependencies trigger for active plugins (or only core ones)
|
||||
plugin:uninstall <name> # Uninstall a plugin (third-party only)
|
||||
plugin:update [name [committish]] # Optionally update named plugin from git (with custom tag/committish) & run update trigger for active plugins
|
||||
```
|
||||
|
||||
```shell
|
||||
# for 0.3.x
|
||||
cd /var/lib/dokku/plugins
|
||||
git clone <git url>
|
||||
dokku plugins-install
|
||||
```
|
||||
|
||||
> These commands require `root` permissions as the `install` and `install-dependencies` plugin triggers may utilize commands such as `apt-get`. For non-core plugins, please inspect those plugins before running the following command as `root` user.
|
||||
|
||||
## Usage
|
||||
|
||||
You can list all installed plugins using the `plugin` command:
|
||||
|
||||
```shell
|
||||
dokku plugin
|
||||
```
|
||||
|
||||
```
|
||||
plugn: dev
|
||||
00_dokku-standard 0.7.2 enabled dokku core standard plugin
|
||||
20_events 0.7.2 enabled dokku core events logging plugin
|
||||
apps 0.7.2 enabled dokku core apps plugin
|
||||
build-env 0.7.2 enabled dokku core build-env plugin
|
||||
certs 0.7.2 enabled dokku core certificate management plugin
|
||||
checks 0.7.2 enabled dokku core checks plugin
|
||||
common 0.7.2 enabled dokku core common plugin
|
||||
config 0.7.2 enabled dokku core config plugin
|
||||
docker-options 0.7.2 enabled dokku core docker-options plugin
|
||||
domains 0.7.2 enabled dokku core domains plugin
|
||||
enter 0.7.2 enabled dokku core enter plugin
|
||||
git 0.7.2 enabled dokku core git plugin
|
||||
logs 0.7.2 enabled dokku core logs plugin
|
||||
named-containers 0.7.2 enabled dokku core named containers plugin
|
||||
nginx-vhosts 0.7.2 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.7.2 enabled dokku core plugin plugin
|
||||
proxy 0.7.2 enabled dokku core proxy plugin
|
||||
ps 0.7.2 enabled dokku core ps plugin
|
||||
repo 0.7.2 enabled dokku core repo plugin
|
||||
shell 0.7.2 enabled dokku core shell plugin
|
||||
ssh-keys 0.7.2 enabled dokku core ssh-keys plugin
|
||||
storage 0.7.2 enabled dokku core storage plugin
|
||||
tags 0.7.2 enabled dokku core tags plugin
|
||||
tar 0.7.2 enabled dokku core tar plugin
|
||||
```
|
||||
|
||||
Installing a plugin is easy as well using the `plugin:install` command. This command will also trigger the `install` pluginhook on all existing plugins.
|
||||
|
||||
```shell
|
||||
dokku plugin:install https://github.com/dokku/dokku-postgres.git
|
||||
```
|
||||
|
||||
```
|
||||
-----> Cloning plugin repo https://github.com/dokku/dokku-postgres.git to /var/lib/dokku/plugins/available/postgres
|
||||
Cloning into 'postgres'...
|
||||
remote: Counting objects: 646, done.
|
||||
remote: Total 646 (delta 0), reused 0 (delta 0), pack-reused 646
|
||||
Receiving objects: 100% (646/646), 134.24 KiB | 0 bytes/s, done.
|
||||
Resolving deltas: 100% (406/406), done.
|
||||
Checking connectivity... done.
|
||||
-----> Plugin postgres enabled
|
||||
-----> Migrating zero downtime env variables to 0.5.x. The following variables have been deprecated
|
||||
=====> DOKKU_SKIP_ALL_CHECKS DOKKU_SKIP_DEFAULT_CHECKS
|
||||
=====> Please use dokku checks:[disable|enable] <app> to control zero downtime functionality
|
||||
=====> Migration complete
|
||||
=====>
|
||||
-----> Migrating zero downtime env variables to 0.6.x. The following variables will be migrated
|
||||
=====> DOKKU_CHECKS_ENABLED -> DOKKU_CHECKS_SKIPPED
|
||||
=====> Migration complete
|
||||
=====>
|
||||
Adding user dokku to group adm
|
||||
Starting nginx (via systemctl): nginx.service.
|
||||
```
|
||||
|
||||
You can also uninstall a third-party plugin using the `plugin:uninstall` command:
|
||||
|
||||
```shell
|
||||
dokku plugin:uninstall postgres
|
||||
```
|
||||
|
||||
```
|
||||
-----> Plugin postgres uninstalled
|
||||
```
|
||||
|
||||
Enabling or disabling a plugin can also be useful in cases where you are debugging whether a third-party plugin is causing issues in your Dokku installation:
|
||||
|
||||
```shell
|
||||
dokku plugin:disable postgres
|
||||
```
|
||||
|
||||
```
|
||||
-----> Plugin postgres disabled
|
||||
```
|
||||
|
||||
```shell
|
||||
dokku plugin:enable postgres
|
||||
```
|
||||
|
||||
```
|
||||
-----> Plugin postgres enabled
|
||||
```
|
||||
|
||||
Finally, you can update an installed third-party plugin. This should be done after any upgrades of Dokku as there may be changes in the internal api that require an update of how the plugin interfaces with Dokku.
|
||||
|
||||
```shell
|
||||
dokku plugin:update postgres
|
||||
```
|
||||
|
||||
```
|
||||
Plugin (postgres) updated
|
||||
```
|
||||
160
docs/advanced-usage/proxy-management.md
Normal file
@@ -0,0 +1,160 @@
|
||||
# Proxy Management
|
||||
|
||||
> New as of 0.5.0, Enhanced in 0.6.0
|
||||
|
||||
```
|
||||
proxy <app> # Show proxy settings for app
|
||||
proxy:disable <app> # Disable proxy for app
|
||||
proxy:enable <app> # Enable proxy for app
|
||||
proxy:ports <app> # List proxy port mappings for app
|
||||
proxy:ports-add <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...] # Set proxy port mappings for app
|
||||
proxy:ports-clear <app> # Clear all proxy port mappings for app
|
||||
proxy:ports-remove <app> <host-port> [<host-port>|<scheme>:<host-port>:<container-port>...] # Unset proxy port mappings for app
|
||||
proxy:set <app> <proxy-type> # Set proxy type for app
|
||||
```
|
||||
|
||||
In Dokku 0.5.0, port proxying was decoupled from the `nginx-vhosts` plugin into the proxy plugin. Dokku 0.6.0 introduced the ability to map host ports to specific container ports. In the future this will allow other proxy software - such as HAProxy or Caddy - to be used in place of nginx.
|
||||
|
||||
## Container network interface binding
|
||||
|
||||
> New as of 0.5.0
|
||||
|
||||
By default, the deployed docker container running your app's web process will bind to the internal docker network interface (i.e. `docker inspect --format '{{ .NetworkSettings.IPAddress }}' $CONTAINER_ID`). This behavior can be modified per app by disabling the proxy (i.e. `dokku proxy:disable <app>`). In this case, the container will bind to an external interface (i.e. `0.0.0.0`) and your app container will be directly accessible by other hosts on your network.
|
||||
|
||||
> If a proxy is disabled, Dokku will bind your container's port to a random port on the host for every deploy, e.g. `0.0.0.0:32771->5000/tcp`.
|
||||
|
||||
By way of example, in the default case, each container is bound to the docker interface:
|
||||
|
||||
```shell
|
||||
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 node-js-app.web.1
|
||||
```
|
||||
|
||||
As such, the container's IP address will be an internal IP, and thus it is only accessible on the host itself:
|
||||
|
||||
```
|
||||
docker inspect --format '{{ .NetworkSettings.IPAddress }}' node-js-app.web.1
|
||||
```
|
||||
|
||||
```
|
||||
172.17.0.6
|
||||
```
|
||||
|
||||
However, you can disable the internal proxying via the `proxy:disable` command so that it will listen on the host's IP address:
|
||||
|
||||
```shell
|
||||
dokku proxy:disable node-js-app
|
||||
|
||||
# container bound to all interfaces
|
||||
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 node-js-app.web.1
|
||||
```
|
||||
|
||||
## Proxy port mapping
|
||||
|
||||
> New as of 0.6.0
|
||||
|
||||
You can now configure `host -> container` port mappings with the `proxy:ports-*` commands. This mapping is currently supported by the built-in nginx-vhosts plugin.
|
||||
|
||||
To inspect the port mapping for a given application, use the `proxy:ports` command:
|
||||
|
||||
```shell
|
||||
dokku proxy:ports node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
-----> Port mappings for node-js-app
|
||||
-----> scheme host port container port
|
||||
http 80 5000
|
||||
```
|
||||
|
||||
The above application is listening on the host's port `80`, which we can test via curl:
|
||||
|
||||
```shell
|
||||
curl http://node-js-app.dokku.me
|
||||
```
|
||||
|
||||
```
|
||||
Hello World!
|
||||
```
|
||||
|
||||
There are cases where we may wish for the service to be listening on more than one port, such as port 8080. Normally, this would not be possible:
|
||||
|
||||
```shell
|
||||
curl http://node-js-app.dokku.me:8080
|
||||
```
|
||||
|
||||
```
|
||||
curl: (7) Failed to connect to node-js-app.dokku.me port 8080: Connection refused
|
||||
```
|
||||
|
||||
However, we can use the `proxy:ports-add` command to add a second external port mapping - `8080` - to our application's port `5000`.
|
||||
|
||||
```shell
|
||||
dokku proxy:ports-add node-js-app http:8080:5000
|
||||
```
|
||||
|
||||
```
|
||||
-----> Setting config vars
|
||||
DOKKU_PROXY_PORT_MAP: http:80:5000 http:8080:5000
|
||||
-----> Configuring node-js-app.dokku.me...(using built-in template)
|
||||
-----> Creating http nginx.conf
|
||||
-----> Running nginx-pre-reload
|
||||
Reloading nginx
|
||||
```
|
||||
|
||||
We can now test that port 80 still responds properly:
|
||||
|
||||
```shell
|
||||
curl http://node-js-app.dokku.me
|
||||
```
|
||||
|
||||
```
|
||||
Hello World!
|
||||
```
|
||||
|
||||
And our new listening port of `8080` also works:
|
||||
|
||||
```shell
|
||||
curl http://node-js-app.dokku.me:8080
|
||||
```
|
||||
|
||||
```
|
||||
Hello World!
|
||||
```
|
||||
|
||||
You can also remove a port mapping that is no longer necessary:
|
||||
|
||||
```shell
|
||||
dokku proxy:ports-remove node-js-app http:80:5000
|
||||
```
|
||||
|
||||
By default, buildpack apps and dockerfile apps **without** explicitly exposed ports (i.e. using the `EXPOSE` directive) will be configured with a listener on port `80` (and additionally a listener on 443 if ssl is enabled) that will proxy to the application container on port `5000`. Dockerfile apps **with** explicitly exposed ports will be configured with a listener on each exposed port and will proxy to that same port of the deployed application container.
|
||||
|
||||
> Note: This default behavior **will not** be automatically changed on subsequent pushes and must be manipulated with the `proxy:ports-*` syntax detailed above.
|
||||
|
||||
## Proxy Port Scheme
|
||||
|
||||
The proxy port scheme is as follows:
|
||||
|
||||
- `SCHEME:HOST_PORT:CONTAINER_PORT`
|
||||
|
||||
The scheme metadata can be used by proxy implementations in order to properly handle proxying of requests. For example, the built-in `nginx-vhosts` proxy implementation supports both the `http` and `https` schemes.
|
||||
|
||||
Developers of proxy implementations are encouraged to use whatever schemes make the most sense, and ignore configurations which they do not support. For instance, a `udp` proxy implementation can safely ignore `http` and `https` port mappings.
|
||||
|
||||
To change the proxy implementation in use for an application, use the `proxy:set` command:
|
||||
|
||||
```shell
|
||||
# no validation will be performed against
|
||||
# the specified proxy implementation
|
||||
dokku proxy:set node-js-app nginx
|
||||
```
|
||||
36
docs/advanced-usage/repository-management.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# Repository Management
|
||||
|
||||
> New as of 0.6.0
|
||||
|
||||
```
|
||||
repo:gc <app> # Runs 'git gc --agressive' against the application's repo
|
||||
repo:purge-cache <app> # Deletes the contents of the build cache stored in the repository
|
||||
```
|
||||
|
||||
The repository plugin is meant to allow users to perform management commands against a repository.
|
||||
|
||||
## Usage
|
||||
|
||||
### Git Garbage Collection
|
||||
|
||||
This will run a git gc --agressive against the applications repo. This is performed on the Dokku host, and not within an application container.
|
||||
|
||||
```shell
|
||||
dokku repo:gc node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
Counting objects: 396, done.
|
||||
Delta compression using up to 2 threads.
|
||||
Compressing objects: 100% (365/365), done.
|
||||
Writing objects: 100% (396/396), done.
|
||||
Total 396 (delta 79), reused 315 (delta 0)
|
||||
```
|
||||
|
||||
### Clearing Application cache
|
||||
|
||||
Building containers with buildpacks currently results in a persistent `cache` directory between deploys. If you need to clear this cache directory for any reason, you may do so by running the following shell command:
|
||||
|
||||
```shell
|
||||
dokku repo:purge-cache node-js-app
|
||||
```
|
||||
@@ -1,15 +1,15 @@
|
||||
# 0.5.0 Migration Guide
|
||||
|
||||
## nginx-vhosts
|
||||
## `nginx-vhosts` plugin
|
||||
|
||||
- The nginx-vhosts template language is now [sigil](https://github.com/gliderlabs/sigil)
|
||||
- No need to escape literal `$` characters (or other "bash-isms")
|
||||
- Template variables are represented as {{ .VARIABLE_NAME }}
|
||||
- A detailed list of template variables can be found [here](/dokku/nginx#available-template-variables)
|
||||
- A detailed list of template variables can be found [here](/dokku/configuration/nginx/#available-template-variables)
|
||||
- A custom nginx-vhosts template must be named `nginx.conf.sigil`
|
||||
- The default path for this custom template is the root of your repo (i.e. `/app` in the container or `WORKDIR` if defined in a dockerfile app)
|
||||
- Dokku no longer looks for this file in `/home/dokku/myapp` on the dokku server
|
||||
- Check out an example template [here](/dokku/nginx/)
|
||||
- Dokku no longer looks for this file in `/home/dokku/myapp` on the Dokku server
|
||||
- Check out an example template [here](/dokku/configuration/nginx/)
|
||||
- Support for server-wide SSL certs have been dropped in favor of using the `certs` plugin
|
||||
- `dokku certs:add myapp < certs.tar`
|
||||
- All domains for an SSL-enabled app will be redirected to https by default
|
||||
@@ -17,6 +17,9 @@
|
||||
- Replaced "magic" `NO_VHOST` variable with `domains:enable/disable`
|
||||
- Simplified zero downtime control
|
||||
- `checks:enable/disable`
|
||||
## Dockerfile apps with multiple ports
|
||||
- Dockerfiles with multiple `EXPOSE` clauses will get all **tcp** ports proxied by default (nginx does not support proxying udp)
|
||||
- UDP can be exposed by disabling the nginx proxy with `dokku proxy:disable myapp`
|
||||
|
||||
## Dockerfile apps with exposed ports
|
||||
|
||||
- Dockerfiles with `EXPOSE` clauses will get [all **tcp** ports proxied by default](/dokku/deployment/methods/dockerfiles/#exposed-ports)
|
||||
- Note that nginx will proxy the same port numbers to listen publicly
|
||||
- UDP ports can be exposed by disabling the [nginx proxy](/dokku/advanced-usage/proxy-management/) with `dokku proxy:disable myapp`
|
||||
|
||||
32
docs/appendices/0.6.0-migration-guide.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# 0.6.0 Migration Guide
|
||||
|
||||
## Zero-downtime deployment
|
||||
|
||||
- You can now **actually** disable zero-downtime deployments per-app and per-process-type
|
||||
- Some config variables have been moved around
|
||||
- `DOKKU_CHECKS_ENABLED` has been migrated to `DOKKU_CHECKS_SKIPPED`
|
||||
- `DOKKU_CHECKS_DISABLED` is now a thing
|
||||
- The values for the above can be a comma-separated list of process-types or the literal string `_all_`
|
||||
- See the [updated `checks`](/dokku/deployment/zero-downtime-deploys/) docs for more info
|
||||
|
||||
## Proxy port mapping
|
||||
|
||||
- You can now configure host -> container proxy port mappings
|
||||
- The UI is handled by the [proxy](/dokku/advanced-usage/proxy-management/) interface plugin by setting the `DOKKU_PROXY_PORT_MAP` config variable in the format of `scheme:host-port:container-port`. The default `nginx-vhosts` proxy plugin supports both the `http` and `https` schemes.
|
||||
- Default port mappings
|
||||
- buildpack apps will be set to `http:80:5000` and will also include `https:443:5000` if SSL is enabled.
|
||||
- dockerfile apps with explicitly exposed ports (i.e. using the `EXPOSE` directive) will be configured with a listener on each exposed port that proxies to the same port of the deployed application container.
|
||||
- You may override this behavior with the [`proxy:ports-*` commands](/dokku/advanced-usage/proxy-management/) or by directly setting `DOKKU_PROXY_PORT_MAP` with the `config:set` command
|
||||
- dockerfile apps without explicitly exposed ports will behave the same as a buildpack app
|
||||
- NOTE: These defaults **are not** automatically changed on subsequent pushes and must be manipulated with the aforementioned commands
|
||||
|
||||
## Calling the `dokku` binary
|
||||
|
||||
- Plugins should *not* call the `dokku` binary directly. Clients using the `--app` argument are potentially broken, amongst others, when doing so. Instead, please source the `functions` file for a given plugin when attempting to call Dokku internal functions. As a result, the following Dokku commands are no longer publicly exposed:
|
||||
- `dokku build`
|
||||
- `dokku receive`
|
||||
- `dokku release`
|
||||
- `dokku tar:build`
|
||||
- `dokku tar:build-locked`
|
||||
- `dokku git:build`
|
||||
- `dokku git:build-locked`
|
||||
13
docs/appendices/0.7.0-migration-guide.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# 0.7.0 Migration Guide
|
||||
|
||||
## Persistent Storage
|
||||
|
||||
We should now properly handle file ownership for mounted directories. This was enhanced in 0.7.1. See the [persistent storage documentation](/dokku/advanced-usage/persistent-storage/) for more details.
|
||||
|
||||
## Restart Policies
|
||||
|
||||
If you previously managed container restart policies via docker-options, these can now be managed natively via the built-in `ps` plugin. There is no migration necessary. See the [restart policy documentation](/dokku/deployment/process-management/#restart-policies) for more details.
|
||||
|
||||
## SSH Keys
|
||||
|
||||
Dokku now has an `ssh-keys` plugin that can be used to manage ssh keys for the `dokku` user on the host operating system. See the [user management documentation](/dokku/deployment/user-management/) for more details.
|
||||
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 867 B After Width: | Height: | Size: 792 B |
|
Before Width: | Height: | Size: 938 B After Width: | Height: | Size: 861 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1005 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 974 B |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.0 KiB |
@@ -2,10 +2,10 @@
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<square70x70logo src="https://cdn.rawgit.com/dokku/dokku/v0.7.2/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.7.2/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.rawgit.com/dokku/dokku/v0.7.2/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.7.2/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
|
||||
|
Before Width: | Height: | Size: 455 B After Width: | Height: | Size: 431 B |
@@ -2,37 +2,37 @@
|
||||
"name": "Dokku",
|
||||
"icons": [
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.4\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.7.2\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image\/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.4\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.7.2\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.4\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.7.2\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.4\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.7.2\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.4\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.7.2\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.4\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.7.2\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 9.2 KiB |
BIN
docs/assets/slack-logo.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
@@ -36,13 +36,13 @@ h1 {
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.header .navbar-brand a {
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/dokku.png);
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.7.2/docs/assets/dokku.png);
|
||||
text-indent: 40px;
|
||||
}
|
||||
.blurb {
|
||||
color: #424242;
|
||||
background-color: #ededed;
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/gplaypattern.png);
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.7.2/docs/assets/gplaypattern.png);
|
||||
padding: 45px 0;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -178,6 +178,37 @@ h1 {
|
||||
display: inline-block;
|
||||
margin-left: 0.5em
|
||||
}
|
||||
.slack-button {
|
||||
background-image: -webkit-linear-gradient(#FCFCFC, #EAEAEA);
|
||||
background-image: linear-gradient(#FCFCFC, #EAEAEA);
|
||||
border: 1px solid #ddd;
|
||||
padding: 0.25rem 0.5rem;
|
||||
}
|
||||
.slack-button img {
|
||||
height: 1em;
|
||||
}
|
||||
.team-members img {
|
||||
-moz-box-shadow: 4px 4px 8px 0px rgba(0,0,0,0.75);
|
||||
-webkit-border-radius: 3px;
|
||||
-webkit-box-shadow: 4px 4px 8px 0px rgba(0,0,0,0.75);
|
||||
border-radius: 3px;
|
||||
border: 8px solid white;
|
||||
box-shadow: 4px 4px 8px 0px rgba(0,0,0,0.75);
|
||||
display: block;
|
||||
height: 200px;
|
||||
margin: 20px auto 20px auto;
|
||||
}
|
||||
.team-members .fund-link {
|
||||
display: block;
|
||||
font-size: 80%;
|
||||
}
|
||||
.team-member {
|
||||
min-height: 320px;
|
||||
}
|
||||
.team-member-image img:last-child { display: none }
|
||||
.team-member-image:hover img:first-child { display: none; }
|
||||
.team-member-image:hover img:last-child { display: inline-block; }
|
||||
|
||||
.list-group-item {
|
||||
border: none;
|
||||
font-weight: normal;
|
||||
@@ -199,6 +230,15 @@ a.list-group-item {
|
||||
margin-top: 2em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.table-of-contents {
|
||||
font-size: 0.8em;
|
||||
padding: 1em;
|
||||
margin: 0 0 0.5em 0.5em;
|
||||
}
|
||||
.table-of-contents ul {
|
||||
margin-bottom: 0;
|
||||
padding-left: 20px;
|
||||
}
|
||||
.anchorjs-link {
|
||||
color: #24cbce;
|
||||
}
|
||||
@@ -242,6 +282,39 @@ a.list-group-item {
|
||||
.markdown-body h1 + h2 {
|
||||
margin-top: 1em;
|
||||
}
|
||||
.highlight-show-language {
|
||||
position: relative;
|
||||
}
|
||||
.highlight-show-language-label {
|
||||
color: black;
|
||||
background-color: #CFCFCF;
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
bottom: auto;
|
||||
left: auto;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: auto;
|
||||
height: auto;
|
||||
font-size: 0.9em;
|
||||
border-radius: 0 0 0 5px;
|
||||
padding: 0 0.5em;
|
||||
text-shadow: none;
|
||||
z-index: 1;
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
box-shadow: none;
|
||||
-webkit-transform: none;
|
||||
-moz-transform: none;
|
||||
-ms-transform: none;
|
||||
-o-transform: none;
|
||||
transform: none;
|
||||
}
|
||||
.highlight-output pre {
|
||||
color: #fff;
|
||||
background-color: #000;
|
||||
padding: 10px;
|
||||
}
|
||||
code {
|
||||
padding: 0;
|
||||
padding-top: 0.2em;
|
||||
@@ -308,6 +381,61 @@ blockquote {
|
||||
.clearfix:after {
|
||||
clear: both
|
||||
}
|
||||
.improve-slideout {
|
||||
position: fixed;
|
||||
bottom: 66%;
|
||||
right: 0;
|
||||
-webkit-transition-duration: 0.3s;
|
||||
-moz-transition-duration: 0.3s;
|
||||
-o-transition-duration: 0.3s;
|
||||
transition-duration: 0.3s;
|
||||
background: #363637;
|
||||
padding: 5px 0 4px;
|
||||
z-index: 90;
|
||||
}
|
||||
.improve-slideout:hover {
|
||||
right: 205px;
|
||||
}
|
||||
.improve-slideout:hover .improve-slideout-inner {
|
||||
right: 0;
|
||||
}
|
||||
.improve-slideout-inner {
|
||||
position: fixed;
|
||||
bottom: 66%;
|
||||
right: -205px;
|
||||
-webkit-transition-duration: 0.3s;
|
||||
-moz-transition-duration: 0.3s;
|
||||
-o-transition-duration: 0.3s;
|
||||
transition-duration: 0.3s;
|
||||
background: #e0e0d9;
|
||||
padding: 4px 12px;
|
||||
width: 205px;
|
||||
}
|
||||
.improve-slideout-inner h6 {
|
||||
color: #363637;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
}
|
||||
.git-improve {
|
||||
font-size: 20px;
|
||||
vertical-align: -2px;
|
||||
padding-left: 8px;
|
||||
}
|
||||
.back-to-contents {
|
||||
position: fixed;
|
||||
bottom: calc(66% - 34px);
|
||||
right: 0;
|
||||
background: #363637;
|
||||
padding: 5px 0 4px;
|
||||
z-index: 90;
|
||||
}
|
||||
.icon-improve {
|
||||
color: #bdbdb5;
|
||||
padding: 2px 9px 0 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
a .fa {
|
||||
display: inline-block;
|
||||
text-decoration: inherit
|
||||
@@ -488,11 +616,6 @@ ul.fas li .fa-large:before, ul.fas li .fa-large:before {
|
||||
font-size: 50px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 992px) {
|
||||
.featurette img {
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
@media (min-width: 992px) {
|
||||
.featurette img {
|
||||
width: 300px;
|
||||
@@ -501,3 +624,8 @@ ul.fas li .fa-large:before, ul.fas li .fa-large:before {
|
||||
margin-top: 30px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 992px) {
|
||||
.featurette img {
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
BIN
docs/assets/team/flink-hidden.jpg
Normal file
|
After Width: | Height: | Size: 57 KiB |
BIN
docs/assets/team/flink.jpg
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
docs/assets/team/josegonzalez-hidden.jpg
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
docs/assets/team/josegonzalez.jpg
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
docs/assets/team/michaelshobbs-hidden.jpg
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
docs/assets/team/michaelshobbs.jpg
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
docs/assets/team/morrisjobke-hidden.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
docs/assets/team/morrisjobke.jpg
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
docs/assets/team/progrium-hidden.jpg
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
docs/assets/team/progrium.jpg
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
docs/assets/team/u2mejc-hidden.jpg
Normal file
|
After Width: | Height: | Size: 61 KiB |
BIN
docs/assets/team/u2mejc.jpg
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
@@ -1,7 +1 @@
|
||||
{
|
||||
"max-versions": [
|
||||
"0.3.26",
|
||||
"0.4.14",
|
||||
"0.5.4"
|
||||
]
|
||||
}
|
||||
{ "max-versions": [ "0.3.26", "0.4.14", "0.5.8", "0.6.5", "0.7.2" ] }
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
# Backup and Recovery
|
||||
|
||||
> The backup plugin was deprecated in 0.4.x, below are backup recommendations for 0.5.x and later.
|
||||
|
||||
## Backup and Migration Tutorial
|
||||
|
||||
Because Dokku is git based, rebuilding a deployed app is as easy as pushing from git. You can push to a new server by updating the dokku remote in you local app's repo.
|
||||
|
||||
```
|
||||
$ git remote rm dokku
|
||||
$ git remote add dokku dokku@[dokku.me:dokku.me]
|
||||
$ git push dokku [master]
|
||||
```
|
||||
## Databases
|
||||
|
||||
Some plugins, like the official [dokku-postgres] plugin, have built-in commands that allow non-volatile data be exported and imported.
|
||||
|
||||
For [dokku-postgres], use:
|
||||
```
|
||||
dokku postgres:export [db_name] > [db_name].dump
|
||||
dokku postgres:import [db_name] < [db_name].dump
|
||||
```
|
||||
|
||||
## Volumes and Static Assets
|
||||
|
||||
Dokku doesn't enforce a [300mb] limit on apps, but it's best practice to keep binary assets outside of git. Since containers are considered volatile in Dokku, external stores like s3 or storage mounts should be used for non-volatile items like user uploads. The dokku storage core plugin can be used to mount local directories / volumes inside the docker container.
|
||||
|
||||
```
|
||||
storage:list <app>, List bind mounts for app's container(s) (host:container)
|
||||
storage:mount <app> <host-dir:container-dir>, Create a new bind mount
|
||||
storage:unmount <app> <host-dir:container-dir>, Remove an existing bind mount
|
||||
```
|
||||
|
||||
## Disaster Recovery
|
||||
|
||||
The best plan for disaster recovery is to always keep multiple (remote) copies of your local repo, static assets and periodic database dumps. In case of an emergency when your git repo and backups are completely lost, you can recover the last pushed copy from your remote dokku server (assuming you still have the ssh key).
|
||||
|
||||
```
|
||||
mkdir [app-name] ; cd !$
|
||||
git init && git remote add dokku dokku@[dokku.me:app-name]
|
||||
git pull dokku/master && git checkout dokku/master
|
||||
```
|
||||
|
||||
[dokku-postgres]: <https://github.com/dokku/dokku-postgres>
|
||||
[300mb]: <https://devcenter.heroku.com/articles/slug-compiler#slug-size>
|
||||
@@ -1,19 +1,19 @@
|
||||
# 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.
|
||||
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.
|
||||
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.
|
||||
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:
|
||||
To install, simply clone the Dokku repository down and add the `dokku` alias pointing at the script:
|
||||
|
||||
```shell
|
||||
git clone git@github.com:dokku/dokku.git ~/.dokku
|
||||
|
||||
# optional: make sure that the dokku_client.sh version matches your dokku version
|
||||
# optional: make sure that the dokku_client.sh version matches your Dokku version
|
||||
cd ~/.dokku
|
||||
git checkout <tag/branch>
|
||||
|
||||
@@ -35,13 +35,13 @@ alias dokku 'bash $HOME/.dokku/contrib/dokku_client.sh'
|
||||
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.
|
||||
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.
|
||||
|
||||
You can also configure a `DOKKU_PORT` environment variable if you are running ssh on a non-standard port. This defaults to `22`.
|
||||
|
||||
## (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):
|
||||
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
|
||||
@@ -51,7 +51,7 @@ See [documentation here](https://www.npmjs.com/package/dokku-toolbelt) for more
|
||||
|
||||
## (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):
|
||||
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
|
||||
@@ -61,7 +61,7 @@ See [documentation here](https://github.com/adamcharnock/dokku-client) for more
|
||||
|
||||
## (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):
|
||||
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
|
||||
@@ -71,7 +71,7 @@ See [documentation here](https://github.com/SebastianSzturo/dokku-cli) for more
|
||||
|
||||
## (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):
|
||||
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
|
||||
@@ -81,7 +81,7 @@ See [documentation here](https://github.com/netguru/dokku_client) for more infor
|
||||
|
||||
## (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):
|
||||
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
|
||||
@@ -91,7 +91,7 @@ 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):
|
||||
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
|
||||
|
||||
@@ -2,40 +2,31 @@
|
||||
|
||||
Dokku itself is built out of plugins and uses [plugn](https://github.com/dokku/plugn) 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.
|
||||
Let's take a quick look at the current Dokku nginx plugin that's shipped with Dokku by default.
|
||||
|
||||
nginx-vhosts/
|
||||
├── plugin.toml # plugin metadata
|
||||
├── commands # contains additional commands
|
||||
├── install # runs on dokku installation
|
||||
├── install # runs on Dokku installation
|
||||
└── post-deploy # runs after an app is deployed
|
||||
|
||||
## Installing a plugin
|
||||
|
||||
```shell
|
||||
# This command requires `root` permissions as the `install` and `install-dependencies`
|
||||
# plugin triggers may utilize commands such as `apt-get`. For non-core plugins, please
|
||||
# inspect those plugins before running the following command as `root` user.
|
||||
sudo dokku plugin:install <git_url> [--committish tag/branch/commit|--name custom-plugin-name]
|
||||
|
||||
# previous versions (0.3.x and below) of dokku require a manual process to install plugins
|
||||
cd /var/lib/dokku/plugins
|
||||
git clone <git url>
|
||||
dokku plugins-install
|
||||
```
|
||||
[See the plugin management documentation](/dokku/advanced-usage/plugin-management/).
|
||||
|
||||
## Creating your own plugin
|
||||
|
||||
[See the full documentation](/dokku/development/plugin-creation).
|
||||
[See the full documentation](/dokku/development/plugin-creation/).
|
||||
|
||||
## Official Plugins (Beta)
|
||||
|
||||
The following plugins are available and provided by dokku maintainers. Where noted, these plugins should be considered beta software and may not have been used as thoroughly as community plugins. Please file issues against their respective issue trackers.
|
||||
The following plugins are available and provided by Dokku maintainers. Where noted, these plugins should be considered beta software and may not have been used as thoroughly as community plugins. Please file issues against their respective issue trackers.
|
||||
|
||||
| Plugin | Author | Compatibility |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [CouchDB (beta)](https://github.com/dokku/dokku-couchdb) | [dokku][] | 0.4.0+ |
|
||||
| [Elasticsearch (beta)](https://github.com/dokku/dokku-elasticsearch-plugin) | [dokku][] | 0.4.0+ |
|
||||
| [Grafana/Graphite/Statsd (beta)](https://github.com/dokku/dokku-graphite-grafana) | [dokku][] | 0.4.0+ |
|
||||
| [MariaDB (beta)](https://github.com/dokku/dokku-mariadb-plugin) | [dokku][] | 0.4.0+ |
|
||||
| [Memcached (beta)](https://github.com/dokku/dokku-memcached-plugin) | [dokku][] | 0.4.0+ |
|
||||
| [Mongo (beta)](https://github.com/dokku/dokku-mongo-plugin) | [dokku][] | 0.4.0+ |
|
||||
@@ -53,7 +44,7 @@ The following plugins are available and provided by dokku maintainers. Where not
|
||||
|
||||
## Community plugins
|
||||
|
||||
Note: The following plugins have been supplied by our community and may not have been tested by dokku maintainers.
|
||||
Note: The following plugins have been supplied by our community and may not have been tested by Dokku maintainers.
|
||||
|
||||
[256dpi]: https://github.com/256dpi
|
||||
[abossard]: https://github.com/dudagroup
|
||||
@@ -63,15 +54,18 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
[alex-sherwin]: https://github.com/alex-sherwin
|
||||
[alexanderbeletsky]: https://github.com/alexanderbeletsky
|
||||
[alexkruegger]: https://github.com/alexkruegger
|
||||
[Aluxian]: https://github.com/Aluxian
|
||||
[Aomitayo]: https://github.com/Aomitayo
|
||||
[apmorton]: https://github.com/apmorton
|
||||
[Benjamin-Dobell]: https://github.com/Benjamin-Dobell
|
||||
[basgys]: https://github.com/basgys
|
||||
[Benjamin-Dobell]: https://github.com/Benjamin-Dobell
|
||||
[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
|
||||
[crisward]: https://github.com/crisward
|
||||
[cu12]: https://github.com/cu12
|
||||
[darkpixel]: https://github.com/darkpixel
|
||||
[dokku]: https://github.com/dokku
|
||||
[dyson]: https://github.com/dyson
|
||||
@@ -80,14 +74,16 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
[fgrehm]: https://github.com/fgrehm
|
||||
[Flink]: https://github.com/Flink
|
||||
[gdi2290]: https://github.com/gdi2290
|
||||
[heichblatt]: https://github.com/heichblatt
|
||||
[hughfletcher]: https://github.com/hughfletcher
|
||||
[iamale]: https://github.com/iamale
|
||||
[ignlg]: https://github.com/ignlg
|
||||
[iloveitaly]: https://github.com/iloveitaly
|
||||
[investtools]: https://github.com/investtools
|
||||
[iskandar]: https://github.com/iskandar
|
||||
[jagandecapri]: https://github.com/jagandecapri
|
||||
[jeffutter]: https://github.com/jeffutter
|
||||
[jlachowski]: https://github.com/jlachowski
|
||||
[josegonzalez]: https://github.com/josegonzalez
|
||||
[Kloadut]: https://github.com/Kloadut
|
||||
[krisrang]: https://github.com/krisrang
|
||||
[luxifer]: https://github.com/luxifer
|
||||
@@ -102,6 +98,7 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
[motin]: https://github.com/motin
|
||||
[musicglue]: https://github.com/musicglue
|
||||
[neam]: https://github.com/neam
|
||||
[nickcharlton]: https://github.com/nickcharlton
|
||||
[nickstenning]: https://github.com/nickstenning
|
||||
[nornagon]: https://github.com/nornagon
|
||||
[ohardy]: https://github.com/ohardy
|
||||
@@ -128,19 +125,19 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
|
||||
| Plugin | Author | Compatibility |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [MariaDB](https://github.com/Kloadut/dokku-md-plugin) | [Kloadut][] | 0.3.x |
|
||||
| [MariaDB (single container)](https://github.com/ohardy/dokku-mariadb) | [ohardy][] | 0.3.x |
|
||||
| [MariaDB (single container)](https://github.com/krisrang/dokku-mariadb) | [krisrang][] | 0.3.26+ |
|
||||
| [PostgreSQL](https://github.com/jlachowski/dokku-pg-plugin) | [jlachowski][] | 0.3.x |
|
||||
| [PostgreSQL (single container)](https://github.com/ohardy/dokku-psql) | [ohardy][] | 0.3.x |
|
||||
| [PostgreSQL (single container)](https://github.com/Flink/dokku-psql-single-container) | [Flink][] | 0.3.26+ |
|
||||
| [MariaDB](https://github.com/Kloadut/dokku-md-plugin) | [Kloadut][] | 0.3.x |
|
||||
| [MariaDB (single container)](https://github.com/ohardy/dokku-mariadb) | [ohardy][] | 0.3.x |
|
||||
| [MariaDB (single container)](https://github.com/krisrang/dokku-mariadb) | [krisrang][] | 0.3.26+ |
|
||||
| [PostgreSQL](https://github.com/jlachowski/dokku-pg-plugin) | [jlachowski][] | 0.3.x |
|
||||
| [PostgreSQL (single container)](https://github.com/ohardy/dokku-psql) | [ohardy][] | 0.3.x |
|
||||
| [PostgreSQL (single container)](https://github.com/Flink/dokku-psql-single-container) | [Flink][] | 0.3.26+ |
|
||||
|
||||
#### Caching
|
||||
|
||||
| Plugin | Author | Compatibility |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [Redis](https://github.com/sekjun9878/dokku-redis-plugin) | [sekjun9878][] | 0.3.26+ |
|
||||
| [Redis (single container)](https://github.com/ohardy/dokku-redis) | [ohardy][] | 0.3.x |
|
||||
| [Nginx Cache](https://github.com/Aluxian/dokku-nginx-cache) | [Aluxian][] | 0.5.0+ |
|
||||
| [Redis (single container)](https://github.com/ohardy/dokku-redis) | [ohardy][] | 0.3.x |
|
||||
| [Varnish](https://github.com/Zenedith/dokku-varnish-plugin) | [Zenedith][] | Varnish cache between nginx and application with base configuration|
|
||||
|
||||
#### Queuing
|
||||
@@ -149,28 +146,18 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [RabbitMQ](https://github.com/jlachowski/dokku-rabbitmq-plugin) | [jlachowski][] | 0.3.x |
|
||||
| [RabbitMQ (single container)](https://github.com/jlachowski/dokku-rabbitmq-single-plugin) | [jlachowski][] | 0.3.x |
|
||||
| [ElasticMQ (SQS compatible)](https://github.com/cu12/dokku-elasticmq) | [cu12][] | 0.5.0+ |
|
||||
|
||||
#### Other
|
||||
|
||||
| Plugin | Author | Compatibility |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [etcd](https://github.com/basgys/dokku-etcd) | [basgys][] | 0.4.x |
|
||||
| [RethinkDB](https://github.com/stuartpb/dokku-rethinkdb-plugin) | [stuartpb][] | 0.3.x |
|
||||
| [etcd](https://github.com/basgys/dokku-etcd) | [basgys][] | 0.4.x |
|
||||
| [FakeSNS](https://github.com/cu12/dokku-fake_sns) | [cu12][] | 0.5.0+ |
|
||||
| [InfluxDB](https://github.com/basgys/dokku-influxdb) | [basgys][] | 0.4.x |
|
||||
| [RethinkDB](https://github.com/stuartpb/dokku-rethinkdb-plugin) | [stuartpb][] | 0.3.x |
|
||||
|
||||
[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 |
|
||||
| [Forego](https://github.com/Flink/dokku-forego) | [Flink][] | 0.4.0+ |
|
||||
| [Logging Supervisord](https://github.com/sehrope/dokku-logging-supervisord) | [sehrope][] | 0.4.0+ |
|
||||
| [Monit](https://github.com/cjblomqvist/dokku-monit) | [cjblomqvist][] | 0.3.x |
|
||||
| [Shoreman ](https://github.com/statianzo/dokku-shoreman) | [statianzo][] | 0.3.x |
|
||||
| [Supervisord](https://github.com/statianzo/dokku-supervisord) | [statianzo][] | 0.3.x |
|
||||
|
||||
[c77cbf1]: https://github.com/dokku/dokku/commit/c77cbf1d3ae07f0eafb85082ed7edcae9e836147
|
||||
[28de3ec]: https://github.com/dokku/dokku/commit/28de3ecaa3231a223f83fd8d03f373308673bc40
|
||||
|
||||
@@ -179,84 +166,96 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
| Plugin | Author | Compatibility |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [App name as env](https://github.com/cjblomqvist/dokku-app-name-env) | [cjblomqvist][] | 0.3.x |
|
||||
| [Docker Direct](https://github.com/heichblatt/dokku-docker-direct) | [heichblatt][] | |
|
||||
| [Dokku Copy App Config Files](https://github.com/alexkruegger/dokku-app-configfiles) | [alexkruegger][] | Compatible with 0.3.17+ |
|
||||
| [Dokku Copy App Config Files](https://github.com/heichblatt/dokku-supply-config) | [heichblatt][] | |
|
||||
| [Dokku Name](https://github.com/alex-sherwin/dokku-name) | [alex-sherwin][] | dokku >= [c77cbf1][] |
|
||||
| [Docker Direct](https://github.com/josegonzalez/dokku-docker-direct) | [josegonzalez][] | 0.4.0+ |
|
||||
| [Dokku Clone](https://github.com/crisward/dokku-clone) | [crisward][] | 0.4.0+ |
|
||||
| [Dokku Copy App Config Files](https://github.com/josegonzalez/dokku-supply-config) | [josegonzalez][] | 0.4.0+ |
|
||||
| [Dokku Registry](https://github.com/agco-adm/dokku-registry)<sup>1</sup> | [agco-adm][] | 0.4.0+ |
|
||||
| [Dokku Require](https://github.com/crisward/dokku-require)<sup>2</sup> | [crisward][] | 0.4.0+ |
|
||||
| [git rev-parse HEAD in env](https://github.com/cjblomqvist/dokku-git-rev) | [cjblomqvist][] | 0.4.0+ |
|
||||
| [Graduate (Environment Management)](https://github.com/glassechidna/dokku-graduate) | [Benjamin-Dobell][] | 0.3.14+ |
|
||||
| [Global Certificates](https://github.com/josegonzalez/dokku-global-cert) | [josegonzalez][] | 0.5.0+ |
|
||||
| [Graduate (Environment Management)](https://github.com/glassechidna/dokku-graduate) | [Benjamin-Dobell][] | 0.4.0+ |
|
||||
| [Haproxy tcp load balancer](https://github.com/256dpi/dokku-haproxy) | [256dpi][] | 0.4.0+ |
|
||||
| [HTTP Auth Secure Apps](https://github.com/matto1990/dokku-secure-apps) | [matto1990][] | 0.4.0+ |
|
||||
| [Hostname](https://github.com/michaelshobbs/dokku-hostname) | [michaelshobbs][] | 0.4.0+ |
|
||||
| [Multi-Buildpack](https://github.com/pauldub/dokku-multi-buildpack) | [pauldub][] | |
|
||||
| [Nuke Containers](https://github.com/heichblatt/dokku-nuke) | [heichblatt][] | |
|
||||
| [Open App Ports](https://github.com/heichblatt/dokku-ports) | [heichblatt][] | |
|
||||
| [Pre-Deploy Tasks](https://github.com/michaelshobbs/dokku-app-predeploy-tasks) | [michaelshobbs][] | 0.4.0+ |
|
||||
| [SSH Deployment Keys](https://github.com/cedricziel/dokku-deployment-keys)<sup>2</sup> | [cedricziel][] | 0.3.x |
|
||||
| [SSH Hostkeys](https://github.com/cedricziel/dokku-hostkeys-plugin)<sup>3</sup> | [cedricziel][] | 0.3.x |
|
||||
| [Volume (persistent storage)](https://github.com/ohardy/dokku-volume) | [ohardy][] | 0.3.x |
|
||||
| [HTTP Auth Secure Apps](https://github.com/matto1990/dokku-secure-apps) | [matto1990][] | 0.4.0+ |
|
||||
| [Nuke Containers](https://github.com/josegonzalez/dokku-nuke) | [josegonzalez][] | 0.4.0+ |
|
||||
| [Open App Ports](https://github.com/josegonzalez/dokku-ports) | [josegonzalez][] | 0.3.x |
|
||||
| [Proctype Filter](https://github.com/michaelshobbs/dokku-proctype-filter) | [michaelshobbs][] | 0.4.0+ |
|
||||
| [SSH Deployment Keys](https://github.com/cedricziel/dokku-deployment-keys)<sup>3</sup> | [cedricziel][] | 0.4.0+ |
|
||||
| [SSH Hostkeys](https://github.com/cedricziel/dokku-hostkeys-plugin)<sup>4</sup> | [cedricziel][] | 0.3.x |
|
||||
|
||||
[217d00a]: https://github.com/dokku/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>2</sup> Extends app.json support to include creating volumes and creating / linking databases on push
|
||||
|
||||
<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)
|
||||
<sup>3</sup> Adds the possibility to add SSH deployment keys to receive private hosted packages
|
||||
|
||||
<sup>4</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][] | 0.4.0+ |
|
||||
| [APT](https://github.com/F4-Group/dokku-apt) | [F4-Group][] | 0.2.0+ (tag 0.2.0), 0.3.0+ (tag 0.3.0), 0.4.0+ |
|
||||
| [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][] | |
|
||||
| [APT](https://github.com/F4-Group/dokku-apt) | [F4-Group][] | 0.4.0+ |
|
||||
| [Bower install](https://github.com/alexanderbeletsky/dokku-bower-install) | [alexanderbeletsky][] | 0.3.x |
|
||||
| [Bower/Grunt](https://github.com/thrashr888/dokku-bower-grunt-build-plugin) | [thrashr888][] | 0.3.x |
|
||||
| [Bower/Gulp](https://github.com/gdi2290/dokku-bower-gulp-build-plugin) | [gdi2290][] | 0.3.x |
|
||||
| [Bower/Gulp](https://github.com/jagandecapri/dokku-bower-gulp-build-plugin) | [jagandecapri][] | 0.3.x |
|
||||
| [Builders: bower, compass, gulp, grunt](https://github.com/ignlg/dokku-builders-plugin) | [ignlg][] | 0.4.0+ |
|
||||
| [Chef cookbook](https://github.com/nickcharlton/dokku-cookbook) | [nickcharlton][] | |
|
||||
| [Docker auto persist volumes](https://github.com/Flink/dokku-docker-auto-volumes) | [Flink][] | 0.4.0+ |
|
||||
| [HipChat Notifications](https://github.com/cef/dokku-hipchat) | [cef][] | |
|
||||
| [Graphite/statsd](https://github.com/jlachowski/dokku-graphite-plugin) | [jlachowski] | <0.4.0 |
|
||||
| [Graphite/statsd](https://github.com/jlachowski/dokku-graphite-grafana) | [jlachowski] | 0.4.0+, graphite & statsd plugin with grafana dashboard frontend |
|
||||
| [Logspout](https://github.com/michaelshobbs/dokku-logspout) | [michaelshobbs][] | 0.3.26+ |
|
||||
| [Monorepo](https://github.com/iamale/dokku-monorepo) | [iamale][] | 0.4.0+ |
|
||||
| [Node](https://github.com/pnegahdar/dokku-node) | [pnegahdar][] | |
|
||||
| [Node](https://github.com/ademuk/dokku-nodejs) | [ademuk][] | |
|
||||
| [Reset mtime](https://github.com/mixxorz/dokku-docker-reset-mtime) | [mixxorz][] | 0.3.15+, Dockerfile support |
|
||||
| [Hostname](https://github.com/michaelshobbs/dokku-hostname) | [michaelshobbs][] | 0.4.0+ |
|
||||
| [Logspout](https://github.com/michaelshobbs/dokku-logspout) | [michaelshobbs][] | 0.4.0+ |
|
||||
| [Long Timeout](https://github.com/investtools/dokku-long-timeout-plugin) | [investtools][] | 0.4.0+ |
|
||||
| [Monit](https://github.com/cjblomqvist/dokku-monit) | [cjblomqvist][] | 0.3.x |
|
||||
| [Monorepo](https://github.com/iamale/dokku-monorepo) | [iamale][] | 0.4.0+ |
|
||||
| [Node](https://github.com/ademuk/dokku-nodejs) | [ademuk][] | 0.3.x |
|
||||
| [Node](https://github.com/pnegahdar/dokku-node) | [pnegahdar][] | 0.3.x |
|
||||
| [Rollbar](https://github.com/iloveitaly/dokku-rollbar) | [iloveitaly][] | 0.5.0+ |
|
||||
| [Slack Notifications](https://github.com/ribot/dokku-slack) | [ribot][] | 0.4.0+ |
|
||||
| [Tor](https://github.com/michaelshobbs/dokku-tor) | [michaelshobbs][] | 0.4.0+ |
|
||||
| [User ACL](https://github.com/mlebkowski/dokku-acl) | [Maciej Łebkowski][] | 0.4.0+ |
|
||||
| [Webhooks](https://github.com/nickstenning/dokku-webhooks) | [nickstenning][] | |
|
||||
| [Wkhtmltopdf](https://github.com/mbriskar/dokku-wkhtmltopdf) | [mbriskar][] | |
|
||||
| [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.
|
||||
| [Webhooks](https://github.com/nickstenning/dokku-webhooks) | [nickstenning][] | 0.3.x |
|
||||
| [Wkhtmltopdf](https://github.com/mbriskar/dokku-wkhtmltopdf) | [mbriskar][] | 0.4.0+ |
|
||||
| [Wordpress Setup](https://github.com/dudagroup/dokku-wordpress-template) | [abossard][] | |
|
||||
|
||||
### 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) |
|
||||
| [List Containers](https://github.com/heichblatt/dokku-list) | [heichblatt][] | v0.3.14 (ps plugin |
|
||||
| [Link Containers](https://github.com/rlaneve/dokku-link) | [rlaneve][] | v0.3.17 (docker-options plugin) |
|
||||
| [Multiple Domains](https://github.com/wmluke/dokku-domains-plugin)<sup>1</sup> | [wmluke][] | v0.3.10 (domains plugin) |
|
||||
| [Named-containers](https://github.com/Flink/dokku-named-containers) | [Flink][] | v0.4.2 (named-containers 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) |
|
||||
| Plugin | Author | In Dokku Since |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | ----------------------------------------- |
|
||||
| [App User](https://github.com/michaelshobbs/dokku-app-user) | [michaelshobbs][] | v0.7.1 (herokuish 0.3.18) |
|
||||
| [Custom Domains](https://github.com/neam/dokku-custom-domains) | [motin][] | v0.3.10 (domains plugin) |
|
||||
| [Debug](https://github.com/josegonzalez/dokku-debug) | [josegonzalez][] | v0.3.9 (trace command) |
|
||||
| [Docker Options](https://github.com/dyson/dokku-docker-options) | [dyson][] | v0.3.17 (docker-options plugin) |
|
||||
| [Dokku Name](https://github.com/alex-sherwin/dokku-name) | [alex-sherwin][] | v0.4.2 (named containers 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) |
|
||||
| [Link Containers](https://github.com/rlaneve/dokku-link) | [rlaneve][] | v0.3.17 (docker-options plugin) |
|
||||
| [List Containers](https://github.com/josegonzalez/dokku-list) | [josegonzalez][] | v0.3.14 (ps plugin) |
|
||||
| [Multi-Buildpack](https://github.com/pauldub/dokku-multi-buildpack) | [pauldub][] | v0.4.0 (herokuish) |
|
||||
| [Multiple Domains](https://github.com/wmluke/dokku-domains-plugin)<sup>1</sup> | [wmluke][] | v0.3.10 (domains plugin) |
|
||||
| [Named-containers](https://github.com/Flink/dokku-named-containers) | [Flink][] | v0.4.2 (named-containers 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) |
|
||||
| [Pre-Deploy Tasks](https://github.com/michaelshobbs/dokku-app-predeploy-tasks) | [michaelshobbs][] | v0.5.0 (deployment tasks) |
|
||||
| [PrimeCache](https://github.com/darkpixel/dokku-prime-cache) | [darkpixel][] | v0.3.0 (zero downtime deploys) |
|
||||
| [Process Manager: Circus](https://github.com/apmorton/dokku-circus) | [apmorton][] | v0.3.14/0.7.0 (ps/restart policy plugin) |
|
||||
| [Process Manager: Forego](https://github.com/Flink/dokku-forego) | [Flink][] | v0.3.14/0.7.0 (ps plugin) |
|
||||
| [Process Manager: Forego](https://github.com/iskandar/dokku-forego) | [iskandar][] | v0.3.14/0.7.0 (ps plugin) |
|
||||
| [Process Manager: Logging Supervisord](https://github.com/sehrope/dokku-logging-supervisord) | [sehrope][] | v0.3.14/0.7.0 (ps plugin) |
|
||||
| [Process Manager: Shoreman ](https://github.com/statianzo/dokku-shoreman) | [statianzo][] | v0.3.14/0.7.0 (ps plugin) |
|
||||
| [Process Manager: Supervisord](https://github.com/statianzo/dokku-supervisord) | [statianzo][] | v0.3.14/0.7.0 (ps plugin) |
|
||||
| [Rebuild application](https://github.com/scottatron/dokku-rebuild) | [scottatron][] | v0.3.14 (ps plugin) |
|
||||
| [Reset mtime](https://github.com/mixxorz/dokku-docker-reset-mtime) | [mixxorz][] | Docker 1.8+ |
|
||||
| [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/motin/dokku-user-env-compile)<sup>2</sup> | [motin][] | 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) |
|
||||
| [VHOSTS Custom Configuration](https://github.com/neam/dokku-nginx-vhosts-custom-configuration) | [motin][] | v0.3.10 (domains plugin) |
|
||||
| [Volume (persistent storage)](https://github.com/ohardy/dokku-volume) | [ohardy][] | v0.5.0 (storage 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)
|
||||
@@ -271,10 +270,14 @@ The following plugins are no longer maintained by their developers.
|
||||
| Plugin | Author | Compatibility |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [app-url](https://github.com/mikecsh/dokku-app-url) | [mikecsh][] | Works with 0.2.0 |
|
||||
| [Chef cookbooks](https://github.com/fgrehm/chef-dokku) | [fgrehm][] | |
|
||||
| [CouchDB (multi containers)](https://github.com/Flink/dokku-couchdb-multi-containers) | [Flink][] | 0.4.0+ |
|
||||
| [CouchDB](https://github.com/racehub/dokku-couchdb-plugin) | [RaceHub][] | Compatible with 0.2.0 |
|
||||
| [Dokku Copy App Config Files](https://github.com/alexkruegger/dokku-app-configfiles) | [alexkruegger][] | Compatible with 0.3.17+ |
|
||||
| [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 |
|
||||
| [Graphite/statsd](https://github.com/jlachowski/dokku-graphite-plugin) | [jlachowski][] | < 0.4.0 |
|
||||
| [HipChat Notifications](https://github.com/cef/dokku-hipchat) | [cef][] | |
|
||||
| [Memcached](https://github.com/Flink/dokku-memcached-plugin) | [Flink][] | 0.4.0+ |
|
||||
| [MongoDB (single container)](https://github.com/jeffutter/dokku-mongodb-plugin) | [jeffutter][] | |
|
||||
| [MySQL](https://github.com/hughfletcher/dokku-mysql-plugin) | [hughfletcher][] | |
|
||||
@@ -283,3 +286,6 @@ The following plugins are no longer maintained by their developers.
|
||||
| [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). |
|
||||
| [RiakCS (single container)](https://github.com/jeffutter/dokku-riakcs-plugin) | [jeffutter][] | Incompatible with 0.2.0 (checked at [dccee02][]) |
|
||||
| [Redis](https://github.com/luxifer/dokku-redis-plugin) | [luxifer][] | |
|
||||
| [Redis](https://github.com/sekjun9878/dokku-redis-plugin) | [sekjun9878][] | 0.3.26+ |
|
||||
|
||||
<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.
|
||||
@@ -1,8 +0,0 @@
|
||||
# Components
|
||||
|
||||
* [Docker](https://github.com/dotcloud/docker) - Container runtime and manager
|
||||
* [Herokuish](https://github.com/gliderlabs/herokuish) - Buildpack builder
|
||||
* [plugn](https://github.com/dokku/plugn) - Shell based plugins and hooks
|
||||
* [sshcommand](https://github.com/dokku/sshcommand) - Fixed commands over SSH
|
||||
|
||||
Looking to keep codebase as simple and hackable as possible, so try to keep your line count down.
|
||||
@@ -2,45 +2,42 @@
|
||||
|
||||
> Note: This is a work in progress.
|
||||
|
||||
### DNS Versions
|
||||
## 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
|
||||
## 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
|
||||
## 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/dokku/dokku/blob/master/README.md) to get dokku installed. Don't do the install just yet though.
|
||||
* You have a server on the internet and are about to follow the instructions in the [README](https://github.com/dokku/dokku/blob/master/README.md) to get Dokku installed. Don't do the install just yet though.
|
||||
|
||||
## Caching
|
||||
|
||||
### HELP!
|
||||
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.
|
||||
|
||||
## HELP!
|
||||
|
||||
Don't be afraid to ask if you need help. Create a [new issue](https://github.com/dokku/dokku/issues) and someone will be glad to assist you.
|
||||
|
||||
|
||||
# Getting started
|
||||
## Getting started
|
||||
|
||||
For the examples, we will use the domain name `example.tld` and the IP address `127.0.0.1`.
|
||||
|
||||
Dokku uses 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`.
|
||||
Dokku uses 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 to it and run `ifconfig` or `ip addr` to see the IP address.
|
||||
To get started, you need to know the IP address of your Dokku server. Connect to it and run `ifconfig` or `ip addr` to see the IP address.
|
||||
|
||||
# Caching
|
||||
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?
|
||||
|
||||
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.
|
||||
In other words, do you want your applications on your Dokku server accessible via `myapp.example.tld` or via `myapp.myserver.example.tld`?
|
||||
|
||||
## 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 (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`.
|
||||
|
||||
@@ -73,9 +70,9 @@ If everything is working correctly, you should also be able to query for any oth
|
||||
|
||||
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/dokku/dokku/blob/master/README.md)
|
||||
Proceed with the setup instructions in the [installation documentation](/dokku/getting-started/installation/)
|
||||
|
||||
### Using the root of your domain (myapp.example.tld)
|
||||
#### Using the root of your domain (myapp.example.tld)
|
||||
|
||||
This section is a work in progress. It is incomplete.
|
||||
|
||||
101
docs/configuration/domains.md
Normal file
@@ -0,0 +1,101 @@
|
||||
# Domain Configuration
|
||||
|
||||
> New as of 0.3.10
|
||||
|
||||
```
|
||||
domains:add <app> <domain> [<domain> ...] # Add domains to app
|
||||
domains:add-global <domain> [<domain> ...] # Add global domain names
|
||||
domains [<app>] # List domains
|
||||
domains:clear <app> # Clear all domains for app
|
||||
domains:disable <app> # Disable VHOST support
|
||||
domains:enable <app> # Enable VHOST support
|
||||
domains:remove <app> <domain> [<domain> ...] # Remove domains from app
|
||||
domains:remove-global <domain> [<domain> ...] # Remove global domain names
|
||||
```
|
||||
|
||||
> Adding a domain before deploying an application will result in port mappings being set. This may cause issues for applications that use non-standard ports, as those will not be automatically detected. Please refer to the [proxy documentation](/dokku/advanced-usage/proxy-management/) for information as to how to reconfigure the mappings.
|
||||
|
||||
## 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.tld` is set during initial configuration and stored in the `$DOKKU_ROOT/VHOST` file. It can then be modified with `dokku domains:add-global` and `dokku domains:remove-global`. This value is used as a default TLD for all applications on a host.
|
||||
|
||||
If a FQDN such as `other.tld` is used as the application name, the default `$DOKKU_ROOT/VHOST` will be ignored and the resulting vhost URL for that application will be `other.tld`. The exception to this rule being that if the FQDN has the same ending as the default vhost (such as `subdomain.domain.tld`), then the entire FQDN will be treated as a subdomain. The application will therefore be deployed at `subdomain.domain.tld.domain.tld`.
|
||||
|
||||
You can optionally override this in a plugin by implementing the `nginx-hostname` plugin trigger. For example, you can reverse the subdomain with the following sample `nginx-hostname` plugin trigger:
|
||||
|
||||
```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.
|
||||
|
||||
## Disabling VHOSTS
|
||||
|
||||
If desired, it is possible to disable vhosts with the domains plugin.
|
||||
|
||||
```shell
|
||||
dokku domains:disable myapp
|
||||
```
|
||||
|
||||
On subsequent deploys, the nginx virtualhost will be discarded. This is useful when deploying internal-facing services that should not be publicly routeable. As of 0.4.0, nginx will still be configured to proxy your app on some random high port. This allows internal services to maintain the same port between deployments. You may change this port by setting `DOKKU_NGINX_PORT` and/or `DOKKU_NGINX_SSL_PORT` (for services configured to use SSL.)
|
||||
|
||||
|
||||
The domains plugin allows you to specify custom domains for applications. This plugin is aware of any ssl certificates that are imported via `certs:add`. Be aware that disabling domains (with `domains:disable`) will override any custom domains.
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## 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 the global nginx configuration. 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).
|
||||
|
||||
```nginx
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
server_name _;
|
||||
return 410;
|
||||
log_not_found off;
|
||||
}
|
||||
```
|
||||
|
||||
You may also wish to use a separate vhost in your `/etc/nginx/sites-enabled` directory. To do so, create the vhost in that directory as `/etc/nginx/sites-enabled/00-default.conf`. You will also need to change two lines in the main `nginx.conf`:
|
||||
|
||||
```nginx
|
||||
# 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 the following
|
||||
|
||||
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.
|
||||
@@ -13,6 +13,8 @@ config:unset (<app>|--global) KEY1 [KEY2 ...] Unset one or more conf
|
||||
|
||||
The variables are available both at run time and during the application build/compilation step for buildpack-based deploys. For security reasons - and as per [docker recommendations](https://github.com/docker/docker/issues/13490) - Dockerfile-based deploys have variables available *only* during runtime, as noted in [this issue](https://github.com/dokku/dokku/issues/1860).
|
||||
|
||||
For buildpack deploys, Dokku will create a `/app/.env` file that can be used for legacy buildpacks. Note that this is *not* updated when `config:set` or `config:unset` is called, and is only written during a `deploy` or `ps:rebuild`. Developers are encouraged to instead read from the application environment directly, as the proper values will be available then.
|
||||
|
||||
> Note: Global `ENV` files are sourced before app-specific `ENV` files. 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.
|
||||
|
||||
You can set multiple environment variables at once:
|
||||
237
docs/configuration/nginx.md
Normal file
@@ -0,0 +1,237 @@
|
||||
# Nginx Configuration
|
||||
|
||||
Dokku uses nginx as its 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
|
||||
|
||||
```
|
||||
nginx:access-logs <app> [-t] # Show the nginx access logs for an application (-t follows)
|
||||
nginx:build-config <app> # (Re)builds nginx config for given app
|
||||
nginx:error-logs <app> [-t] # Show the nginx error logs for an application (-t follows)
|
||||
```
|
||||
|
||||
## Customizing the nginx configuration
|
||||
|
||||
> New as of 0.5.0
|
||||
|
||||
Dokku uses a templating library by the name of [sigil](https://github.com/gliderlabs/sigil) to generate nginx configuration for each app. You may also provide a custom template for your application as follows:
|
||||
|
||||
- Copy the following example template to a file named `nginx.conf.sigil` and either:
|
||||
- check it into the root of your app repo for buildpack applications
|
||||
- `ADD` it to your dockerfile `WORKDIR`
|
||||
- if your dockerfile has no `WORKDIR`, `ADD` it to the `/app` folder
|
||||
|
||||
> When using a custom `nginx.conf.sigil` file, depending upon your application configuration, you *may* be exposing the file externally. As this file is extracted before the container is run, you can, safely delete it in a custom `entrypoint.sh` configured in a Dockerfile `ENTRYPOINT`.
|
||||
|
||||
### Example Custom Template
|
||||
|
||||
Use case: add an `X-Served-By` header to requests
|
||||
|
||||
```go
|
||||
server {
|
||||
listen [::]:{{ .NGINX_PORT }};
|
||||
listen {{ .NGINX_PORT }};
|
||||
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;
|
||||
|
||||
gzip on;
|
||||
gzip_min_length 1100;
|
||||
gzip_buffers 4 32k;
|
||||
gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/x-javascript application/json application/xml application/rss+xml font/truetype application/x-font-ttf font/opentype application/vnd.ms-fontobject image/svg+xml;
|
||||
gzip_vary on;
|
||||
gzip_comp_level 6;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
upstream {{ .APP }} {
|
||||
{{ range .DOKKU_APP_LISTENERS | split " " }}
|
||||
server {{ . }};
|
||||
{{ end }}
|
||||
}
|
||||
```
|
||||
|
||||
### Available template variables
|
||||
|
||||
```
|
||||
{{ .APP }} Application name
|
||||
{{ .APP_SSL_PATH }} Path to SSL certificate and key
|
||||
{{ .DOKKU_ROOT }} Global Dokku root directory (ex: app dir would be `{{ .DOKKU_ROOT }}/{{ .APP }}`)
|
||||
{{ .DOKKU_APP_LISTENERS }} List of IP:PORT pairs of app containers
|
||||
{{ .NGINX_PORT }} Non-SSL nginx listener port (same as `DOKKU_NGINX_PORT` config var)
|
||||
{{ .NGINX_SSL_PORT }} SSL nginx listener port (same as `DOKKU_NGINX_SSL_PORT` config var)
|
||||
{{ .NOSSL_SERVER_NAME }} List of non-SSL VHOSTS
|
||||
{{ .PROXY_PORT_MAP }} List of port mappings (same as `DOKKU_PROXY_PORT_MAP` config var)
|
||||
{{ .PROXY_UPSTREAM_PORTS }} List of configured upstream ports (derived from `DOKKU_PROXY_PORT_MAP` config var)
|
||||
{{ .RAW_TCP_PORTS }} List of exposed tcp ports as defined by Dockerfile `EXPOSE` directive (**Dockerfile apps only**)
|
||||
{{ .SSL_INUSE }} Boolean set when an app is SSL-enabled
|
||||
{{ .SSL_SERVER_NAME }} List of SSL VHOSTS
|
||||
```
|
||||
|
||||
> Note: Application config variables are available for use in custom templates. To do so, use the form of `{{ var "FOO" }}` to access a variable named `FOO`.
|
||||
|
||||
|
||||
### Example HTTP to HTTPS Custom Template
|
||||
Use case: a simple dockerfile app that includes `EXPOSE 80`
|
||||
|
||||
```go
|
||||
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;
|
||||
|
||||
return 301 https://$host:443$request_uri;
|
||||
}
|
||||
server {
|
||||
listen [::]:443 ssl spdy;
|
||||
listen 443 ssl spdy;
|
||||
{{ if .SSL_SERVER_NAME }}server_name {{ .SSL_SERVER_NAME }}; {{ end }}
|
||||
|
||||
access_log /var/log/nginx/{{ .APP }}-access.log;
|
||||
error_log /var/log/nginx/{{ .APP }}-error.log;
|
||||
|
||||
ssl_certificate {{ .APP_SSL_PATH }}/server.crt;
|
||||
ssl_certificate_key {{ .APP_SSL_PATH }}/server.key;
|
||||
|
||||
keepalive_timeout 70;
|
||||
add_header Alternate-Protocol 443:npn-spdy/2;
|
||||
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;
|
||||
}
|
||||
|
||||
upstream {{ .APP }} {
|
||||
{{ range .DOKKU_APP_LISTENERS | split " " }}
|
||||
server {{ . }};
|
||||
{{ end }}
|
||||
}
|
||||
```
|
||||
|
||||
### Example using new proxy port mapping
|
||||
|
||||
```go
|
||||
{{ range $port_map := .PROXY_PORT_MAP | split " " }}
|
||||
{{ $port_map_list := $port_map | split ":" }}
|
||||
{{ $scheme := index $port_map_list 0 }}
|
||||
{{ $listen_port := index $port_map_list 1 }}
|
||||
{{ $upstream_port := index $port_map_list 2 }}
|
||||
|
||||
server {
|
||||
listen [::]:{{ $listen_port }};
|
||||
listen {{ $listen_port }};
|
||||
server_name {{ $.NOSSL_SERVER_NAME }};
|
||||
access_log /var/log/nginx/{{ $.APP }}-access.log;
|
||||
error_log /var/log/nginx/{{ $.APP }}-error.log;
|
||||
|
||||
location / {
|
||||
|
||||
gzip on;
|
||||
gzip_min_length 1100;
|
||||
gzip_buffers 4 32k;
|
||||
gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/x-javascript application/json application/xml application/rss+xml font/truetype application/x-font-ttf font/opentype application/vnd.ms-fontobject image/svg+xml;
|
||||
gzip_vary on;
|
||||
gzip_comp_level 6;
|
||||
|
||||
proxy_pass http://{{ $.APP }}-{{ $upstream_port }};
|
||||
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;
|
||||
}
|
||||
|
||||
{{ range $upstream_port := $.PROXY_UPSTREAM_PORTS | split " " }}
|
||||
upstream {{ $.APP }}-{{ $upstream_port }} {
|
||||
{{ range $listeners := $.DOKKU_APP_LISTENERS | split " " }}
|
||||
{{ $listener_list := $listeners | split ":" }}
|
||||
{{ $listener_ip := index $listener_list 0 }}
|
||||
{{ $listener_port := index $listener_list 1 }}
|
||||
server {{ $listener_ip }}:{{ $upstream_port }};{{ end }}
|
||||
}
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
### Customizing via configuration files included by the default templates
|
||||
|
||||
The default nginx.conf template will include everything from your apps `nginx.conf.d/` subdirectory in the main `server {}` block (see above):
|
||||
|
||||
```go
|
||||
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
|
||||
|
||||
```shell
|
||||
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
|
||||
```
|
||||
|
||||
The example above uses additional configuration files directly on the Dokku host. Unlike the `nginx.conf.sigil` file, these additional files will not be copied over from your application repo, and thus need to be placed in the `/home/dokku/myapp/nginx.conf.d/` directory manually.
|
||||
|
||||
## Domains plugin
|
||||
|
||||
See the [domain configuration documentation](/dokku/configuration/domains/).
|
||||
|
||||
## Customizing hostnames
|
||||
|
||||
See the [customizing hostnames documentation](/dokku/configuration/domains/#customizing-hostnames).
|
||||
|
||||
## Disabling VHOSTS
|
||||
|
||||
See the [disabling vhosts documentation](/dokku/configuration/domains/#disabling-vhosts).
|
||||
|
||||
## Default site
|
||||
|
||||
See the [default site documentation](/dokku/configuration/domains/#default-site).
|
||||
|
||||
## Running behind a load balancer
|
||||
|
||||
See the [load balancer documentation](/dokku/configuration/ssl/#running-behind-a-load-balancer).
|
||||
|
||||
## HSTS Header
|
||||
|
||||
See the [HSTS documentation](/dokku/configuration/ssl/#hsts-header).
|
||||
|
||||
## SSL Configuration
|
||||
|
||||
See the [ssl documentation](/dokku/configuration/ssl/).
|
||||
|
||||
## Disabling Nginx
|
||||
|
||||
See the [proxy documentation](/dokku/advanced-usage/proxy-management/).
|
||||
|
||||
## Managing Proxy Port mappings
|
||||
|
||||
See the [proxy documentation](/dokku/advanced-usage/proxy-management/#proxy-port-mapping).
|
||||
@@ -5,16 +5,20 @@
|
||||
Dokku supports SSL/TLS certificate inspection and CSR/Self-signed certificate generation via the `certs` plugin. Note that whenever SSL/TLS support is enabled SPDY is also enabled.
|
||||
|
||||
```
|
||||
certs:add <app> CRT KEY Add an ssl endpoint to an app. Can also import from a tarball on stdin.
|
||||
certs:generate <app> DOMAIN Generate a key and certificate signing request (and self-signed certificate)
|
||||
certs:info <app> Show certificate information for an ssl endpoint.
|
||||
certs:remove <app> Remove an SSL Endpoint from an app.
|
||||
certs:update <app> CRT KEY Update an SSL Endpoint on an app. Can also import from a tarball on stdin
|
||||
certs:add <app> CRT KEY # Add an ssl endpoint to an app. Can also import from a tarball on stdin.
|
||||
certs:generate <app> DOMAIN # Generate a key and certificate signing request (and self-signed certificate)
|
||||
certs:info <app> # Show certificate information for an ssl endpoint.
|
||||
certs:remove <app> # Remove an SSL Endpoint from an app.
|
||||
certs:update <app> CRT KEY # Update an SSL Endpoint on an app. Can also import from a tarball on stdin
|
||||
```
|
||||
|
||||
```shell
|
||||
# for 0.3.x
|
||||
dokku nginx:import-ssl <app> < certs.tar
|
||||
```
|
||||
|
||||
> Adding an ssl certificate before deploying an application will result in port mappings being updated. This may cause issues for applications that use non-standard ports, as those may not be automatically detected. Please refer to the [proxy documentation](/dokku/advanced-usage/proxy-management/) for information as to how to reconfigure the mappings.
|
||||
|
||||
## Per-application certificate management
|
||||
|
||||
Dokku provides built-in support for managing SSL certificates on a per-application basis. SSL is managed via nginx outside of application containers, and as such can be updated on-the-fly without rebuilding containers. At this time, applications only support a single SSL certificate at a time. To support multiple domains for a single application, wildcard certificate usage is encouraged.
|
||||
@@ -35,6 +39,12 @@ dokku certs:add <app> < cert-key.tar
|
||||
cat yourdomain_com.crt yourdomain_com.ca-bundle > server.crt
|
||||
```
|
||||
|
||||
#### SSL and Multiple Domains
|
||||
|
||||
When an SSL certificate is associated to an application, the certificate will be associated with *all* domains currently associated with said application. Your certificate _should_ be associated with all of those domains, otherwise accessing the application will result in SSL errors. If you wish to remove one of the domains from the application, refer to the [domain configuration documentation](/dokku/configuration/domains/).
|
||||
|
||||
Note that with the default nginx template, requests will be redirected to the `https` version of the domain. If this is not the desired state of request resolution, you may customize the nginx template in use. For more details, see the [nginx documentation](/dokku/configuration/nginx/).
|
||||
|
||||
### Certificate generation
|
||||
|
||||
> Note: Using this method will create a self-signed certificate, which is only recommended for development or staging use, not production environments.
|
||||
@@ -47,8 +57,11 @@ If you decide to obtain a CA signed certficate, you can import that certificate
|
||||
|
||||
The `certs:info` command will simply inspect the install SSL cert and print out details. NOTE: The server-wide certificate will be inspect if installed and no app-specific certificate exists.
|
||||
|
||||
```shell
|
||||
dokku certs:info node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
root@dokku:~/dokku# dokku certs:info node-js-app
|
||||
-----> Fetching SSL Endpoint info for node-js-app...
|
||||
-----> Certificate details:
|
||||
=====> Common Name(s):
|
||||
@@ -67,7 +80,7 @@ The `certs:remove` command only works on app-specific certificates. It will `rm`
|
||||
|
||||
## 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.
|
||||
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.
|
||||
|
||||
@@ -75,15 +88,9 @@ Beware that if you enable the header and a subsequent deploy of your application
|
||||
|
||||
Your application has access to the HTTP headers `X-Forwarded-Proto`, `X-Forwarded-For` and `X-Forwarded-Port`. These headers indicate the protocol of the original request (HTTP or HTTPS), the port number, and the IP address of the client making the request, respectively. The default configuration is for Nginx to set these headers.
|
||||
|
||||
If your server runs behind an HTTP/S load balancer, then Nginx will see all requests as coming from the load balancer. If your load balancer sets the `X-Forwarded-` headers, you can tell Nginx to pass these headers from load balancer to your application by using the following [nginx custom template](/dokku/nginx/#customizing-the-nginx-configuration)
|
||||
|
||||
```shell
|
||||
upstream {{ .APP }} {
|
||||
{{ range .DOKKU_APP_LISTENERS | split " " }}
|
||||
server {{ . }};
|
||||
{{ end }}
|
||||
}
|
||||
If your server runs behind an HTTP/S load balancer, then Nginx will see all requests as coming from the load balancer. If your load balancer sets the `X-Forwarded-` headers, you can tell Nginx to pass these headers from load balancer to your application by using the following [nginx custom template](/dokku/configuration/nginx/#customizing-the-nginx-configuration)
|
||||
|
||||
```go
|
||||
server {
|
||||
listen [::]:{{ .NGINX_PORT }};
|
||||
listen {{ .NGINX_PORT }};
|
||||
@@ -91,9 +98,6 @@ server {
|
||||
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;
|
||||
@@ -107,6 +111,12 @@ server {
|
||||
}
|
||||
include {{ .DOKKU_ROOT }}/{{ .APP }}/nginx.conf.d/*.conf;
|
||||
}
|
||||
|
||||
upstream {{ .APP }} {
|
||||
{{ range .DOKKU_APP_LISTENERS | split " " }}
|
||||
server {{ . }};
|
||||
{{ end }}
|
||||
}
|
||||
```
|
||||
|
||||
Only use this option if:
|
||||
@@ -116,3 +126,7 @@ Only use this option if:
|
||||
If it's possible to make HTTP/S requests directly to Nginx, bypassing the load balancer, or if the load balancer is not configured to set these headers, then it becomes possible for a client to set these headers to arbitrary values.
|
||||
|
||||
This could result in security issue, for example, if your application looks at the value of the `X-Forwarded-Proto` to determine if the request was made over HTTPS.
|
||||
|
||||
### SSL Port Exposure
|
||||
|
||||
When your app is served from port `80` then the `/home/dokku/APP/nginx.conf` file will automatically be updated to instruct nginx to respond to ssl on port 443 as a new cert is added. If your app uses a non-standard port (perhaps you have a dockerfile deploy exposing port `99999`) you may need to manually expose an ssl port via `dokku proxy:ports-add <APP> https:443:99999`.
|
||||
@@ -14,16 +14,16 @@ git clone git@github.com:heroku/ruby-rails-sample.git
|
||||
Create the application on the Dokku host. You will need to ssh onto the host to run this command.
|
||||
|
||||
```shell
|
||||
# on your dokku host
|
||||
# on your Dokku host
|
||||
dokku apps:create ruby-rails-sample
|
||||
```
|
||||
|
||||
### Create the backing services
|
||||
|
||||
When you create a new app, Dokku by default *does not* provide any datastores such as MySQL or PostgreSQL. You will need to install plugins to handle that, but fortunately [Dokku has official plugins](/dokku/plugins/#official-plugins-beta) for common datastores. Our sample app requires a PostgreSQL service:
|
||||
When you create a new app, Dokku by default *does not* provide any datastores such as MySQL or PostgreSQL. You will need to install plugins to handle that, but fortunately [Dokku has official plugins](/dokku/community/plugins/#official-plugins-beta) for common datastores. Our sample app requires a PostgreSQL service:
|
||||
|
||||
```shell
|
||||
# on your dokku host
|
||||
# on your Dokku host
|
||||
# install the postgres plugin
|
||||
# plugin installation requires root, hence the user change
|
||||
sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git
|
||||
@@ -39,7 +39,7 @@ dokku postgres:create rails-database
|
||||
Once the service creation is complete, set the `POSTGRES_URL` environment variable by linking the service.
|
||||
|
||||
```shell
|
||||
# on your dokku host
|
||||
# on your Dokku host
|
||||
# each official datastore offers a `link` method to link a service to any application
|
||||
dokku postgres:link rails-database ruby-rails-sample
|
||||
```
|
||||
@@ -56,8 +56,6 @@ git remote add dokku dokku@dokku.me:ruby-rails-sample
|
||||
git push dokku master
|
||||
```
|
||||
|
||||
You should see output similar to the following:
|
||||
|
||||
```
|
||||
Counting objects: 231, done.
|
||||
Delta compression using up to 8 threads.
|
||||
@@ -78,47 +76,15 @@ Total 231 (delta 93), reused 147 (delta 53)
|
||||
Using rake 10.4.2
|
||||
|
||||
...
|
||||
```
|
||||
|
||||
When the deploy finishes, the application's URL will be shown.
|
||||
|
||||
```shell
|
||||
=====> Application deployed:
|
||||
http://ruby-rails-sample.dokku.me
|
||||
```
|
||||
|
||||
When the deploy finishes, the application's URL will be shown as seen above.
|
||||
|
||||
Dokku supports deploying applications via [Heroku buildpacks](https://devcenter.heroku.com/articles/buildpacks) with [Herokuish](https://github.com/gliderlabs/herokuish#buildpacks) or using a project's [dockerfile](https://docs.docker.com/reference/builder/).
|
||||
|
||||
### Removing a deployed app
|
||||
|
||||
You can also remove an application from your Dokku installation. This will unlink all linked services and destroy any config related to the application. Note that linked services will retain their data for later use (or removal).
|
||||
|
||||
```shell
|
||||
# on your dokku host
|
||||
# replace APP with the name of your application
|
||||
dokku apps:destroy APP
|
||||
```
|
||||
|
||||
This will prompt you to verify the application's name before destroying it. You may also use the `--force` flag to circumvent this verification process:
|
||||
|
||||
```shell
|
||||
# on your dokku host
|
||||
# replace APP with the name of your application
|
||||
dokku --force apps:destroy APP
|
||||
```
|
||||
|
||||
### Renaming a deployed app
|
||||
|
||||
> New as of 0.4.7
|
||||
|
||||
You can rename a deployed app using the `apps:rename` CLI tool:
|
||||
|
||||
```shell
|
||||
# on your dokku host
|
||||
dokku apps:rename OLD_NAME NEW_NAME
|
||||
```
|
||||
|
||||
This will copy all of your app's contents into a new app directory with the name of your choice, delete your old app, then rebuild the new version of the app and deploy it. All of your config variables, including database urls, will be preserved.
|
||||
|
||||
### Deploying non-master branch
|
||||
|
||||
@@ -131,7 +97,7 @@ You can also support pushing multiple branches using the [receive-branch](/dokku
|
||||
If you only want to rebuild and tag a container, you can skip the deployment phase by setting `$DOKKU_SKIP_DEPLOY` to `true` by running:
|
||||
|
||||
``` shell
|
||||
# on your dokku host
|
||||
# on your Dokku host
|
||||
dokku config:set ruby-rails-sample DOKKU_SKIP_DEPLOY=true
|
||||
```
|
||||
|
||||
@@ -140,7 +106,7 @@ dokku config:set ruby-rails-sample DOKKU_SKIP_DEPLOY=true
|
||||
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 `/home/dokku/.ssh/` and potentially add github.com (or your VCS host key) into `/home/dokku/.ssh/known_hosts`. The following test should help confirm you've done it correctly.
|
||||
|
||||
```shell
|
||||
# on your dokku host
|
||||
# on your Dokku host
|
||||
su - dokku
|
||||
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
|
||||
ssh -T git@github.com
|
||||
@@ -152,28 +118,34 @@ Note that if the buildpack or dockerfile build process require ssh key access fo
|
||||
|
||||
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:ruby-rails-sample
|
||||
$ git push dokku master
|
||||
```shell
|
||||
git remote add dokku dokku@dokku.me:ruby-rails-sample
|
||||
git push dokku master
|
||||
```
|
||||
|
||||
Is deployed to,
|
||||
|
||||
remote: -----> Application deployed:
|
||||
remote: http://ruby-rails-sample.dokku.me
|
||||
```
|
||||
remote: -----> Application deployed:
|
||||
remote: http://ruby-rails-sample.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
|
||||
```shell
|
||||
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
|
||||
```
|
||||
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
|
||||
```shell
|
||||
git remote add dokku dokku@dokku.me:dokku.me
|
||||
git push dokku master
|
||||
```
|
||||
|
||||
... deployment ...
|
||||
|
||||
@@ -182,30 +154,38 @@ This is in particular useful, then you want to deploy to root domain, as
|
||||
|
||||
## Dokku/Docker Container Management Compatibility
|
||||
|
||||
Dokku is, at its 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/dokku/dokku/issues/1220), dokku executes a cleanup function prior to every deployment.
|
||||
Dokku is, at its 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/dokku/dokku/issues/1220), dokku executes a cleanup function prior to every deployment.
|
||||
|
||||
As of 0.5.x, this function removes all containers with the label `dokku` where the status is either `dead` or `exited`, as well as all `dangling` images. Previous versions would remove `dead` or `exited` containers, regardless of their label.
|
||||
|
||||
### Adding deploy users
|
||||
## Adding deploy users
|
||||
|
||||
See the [user management documentation](/dokku/deployment/user-management).
|
||||
|
||||
## Default vhost
|
||||
|
||||
See the [nginx documentation](/dokku/nginx/#default-site).
|
||||
See the [nginx documentation](/dokku/configuration/nginx/#default-site).
|
||||
|
||||
## Dockerfile deployment
|
||||
|
||||
See the [dockerfile documentation](/dokku/deployment/dockerfiles/).
|
||||
See the [dockerfile documentation](/dokku/deployment/methods/dockerfiles/).
|
||||
|
||||
### Specifying a custom buildpack
|
||||
## Specifying a custom buildpack
|
||||
|
||||
See the [buildpack documentation](/dokku/deployment/buildpacks/).
|
||||
See the [buildpack documentation](/dokku/deployment/methods/buildpacks/).
|
||||
|
||||
## Image tagging
|
||||
|
||||
See the [image tagging documentation](/dokku/deployment/images).
|
||||
See the [image tagging documentation](/dokku/deployment/methods/images/).
|
||||
|
||||
## Removing a deployed app
|
||||
|
||||
See the [application management documentation](/dokku/deployment/application-management/#removing-a-deployed-app).
|
||||
|
||||
### Renaming a deployed app
|
||||
|
||||
See the [application management documentation](/dokku/deployment/application-management/#renaming-a-deployed-app).
|
||||
|
||||
## Zero downtime deploy
|
||||
|
||||
See the [zero-downtime deploy documentation](/dokku/checks-examples/).
|
||||
See the [zero-downtime deploy documentation](/dokku/deployment/zero-downtime-deploys/).
|
||||
114
docs/deployment/application-management.md
Normal file
@@ -0,0 +1,114 @@
|
||||
# Application Management
|
||||
|
||||
> New as of 0.3.1
|
||||
|
||||
```
|
||||
apps # List your apps
|
||||
apps:create <app> # Create a new app
|
||||
apps:destroy <app> # Permanently destroy an app
|
||||
apps:rename <old-app> <new-app> # Rename an app
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Listing Applications
|
||||
|
||||
You can easily list all available applications using the `apps` command:
|
||||
|
||||
```shell
|
||||
dokku apps
|
||||
```
|
||||
|
||||
```
|
||||
=====> My Apps
|
||||
node-js-app
|
||||
python-app
|
||||
```
|
||||
|
||||
Note that you can easily hide extra output from Dokku commands by using the `--quiet` flag, which makes it easier to parse on the command-line.
|
||||
|
||||
```shell
|
||||
dokku --quiet apps
|
||||
```
|
||||
|
||||
```
|
||||
node-js-app
|
||||
python-app
|
||||
```
|
||||
|
||||
### Manually creating an application
|
||||
|
||||
A common pattern for deploying applications to Dokku is to configure an application before deploying it. You can do so via the `apps:create` command:
|
||||
|
||||
```shell
|
||||
dokku apps:create node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
Creating node-js-app... done
|
||||
```
|
||||
|
||||
Once created, you can configure the application as normal, and deploy the application whenever ready. This is useful for cases where you may wish to do any of the following kinds of tasks:
|
||||
|
||||
- configure domain names and ssl certificates
|
||||
- create and link datastores
|
||||
- set environment variables
|
||||
|
||||
### Removing a deployed app
|
||||
|
||||
In some cases, you may need to destroy an application, whether it is because the application is temporary or because it was misconfigured. In these cases, you can use the `apps:destroy` command. Performing any destructive actions in Dokku requires confirmation, and this command will ask for the name of the application being deleted before doing so.
|
||||
|
||||
```shell
|
||||
dokku apps:destroy node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
! WARNING: Potentially Destructive Action
|
||||
! This command will destroy node-js-app (including all add-ons).
|
||||
! To proceed, type "node-js-app"
|
||||
|
||||
> node-js-app
|
||||
Destroying node-js-app (including all add-ons)
|
||||
```
|
||||
|
||||
This will prompt you to verify the application's name before destroying it. You may also use the `--force` flag to circumvent this verification process:
|
||||
|
||||
```shell
|
||||
dokku --force apps:destroy node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
Destroying node-js-app (including all add-ons)
|
||||
```
|
||||
|
||||
|
||||
Destroying an application will unlink all linked services and destroy any config related to the application. Note that linked services will retain their data for later use (or removal).
|
||||
|
||||
### Renaming a deployed app
|
||||
|
||||
> New as of 0.4.7
|
||||
|
||||
You can rename a deployed app using the `apps:rename` command. Note that the application *must* have been deployed at least once, or the rename will not complete successfully:
|
||||
|
||||
```shell
|
||||
dokku apps:rename node-js-app io-js-app
|
||||
```
|
||||
|
||||
```
|
||||
Destroying node-js-app (including all add-ons)
|
||||
-----> Cleaning up...
|
||||
-----> Building io-js-app from herokuish...
|
||||
-----> Adding BUILD_ENV to build environment...
|
||||
-----> Node.js app detected
|
||||
|
||||
-----> Creating runtime environment
|
||||
|
||||
...
|
||||
|
||||
=====> Application deployed:
|
||||
http://io-js-app.ci.dokku.me
|
||||
|
||||
Renaming node-js-app to io-js-app... done
|
||||
```
|
||||
|
||||
This will copy all of your app's contents into a new app directory with the name of your choice, delete your old app, then rebuild the new version of the app and deploy it. All of your config variables, including database urls, will be preserved.
|
||||
@@ -1,57 +0,0 @@
|
||||
# Image Tagging
|
||||
|
||||
> New as of 0.4.0
|
||||
|
||||
The dokku tags plugin allows you to add docker image tags to the currently deployed app image for versioning and subsequent deployment.
|
||||
|
||||
```
|
||||
tags <app> List all app image tags
|
||||
tags:create <app> <tag> Add tag to latest running app image
|
||||
tags:deploy <app> <tag> Deploy tagged app image
|
||||
tags:destroy <app> <tag> Remove app image tag
|
||||
```
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
root@dokku:~# dokku tags node-js-app
|
||||
=====> Image tags for dokku/node-js-app
|
||||
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
|
||||
dokku/node-js-app latest 936a42f25901 About a minute ago 1.025 GB
|
||||
|
||||
root@dokku:~# dokku tags:create node-js-app v0.9.0
|
||||
=====> Added v0.9.0 tag to dokku/node-js-app
|
||||
|
||||
root@dokku:~# dokku tags node-js-app
|
||||
=====> Image tags for dokku/node-js-app
|
||||
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
|
||||
dokku/node-js-app latest 936a42f25901 About a minute ago 1.025 GB
|
||||
dokku/node-js-app v0.9.0 936a42f25901 About a minute ago 1.025 GB
|
||||
|
||||
root@dokku:~# dokku tags:deploy node-js-app v0.9.0
|
||||
-----> Releasing node-js-app (dokku/node-js-app:v0.9.0)...
|
||||
-----> Deploying node-js-app (dokku/node-js-app:v0.9.0)...
|
||||
-----> Running pre-flight checks
|
||||
For more efficient zero downtime deployments, create a file CHECKS.
|
||||
See http://dokku.viewdocs.io/dokku/checks-examples.md for examples
|
||||
CHECKS file not found in container: Running simple container check...
|
||||
-----> Waiting for 10 seconds ...
|
||||
-----> Default container check successful!
|
||||
=====> node-js-app container output:
|
||||
Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
|
||||
Recommending WEB_CONCURRENCY=1
|
||||
> node-js-app@0.1.0 start /app
|
||||
> node index.js
|
||||
Node app is running at localhost:5000
|
||||
=====> end node-js-app container output
|
||||
-----> Running post-deploy
|
||||
-----> Configuring node-js-app.dokku.me...
|
||||
-----> Creating http nginx.conf
|
||||
-----> Running nginx-pre-reload
|
||||
Reloading nginx
|
||||
-----> Shutting down old containers in 60 seconds
|
||||
=====> 025eec3fa3b442fded90933d58d8ed8422901f0449f5ea0c23d00515af5d3137
|
||||
=====> Application deployed:
|
||||
http://node-js-app.dokku.me
|
||||
|
||||
```
|
||||
@@ -4,13 +4,14 @@ Dokku normally defaults to using [heroku buildpacks](https://devcenter.heroku.co
|
||||
|
||||
- Use `dokku config:set` to set the `BUILDPACK_URL` environment variable.
|
||||
- Add `BUILDPACK_URL` to a committed `.env` file in the root of your repository.
|
||||
- See the [environment variable documentation](/dokku/configuration/environment-variables/) for more details.
|
||||
- Create a `.buildpacks` file in the root of your repository.
|
||||
|
||||
## Specifying a custom buildpack
|
||||
|
||||
In certain cases you may want to specify a custom buildpack. While dokku uses herokuish to support all the [official heroku buildpacks](https://github.com/gliderlabs/herokuish#buildpacks), it is possible that the buildpack detection does not work well for your application. As well, you may wish to use a custom buildpack to handle specific application logic.
|
||||
In certain cases you may want to specify a custom buildpack. While Dokku uses herokuish to support all the [official heroku buildpacks](https://github.com/gliderlabs/herokuish#buildpacks), it is possible that the buildpack detection does not work well for your application. As well, you may wish to use a custom buildpack to handle specific application logic.
|
||||
|
||||
To use a specific buildpack, you can run the following dokku command:
|
||||
To use a specific buildpack, you can run the following Dokku command:
|
||||
|
||||
```shell
|
||||
# replace APP with the name of your application
|
||||
@@ -56,16 +57,32 @@ You may also wish to use a **specific** version of a buildpack, which is also si
|
||||
dokku config:set APP BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-nodejs#v87
|
||||
```
|
||||
|
||||
## Clearing buildpack cache
|
||||
## Specifying commands via Procfile
|
||||
|
||||
Building containers with buildpacks currently results in a persistent `cache` directory between deploys. If you need to clear this cache directory for any reason, you may do so by running the following shell command:
|
||||
While many buildpacks have a default command that is run when a detected repository is pushed, it is possible to override this command via a Procfile. A Procfile can also be used to specify multiple commands, each of which is subject to process scaling. See the [process scaling documentation](/dokku/deployment/process-management/) for more details around scaling individual processes.
|
||||
|
||||
```shell
|
||||
# replace APP with the name of your application
|
||||
sudo rm -rf /home/dokku/APP/cache/*
|
||||
A Procfile is a file named `Procfile`. It should be named `Procfile` exactly, and not anything else. For example, `Procfile.txt` is not valid. The file should be a simple text file.
|
||||
|
||||
The file must be placed in the root directory of your application. It will not function if placed in a subdirectory.
|
||||
|
||||
If the file exists, it should not be empty, as doing so may result in a failed deploy.
|
||||
|
||||
The syntax for declaring a `Procfile` is as follows. Note that the format is one process type per line, with no duplicate process types.
|
||||
|
||||
```
|
||||
<process type>: <command>
|
||||
```
|
||||
|
||||
### Curl Build Timeouts
|
||||
If, for example, you have multiple queue workers and wish to scale them separately, the following would be a valid way to work around the requirement of not duplicating process types:
|
||||
|
||||
```Procfile
|
||||
worker: env QUEUE=* bundle exec rake resque:work
|
||||
importantworker: env QUEUE=important bundle exec rake resque:work
|
||||
```
|
||||
|
||||
The `web` process type holds some significance in that it is the only process type that is automatically scaled to `1` on the initial application deploy. See the [process scaling documentation](/dokku/deployment/process-management/) for more details around scaling individual processes.
|
||||
|
||||
## Curl Build Timeouts
|
||||
|
||||
Certain buildpacks may time out in retrieving dependencies via curl. This can happen when your network connection is poor or if there is significant network congestion. You may see a message similar to `gzip: stdin: unexpected end of file` after a curl command.
|
||||
|
||||
@@ -75,3 +92,7 @@ If you see output similar this when deploying , you may need to override the cur
|
||||
dokku config:set --global CURL_TIMEOUT=600
|
||||
dokku config:set --global CURL_CONNECT_TIMEOUT=30
|
||||
```
|
||||
|
||||
## Clearing buildpack cache
|
||||
|
||||
See the [repository management documentation](/dokku/advanced-usage/repository-management/#clearing-app-cache).
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
While Dokku normally defaults to using [heroku buildpacks](https://devcenter.heroku.com/articles/buildpacks) for deployment, you can also use docker's native `Dockerfile` system to define a container.
|
||||
|
||||
> Dockerfile support is considered a **Power User** feature. By using Dockerfile-based deployment, you agree that you will not have the same comfort as that enjoyed by Buildpack users, and Dokku features may work differently. Differences between the two systems will be documented here.
|
||||
|
||||
To use a dockerfiles for deployment, commit a valid `Dockerfile` to the root of your repository and push the repository to your Dokku installation. If this file is detected, Dokku will default to using it to construct containers **except** in the following two cases:
|
||||
|
||||
- The application has a `BUILDPACK_URL` environment variable set via the `dokku config:set` command or in a committed `.env` file. In this case, Dokku will use your specified buildpack.
|
||||
@@ -15,21 +17,23 @@ To use a dockerfiles for deployment, commit a valid `Dockerfile` to the root of
|
||||
|
||||
Dokku will extract all tcp ports exposed using the `EXPOSE` directive (one port per line) and setup nginx to proxy the same port numbers to listen publicly. If you would like to change the exposed port, you should do so within your `Dockerfile` and app.
|
||||
|
||||
> NOTE: Nginx does not support proxying UDP. UDP ports can be exposed by disabling the nginx proxy with `dokku proxy:disable myapp`
|
||||
> Note: Nginx does not support proxying UDP. UDP ports can be exposed by disabling the nginx proxy with `dokku proxy:disable myapp`
|
||||
|
||||
If you do not explicitly `EXPOSE` a port in your `Dockerfile`, dokku will configure the nginx proxy to listen on port 80 (and 443 for TLS) and forward traffic to your app listening on port 5000 inside the container. Just like buildpack apps, you can also use the `$PORT` environment variable in your app to maintain portability.
|
||||
If you do not explicitly `EXPOSE` a port in your `Dockerfile`, Dokku will configure the nginx proxy to listen on port 80 (and 443 for TLS) and forward traffic to your app listening on port 5000 inside the container. Just like buildpack apps, you can also use the `$PORT` environment variable in your app to maintain portability.
|
||||
|
||||
When ports are exposed through the default nginx proxy, they are proxied externally as HTTP ports. At this time, in no case do we proxy plain TCP or UDP ports. If you would like to investigate alternative proxy methods, please refer to our [proxy management documentation](/dokku/advanced-usage/proxy-management/).
|
||||
|
||||
## Customizing the run command
|
||||
|
||||
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`:
|
||||
|
||||
```
|
||||
```Dockerfile
|
||||
ENTRYPOINT ["node"]
|
||||
```
|
||||
|
||||
You can do:
|
||||
|
||||
```
|
||||
```shell
|
||||
dokku config:set APP DOKKU_DOCKERFILE_START_CMD="--harmony server.js"
|
||||
```
|
||||
|
||||
@@ -48,14 +52,14 @@ When you deploy your app a Docker image will be built, the `Procfile` will be ex
|
||||
(it must be in the folder defined in your `Dockerfile` as `WORKDIR` or `/app`) and the commands
|
||||
in it will be passed to `docker run` to start your process(es). Here's an example `Procfile`:
|
||||
|
||||
```
|
||||
```Procfile
|
||||
web: bin/run-prod.sh
|
||||
worker: bin/run-worker.sh
|
||||
```
|
||||
|
||||
And `Dockerfile`:
|
||||
|
||||
```
|
||||
```Dockerfile
|
||||
FROM debian:jessie
|
||||
WORKDIR /app
|
||||
COPY . ./
|
||||
164
docs/deployment/methods/images.md
Normal file
@@ -0,0 +1,164 @@
|
||||
# Image Tag Deployment
|
||||
|
||||
> New as of 0.4.0
|
||||
|
||||
```
|
||||
tags <app> # List all app image tags
|
||||
tags:create <app> <tag> # Add tag to latest running app image
|
||||
tags:deploy <app> <tag> # Deploy tagged app image
|
||||
tags:destroy <app> <tag> # Remove app image tag
|
||||
```
|
||||
|
||||
The Dokku tags plugin allows you to add docker image tags to the currently deployed app image for versioning and subsequent deployment.
|
||||
|
||||
> When triggering `dokku ps:rebuild APP` on an application deployed via the `tags` plugin, the following may occur:
|
||||
>
|
||||
> - Applications previously deployed via another method (`git`/`tar`): The application may revert to a state before the latest custom image tag was deployed.
|
||||
> - Applications that were only ever deployed via the `tags` plugin: No action will be taken against your application.
|
||||
>
|
||||
> Please use the `tags:deploy` command when redeploying an application deployed via docker image.
|
||||
|
||||
## Usage
|
||||
|
||||
### Listing tags for an application
|
||||
|
||||
For example, you can list all tags for a given application:
|
||||
|
||||
```shell
|
||||
dokku tags node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> Image tags for dokku/node-js-app
|
||||
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
|
||||
dokku/node-js-app latest 936a42f25901 About a minute ago 1.025 GB
|
||||
```
|
||||
|
||||
### Creating a tag
|
||||
|
||||
You can also create new tags for that app using the `tags:create` function. Tags should conform to the docker tagging specification for your docker version. As of 1.10, that specification is available [here](https://github.com/docker/docker/blob/master/image/spec/v1.1.md), while users of older versions can check the documentation [here](https://github.com/docker/docker/blob/master/image/spec/v1.md).
|
||||
|
||||
```shell
|
||||
dokku tags:create node-js-app v1
|
||||
```
|
||||
|
||||
```
|
||||
=====> Added v1 tag to dokku/node-js-app
|
||||
```
|
||||
|
||||
Once the tag is created, you can see the output by running the `tags` command again.
|
||||
|
||||
```shell
|
||||
dokku tags node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> Image tags for dokku/node-js-app
|
||||
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
|
||||
dokku/node-js-app latest 936a42f25901 About a minute ago 1.025 GB
|
||||
dokku/node-js-app v1 936a42f25901 About a minute ago 1.025 GB
|
||||
```
|
||||
|
||||
### Deploying an image tag
|
||||
|
||||
Finally, you can also deploy a local image using the `tags:deploy` command.
|
||||
|
||||
```shell
|
||||
dokku tags:deploy node-js-app v1
|
||||
```
|
||||
|
||||
```
|
||||
-----> Releasing node-js-app (dokku/node-js-app:v1)...
|
||||
-----> Deploying node-js-app (dokku/node-js-app:v1)...
|
||||
-----> Running pre-flight checks
|
||||
For more efficient zero downtime deployments, create a file CHECKS.
|
||||
See http://dokku.viewdocs.io/dokku/deployment/zero-downtime-deploys/ for examples
|
||||
CHECKS file not found in container: Running simple container check...
|
||||
-----> Waiting for 10 seconds ...
|
||||
-----> Default container check successful!
|
||||
=====> node-js-app container output:
|
||||
Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
|
||||
Recommending WEB_CONCURRENCY=1
|
||||
> node-js-app@0.1.0 start /app
|
||||
> node index.js
|
||||
Node app is running at localhost:5000
|
||||
=====> end node-js-app container output
|
||||
-----> Running post-deploy
|
||||
-----> Configuring node-js-app.dokku.me...
|
||||
-----> Creating http nginx.conf
|
||||
-----> Running nginx-pre-reload
|
||||
Reloading nginx
|
||||
-----> Shutting down old containers in 60 seconds
|
||||
=====> 025eec3fa3b442fded90933d58d8ed8422901f0449f5ea0c23d00515af5d3137
|
||||
=====> Application deployed:
|
||||
http://node-js-app.dokku.me
|
||||
```
|
||||
|
||||
## Image Workflows
|
||||
|
||||
### Deploying from a Docker Registry
|
||||
|
||||
You can alternatively add image pulled from a docker Registry and deploy app from it by using tagging feature. In this example, we are deploying from Docker Hub.
|
||||
|
||||
1. Create Dokku app as usual
|
||||
|
||||
```shell
|
||||
dokku apps:create test-app
|
||||
```
|
||||
|
||||
2. Pull image from Docker Hub
|
||||
|
||||
```shell
|
||||
docker pull demo-repo/some-image:v12
|
||||
```
|
||||
|
||||
3. Retag the image to match the created app
|
||||
|
||||
```shell
|
||||
docker tag demo-repo/some-image:v12 dokku/test-app:v12
|
||||
```
|
||||
|
||||
4. Deploy tag
|
||||
|
||||
```shell
|
||||
dokku tags:deploy test-app v12
|
||||
```
|
||||
|
||||
> Note: When deploying an image, we will use `docker inspect` to extract the `ExposedPorts` configuration and if defined, use that to populate `DOKKU_DOCKERFILE_PORTS`. If this behavior is not desired, you can override that configuration variable with the `config:set` command.
|
||||
> Example: `dokku config:set test-app DOKKU_DOCKERFILE_PORTS="5984/tcp 80/tcp"`
|
||||
|
||||
### Deploying an image from CI
|
||||
|
||||
To ensure your builds are always reproducible, it's considered bad practice to store build
|
||||
artifacts in your repository. For some projects however, building artifacts during deployment
|
||||
to Dokku may affect the performance of running applications.
|
||||
|
||||
One solution is to build a finished Docker image on a CI service (or even locally) and deploy
|
||||
it directly to the host running dokku.
|
||||
|
||||
1. Build image on CI (or locally)
|
||||
|
||||
```shell
|
||||
docker build -t dokku/test-app:v12 .
|
||||
# Note: The image must be tagged `dokku/<app-name>:<version>`
|
||||
```
|
||||
|
||||
2. Deploy image to Dokku host
|
||||
|
||||
```shell
|
||||
docker save dokku/test-app:v12 | ssh my.dokku.host "docker load | dokku tags:deploy test-app v12"
|
||||
```
|
||||
|
||||
> Note: You can also use a Docker Registry to push and pull
|
||||
> the image rather than uploading it directly.
|
||||
|
||||
Here's a more complete example using the above method:
|
||||
|
||||
```shell
|
||||
# build the image
|
||||
docker build -t dokku/test-app:v12 .
|
||||
# copy the image to the dokku host
|
||||
docker save dokku/test-app:v12 | bzip2 | ssh my.dokku.host "bunzip2 | docker load"
|
||||
# tag and deploy the image
|
||||
ssh my.dokku.host "dokku tags:create test-app previous; dokku tags:deploy test-app v12 && dokku tags:create test-app latest"
|
||||
```
|
||||
36
docs/deployment/methods/tar.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# Tarball Deployment
|
||||
|
||||
> New as of 0.4.0
|
||||
|
||||
```
|
||||
tar:from <app> <url> # Loads an app tarball from url
|
||||
tar:in <app> # Reads an tarball containing the app from stdin
|
||||
```
|
||||
|
||||
> When triggering `dokku ps:rebuild APP` on an application deployed via the `tar` plugin, the following may occur:
|
||||
>
|
||||
> - Applications previously deployed via another method (`git`): The application may revert to a state before the latest custom image tag was deployed.
|
||||
> - Applications that were only ever deployed via the `tar` plugin: The application will be properly rebuilt.
|
||||
>
|
||||
> Please use the appropriate `tar` command when redeploying an application deployed via tarball.
|
||||
|
||||
## Usage
|
||||
|
||||
### Deploying from a tarball
|
||||
|
||||
In some cases, it may be useful to deploy an application from a tarball. For instance, if you implemented a non-git based deployment plugin, tarring the generated artifact may be an easier route to interface with the existing Dokku infrastructure.
|
||||
|
||||
You can place the tarball on an external webserver and deploy via the `tar:from` command.
|
||||
|
||||
```shell
|
||||
dokku tar:from node-js-app https://dokku.me/releases/node-js-app/v1
|
||||
```
|
||||
|
||||
### Deploying via stdin
|
||||
|
||||
As an alternative, a deploy can be trigged from a tarball read from stdin using the `tar:in` command:
|
||||
|
||||
```shell
|
||||
# run from the generated artifact directory
|
||||
tar c . $* | dokku tar:in node-js-app
|
||||
```
|
||||
@@ -5,7 +5,7 @@ Sometimes you need to either inspect running containers or run a one-off command
|
||||
## Run a command in an app environment
|
||||
|
||||
```
|
||||
run <app> <cmd> Run a command in the environment of an application
|
||||
run <app> <cmd> # Run a command in the environment of an application
|
||||
```
|
||||
|
||||
The `run` command can be used to run a one-off process for a specific command. This will start a new container and run the desired command within that container. Note that this container will be stay around even after command completes. The container will be the same container as was used to start the currently deployed application.
|
||||
@@ -15,6 +15,17 @@ The `run` command can be used to run a one-off process for a specific command. T
|
||||
dokku run node-js-app ls -lah
|
||||
```
|
||||
|
||||
The `run` command can also be used to run a command defined in your Procfile:
|
||||
|
||||
```
|
||||
console: bundle exec racksh
|
||||
```
|
||||
|
||||
```shell
|
||||
# runs `bundle exec racksh` in the `/app` directory of the application `my-app`
|
||||
dokku run my-app console
|
||||
```
|
||||
|
||||
If you want to remove the container after a command has started, you can run the following command:
|
||||
|
||||
```shell
|
||||
@@ -25,13 +36,22 @@ dokku config:set --global DOKKU_RM_CONTAINER=1
|
||||
dokku config:unset --global DOKKU_RM_CONTAINER
|
||||
```
|
||||
|
||||
You may also use the `--rm-container` or `--rm` dokku flags to remove the containers automatically:
|
||||
You may also use the `--rm-container` or `--rm` Dokku flags to remove the containers automatically:
|
||||
|
||||
```shell
|
||||
dokku --rm-container run node-js-app ls -lah
|
||||
dokku --rm run node-js-app ls -lah
|
||||
```
|
||||
|
||||
Finally, you may wish to run a container in "detached" mode via the `--detach` Dokku flag. Running a process in detached mode will immediately return a `CONTAINER_ID`. It is up to the user to then further manage this container in whatever manner they see fit, as Dokku will *not* automatically terminate the container.
|
||||
|
||||
```shell
|
||||
dokku --detach run node-js-app ls -lah
|
||||
# returns the ID of the new container
|
||||
```
|
||||
|
||||
> Note that you may not use the `--rm-container` or `--rm` flags when running containers in detached mode, and attempting to do so will result in the `--detach` flag being ignored.
|
||||
|
||||
### Using `run` for cron tasks
|
||||
|
||||
You can always use a one-off container to run an application task:
|
||||
@@ -48,7 +68,7 @@ For tasks that should not be interrupted, run is the **preferred** method of han
|
||||
> New as of 0.4.0
|
||||
|
||||
```
|
||||
enter <app> [<container-type> || --container-id <container-id>] Connect to a specific app container
|
||||
enter <app> [<container-type> || --container-id <container-id>] # Connect to a specific app container
|
||||
```
|
||||
|
||||
The `enter` command can be used to enter a running container. The following variations of the command exist:
|
||||
@@ -59,6 +79,8 @@ dokku enter node-js-app web.1
|
||||
dokku enter node-js-app --container-id ID
|
||||
```
|
||||
|
||||
Additionally, you can run `enter` with no container-type. If only a single container-type is defined in your app, you will be dropped into the only running container. This behavior is not supported when specifying a custom command; as described below.
|
||||
|
||||
By default, it runs a `/bin/bash`, but can also be used to run a custom command:
|
||||
|
||||
```shell
|
||||
@@ -73,8 +95,8 @@ dokku enter node-js-app web python script/background-worker.py
|
||||
|
||||
Your procfile can have the following entry:
|
||||
|
||||
```
|
||||
cron: while true; do sleep 10; done
|
||||
```Procfile
|
||||
cron: sleep infinity
|
||||
```
|
||||
|
||||
With the `cron` process scaled to `1`:
|
||||
@@ -86,7 +108,7 @@ dokku ps:scale node-js-app cron=1
|
||||
You can now run all your commands in that container:
|
||||
|
||||
```shell
|
||||
dokku enter api cron some-command
|
||||
dokku enter node-js-app cron some-command
|
||||
```
|
||||
|
||||
Note that you can also run multiple commands at the same time to reduce memory usage, though that may result in polluting the container environment.
|
||||
@@ -97,8 +119,8 @@ For tasks that will properly resume, you **should** use the above method, as run
|
||||
|
||||
Regularly scheduled tasks can be a bit of a pain with dokku. The following are general recommendations to follow to help ensure successful task runs.
|
||||
|
||||
- Use the dokku user's crontab
|
||||
- If you do not, dokku will attempt to execute with sudo dokku, and your cron run with fail with `sudo: no tty present and no askpass program specified`
|
||||
- Use the `dokku` user's crontab
|
||||
- If you do not, the `dokku` binary will attempt to execute with `sudo` dokku, and your cron run with fail with `sudo: no tty present and no askpass program specified`
|
||||
- Add a `MAILTO` environment variable to ship cron emails to yourself.
|
||||
- Add a `PATH` environment variable or specify the full path to binaries on the host.
|
||||
- Add a `SHELL` environment variable to specify bash when running commands.
|
||||
@@ -116,7 +138,7 @@ Regularly scheduled tasks can be a bit of a pain with dokku. The following are g
|
||||
|
||||
The following is a sample cronfile that you can use for your applications:
|
||||
|
||||
```
|
||||
```cron
|
||||
# server cron jobs
|
||||
MAILTO="mail@example.com"
|
||||
PATH=/usr/local/bin:/usr/bin:/bin
|
||||
|
||||
190
docs/deployment/process-management.md
Normal file
@@ -0,0 +1,190 @@
|
||||
# Process and Container Management
|
||||
|
||||
> New as of 0.3.14, Enhanced in 0.7.0
|
||||
|
||||
```
|
||||
ps <app> # List processes running in app container(s)
|
||||
ps:rebuildall # Rebuild all apps from source
|
||||
ps:rebuild <app> # Rebuild an app from source
|
||||
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)
|
||||
ps:restart-policy <app> # Shows the restart-policy for an app
|
||||
ps:set-restart-policy <app> <policy> # Sets app restart-policy
|
||||
```
|
||||
|
||||
By default, Dokku will only start a single `web` process - if defined - though process scaling can be managed by the `ps` plugin or via a custom `DOKKU_SCALE` file.
|
||||
|
||||
> The `web` proctype is the only proctype that will invoke custom checks as defined by a CHECKS file. It is also the only process type that will be launched in a container that is either proxied via nginx or bound to an external port.
|
||||
|
||||
## Usage
|
||||
|
||||
### Listing processes running in an app container
|
||||
|
||||
To find out if your application's containers are running the commands you expect, simply run the `ps` command against that application.
|
||||
|
||||
```shell
|
||||
dokku ps node-js-app
|
||||
```
|
||||
|
||||
### Rebuilding applications
|
||||
|
||||
There are some Dokku commands which will not automatically rebuild an application's environment, or which can be told to skip a rebuild. For instance, you may wish to run mulitple `config:set` commands without a restart so as to speed up configuration. In these cases, you can ultimately trigger an application rebuild using `ps:rebuild`
|
||||
|
||||
```shell
|
||||
dokku ps:rebuild node-js-app
|
||||
```
|
||||
|
||||
You may also rebuild all applications at once, which is useful when enabling/disabling a plugin that modifies all applications:
|
||||
|
||||
```shell
|
||||
dokku ps:rebuildall
|
||||
```
|
||||
|
||||
> The `ps:rebuild` and `ps:rebuildall` commands only work for applications for which there is a source, and thus
|
||||
> will only always work deterministically for git-deployed application. Please see
|
||||
> the [images documentation](/dokku/deployment/methods/images/) and [tar documentation](/dokku/deployment/methods/tar/)
|
||||
> in for more information concerning rebuilding those applications.
|
||||
|
||||
### Restarting applications
|
||||
|
||||
Applications can be restarted, which is functionally identical to calling the `release_and_deploy` function on an application. Please not that any linked containers *must* be started before the application in order to have a successful boot.
|
||||
|
||||
```shell
|
||||
dokku ps:restart node-js-app
|
||||
```
|
||||
|
||||
You may also trigger a restart on all applications at one time:
|
||||
|
||||
```shell
|
||||
dokku ps:restartall
|
||||
```
|
||||
|
||||
### `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.
|
||||
|
||||
```shell
|
||||
dokku ps:scale node-js-app web=1
|
||||
```
|
||||
|
||||
Multiple process types can be scaled at once:
|
||||
|
||||
```shell
|
||||
dokku ps:scale node-js-app web=1 worker=1
|
||||
```
|
||||
|
||||
Issuing the `ps:scale` command with no process type argument will output the current scaling settings for an application:
|
||||
|
||||
```shell
|
||||
dokku ps:scale node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
-----> Scaling for node-js-app
|
||||
-----> proctype qty
|
||||
-----> -------- ---
|
||||
-----> web 1
|
||||
-----> worker 1
|
||||
```
|
||||
|
||||
### Stopping applications
|
||||
|
||||
Deployed applications can be stopped using the `ps:stop` command. This turns all running containers for an application, and will result in a `502 Bad Gateway` reponse for the default nginx proxy implementation.
|
||||
|
||||
```shell
|
||||
dokku ps:stop node-js-app
|
||||
```
|
||||
|
||||
### Starting applications
|
||||
|
||||
All stopped containers can be started using the `ps:start` command. This is similar to running `ps:restart`, except no action will be taken if the application containers are running.
|
||||
|
||||
```shell
|
||||
dokku ps:start node-js-app
|
||||
```
|
||||
|
||||
## Restart Policies
|
||||
|
||||
> New as of 0.7.0
|
||||
|
||||
By default, Dokku will automatically restart containers that exit with a non-zero status up to 10 times via the [on-failure Docker restart policy](https://docs.docker.com/engine/reference/run/#restart-policies-restart).
|
||||
|
||||
### Showing the current restart policy
|
||||
|
||||
THe `ps:restart-policy` command will show the currently configured restart policy for an application. The default policy is `on-failure:10`
|
||||
|
||||
```shell
|
||||
dokku ps:restart-policy node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app restart-policy:
|
||||
on-failure:10
|
||||
```
|
||||
|
||||
### Setting the restart policy
|
||||
|
||||
You can configure this via the `ps:set-restart-policy` command:
|
||||
|
||||
```shell
|
||||
# always restart an exited container
|
||||
dokku ps:set-restart-policy node-js-app always
|
||||
```
|
||||
|
||||
```
|
||||
-----> Setting restart policy: always
|
||||
```
|
||||
|
||||
```shell
|
||||
# never restart an exited container
|
||||
dokku ps:set-restart-policy node-js-app no
|
||||
```
|
||||
|
||||
```
|
||||
-----> Setting restart policy: no
|
||||
```
|
||||
|
||||
```shell
|
||||
# only restart it on Docker restart if it was not manually stopped
|
||||
dokku ps:set-restart-policy node-js-app unless-stopped
|
||||
```
|
||||
|
||||
```
|
||||
-----> Setting restart policy: unless-stopped
|
||||
```
|
||||
|
||||
```shell
|
||||
# restart only on non-zero exit status
|
||||
dokku ps:set-restart-policy node-js-app on-failure
|
||||
```
|
||||
|
||||
```
|
||||
-----> Setting restart policy: on-failure
|
||||
```
|
||||
|
||||
```shell
|
||||
# restart only on non-zero exit status up to 20 times
|
||||
dokku ps:set-restart-policy node-js-app on-failure:20
|
||||
```
|
||||
|
||||
```
|
||||
-----> Setting restart policy: on-failure:20
|
||||
```
|
||||
|
||||
Restart policies have no bearing on server reboot, and Dokku will always attempt to restart your applications at that point unless they were manually stopped.
|
||||
|
||||
## Manually managing process scaling
|
||||
|
||||
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:
|
||||
|
||||
```Procfile
|
||||
web=1
|
||||
worker=2
|
||||
```
|
||||
|
||||
> *NOTE*: Dokku will always use the DOKKU_SCALE file that ships with the repo to override any local settings.
|
||||
@@ -4,17 +4,17 @@ Dokku commands can be run over ssh. Anywhere you would run `dokku <command>`, ju
|
||||
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:
|
||||
|
||||
```
|
||||
```ini
|
||||
Host dokku.me
|
||||
RequestTTY yes
|
||||
RequestTTY yes
|
||||
```
|
||||
|
||||
## 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.
|
||||
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>
|
||||
@@ -23,6 +23,6 @@ in order to avoid ssh interpretting dokku arguments for itself.
|
||||
|
||||
## Clients
|
||||
|
||||
You may optionally use a client to connect to your dokku server. Most clients use the configured `git remote` to locate the dokku server, though some allow for overriding this via an environment variable or flag.
|
||||
You may optionally use a client to connect to your Dokku server. Most clients use the configured `git remote` to locate the Dokku server, though some allow for overriding this via an environment variable or flag.
|
||||
|
||||
Please refer to the [clients](/dokku/community/clients/) list for more details.
|
||||
@@ -1,48 +1,75 @@
|
||||
# User Management
|
||||
|
||||
While it is possible to use password-based authorization to push to Dokku, it is preferable to use key-based authentication for security.
|
||||
|
||||
Users in dokku are managed via the `~/dokku/.ssh/authorized_keys` file. While you *can* manually edit this file, it is **highly** recommended that you follow the below steps to manage users on a dokku server.
|
||||
|
||||
## SSHCommand
|
||||
|
||||
Dokku uses the [`sshcommand`](https://github.com/dokku/sshcommand) utility to manage ssh keys for the dokku user. The following is the usage output for sshcommand.
|
||||
> New as of 0.7.0
|
||||
|
||||
```
|
||||
sshcommand create <user> <command> # creates a user forced to run command when SSH connects
|
||||
sshcommand acl-add <user> <ssh-key-name> # adds named SSH key to user from STDIN
|
||||
sshcommand acl-remove <user> <ssh-key-name> # removes SSH key by name
|
||||
sshcommand help # displays the usage help message
|
||||
ssh-keys:add <name> [/path/to/key] # Add a new public key by pipe or path
|
||||
ssh-keys:list # List of all authorized Dokku public ssh keys
|
||||
ssh-keys:remove <name> # Remove SSH public key by name
|
||||
```
|
||||
|
||||
In dokku's case, the `<user>` section is *always* `dokku`, as this is the system user that the dokku binary performs all it's actions. Keys are given unique names, which can be used in conjunction with the [user-auth](/dokku/development/plugin-triggers/#user-auth) plugin trigger to handle command authorization.
|
||||
When pushing to Dokku, ssh key based authorization is the preferred authentication method, for ease of use and increased security.
|
||||
|
||||
## Adding deploy users
|
||||
Users in Dokku are managed via the `~/dokku/.ssh/authorized_keys` file. It is **highly** recommended that you follow the steps below to manage users on a Dokku server.
|
||||
|
||||
You can add your public key to the dokku user's `~/dokku/.ssh/authorized_keys` file with the following command:
|
||||
> Users of older versions of Dokku should use the `sshcommand` binary to manage keys. Please refer to the Dokku documentation for your version for more details.
|
||||
|
||||
## Usage
|
||||
|
||||
### Listing SSH Keys
|
||||
|
||||
You can use the `ssh-keys:list` command to show all configured ssh keys. Any key added via the `dokku-installer` will be associated with the `admin` key name.
|
||||
|
||||
```shell
|
||||
# from your local machine
|
||||
# replace dokku.me with your domain name or the host's IP
|
||||
# replace root with your server's root user
|
||||
# USER is the username you use to refer to this particular key
|
||||
cat ~/.ssh/id_rsa.pub | ssh root@dokku.me "sudo sshcommand acl-add dokku USER"
|
||||
dokku ssh-keys:list
|
||||
```
|
||||
|
||||
At it's base, the `sshcommand` *must* be run under a user with sudo access, as it sets keys for the dokku user.
|
||||
|
||||
For instance, if you stored your public key at `~/.ssh/id_rsa.pub-open` and are deploying to EC2 where the default root-enabled user is `ubuntu`, you can run the following command to add your key under the `superuser` username:
|
||||
|
||||
```
|
||||
cat ~/.ssh/id_rsa.pub-open | ssh ubuntu@dokku.me "sudo sshcommand acl-add dokku superuser"
|
||||
61:21:1f:88:7f:86:d4:3a:68:9f:18:aa:41:4f:bc:3d NAME="admin" SSHCOMMAND_ALLOWED_KEYS="no-agent-forwarding,no-user-rc,no-X11-forwarding,no-port-forwarding"
|
||||
```
|
||||
|
||||
If you are using the vagrant installation, you can also use the `make vagrant-acl-add` target to add your public key to dokku (it will use your host username as the `USER`):
|
||||
The output contains the following information:
|
||||
|
||||
- SSH Key Fingerprint.
|
||||
- The `KEY_NAME`.
|
||||
- A comma separated list of ssh options under the `SSHCOMMAND_ALLOWED_KEYS` name.
|
||||
|
||||
### Adding SSH Keys
|
||||
|
||||
You can add your public key to Dokku with the `ssh-keys:add` command. The output will be the fingerprint of the ssh key:
|
||||
|
||||
```shell
|
||||
dokku ssh-keys:add KEY_NAME path/to/id_rsa.pub
|
||||
```
|
||||
|
||||
```
|
||||
b7:76:27:4f:30:90:21:ae:d4:1e:70:20:35:3f:06:d6
|
||||
```
|
||||
|
||||
`KEY_NAME` is the username prefer to use to refer to this particular key. Including the word `admin` in the name will grant the user privileges to add additional keys remotely.
|
||||
|
||||
> `KEY_NAME` is a unique name which is used to identify public keys. Attempting to re-use a key name will result in an error. The ssh (git) user is *always* `dokku`, as this is the system user that the `dokku` binary uses to perform all it's actions.
|
||||
|
||||
Admin users and root can also add keys remotely:
|
||||
|
||||
```shell
|
||||
cat ~/.ssh/id_rsa.pub | ssh dokku@dokku.me ssh-keys:add KEY_NAME
|
||||
```
|
||||
|
||||
Finally, if you are using the vagrant installation, you can also use the `make vagrant-acl-add` target to add your public key to Dokku (it will use your host username as the `USER`):
|
||||
|
||||
```shell
|
||||
cat ~/.ssh/id_rsa.pub | make vagrant-acl-add
|
||||
```
|
||||
|
||||
### Removing SSH Keys
|
||||
|
||||
As key names are unique, they can be used to remove a public ssh key.
|
||||
|
||||
```SHELL
|
||||
dokku ssh-keys:remove KEY_NAME
|
||||
```
|
||||
|
||||
## Scoping commands to specific users
|
||||
|
||||
See the [user auth plugin trigger documentation](/dokku/development/plugin-triggers/#user-auth).
|
||||
Keys are given unique names, which can be used in conjunction with the [user-auth](/dokku/development/plugin-triggers/#user-auth) plugin trigger to handle command authorization. Please see the documentation on that trigger for more information.
|
||||
|
||||
@@ -3,22 +3,49 @@
|
||||
> New as of 0.5.0
|
||||
|
||||
```
|
||||
checks <app> Show zero-downtime status
|
||||
checks:disable <app> Disable zero-downtime checks
|
||||
checks:enable <app> Enable zero-downtime checks
|
||||
checks <app> Show zero-downtime status
|
||||
checks:disable <app> [process-type(s)] Disable zero-downtime deployment for all processes (or comma-separated process-type list) ***WARNING: this will cause downtime during deployments***
|
||||
checks:enable <app> [process-type(s)] Enable zero-downtime deployment for all processes (or comma-separated process-type list)
|
||||
checks:run <app> [process-type(s)] Runs zero-downtime checks for all processes (or comma-separated process-type list)
|
||||
checks:skip <app> [process-type(s)] Skip zero-downtime checks for all processes (or comma-separated process-type list)
|
||||
```
|
||||
|
||||
Following a deploy, dokku will wait `10` seconds before routing traffic to the new container to give your application time to boot up. If the application is not running after this time, then the deploy is failed and your old container will continue serving traffic. You can modify this value globally or on a per-application basis:
|
||||
Following a deploy, Dokku will wait `10` seconds before routing traffic to the new container to give your application time to boot up. If the application is not running after this time, then the deploy is failed and your old container will continue serving traffic. You can modify this value globally or on a per-application basis:
|
||||
|
||||
```shell
|
||||
dokku config:set --global DOKKU_DEFAULT_CHECKS_WAIT=30
|
||||
dokku config:set <app> DOKKU_DEFAULT_CHECKS_WAIT=30
|
||||
dokku config:set node-js-app DOKKU_DEFAULT_CHECKS_WAIT=30
|
||||
```
|
||||
|
||||
You can also choose to skip checks completely on a per-application basis:
|
||||
You can also choose to skip checks or disable zero-downtime completely on a per-application/per-process basis
|
||||
|
||||
> Note that `checks:disable` will now (as of 0.6.0) cause downtime for that process-type during deployments.
|
||||
|
||||
```shell
|
||||
dokku checks:disable <app>
|
||||
dokku checks:skip node-js-app worker,web
|
||||
```
|
||||
|
||||
```
|
||||
-----> Skipping zero downtime for app's (node-js-app) proctypes (worker,web)
|
||||
-----> Unsetting node-js-app
|
||||
-----> Unsetting DOKKU_CHECKS_DISABLED
|
||||
-----> Setting config vars
|
||||
DOKKU_CHECKS_SKIPPED: worker,web
|
||||
```
|
||||
|
||||
Additionally, any given process can only be configured to disable zero-downtime. example:
|
||||
|
||||
|
||||
```shell
|
||||
dokku checks:disable node-js-app worker
|
||||
```
|
||||
|
||||
```
|
||||
-----> Disabling zero downtime for app's (node-js-app) proctypes (worker)
|
||||
-----> Setting config vars
|
||||
DOKKU_CHECKS_DISABLED: worker
|
||||
-----> Setting config vars
|
||||
DOKKU_CHECKS_SKIPPED: web
|
||||
```
|
||||
|
||||
Dokku will wait `60` seconds before stopping the old container so that existing connections are given a chance to complete. You can modify this value globally or on a per-application basis:
|
||||
@@ -30,16 +57,104 @@ dokku config:set <app> DOKKU_WAIT_TO_RETIRE=120
|
||||
|
||||
> Note that during this time, multiple containers may be running on your server, which can be an issue for memory-hungry applications on memory-constrained servers.
|
||||
|
||||
## Checks
|
||||
## Manually Invoking Checks
|
||||
|
||||
Checks can also be manually invoked via the `checks:run` command. This can be used to check the status of an application via cron to provide integration with external healthchecking software.
|
||||
|
||||
Checks are run against a specific application:
|
||||
|
||||
```shell
|
||||
dokku checks:run APP
|
||||
```
|
||||
|
||||
```
|
||||
-----> Running pre-flight checks
|
||||
-----> Running checks for app (APP.web.1)
|
||||
For more efficient zero downtime deployments, create a file CHECKS.
|
||||
See http://dokku.viewdocs.io/dokku/checks-examples.md for examples
|
||||
CHECKS file not found in container: Running simple container check...
|
||||
-----> Waiting for 10 seconds ...
|
||||
-----> Default container check successful!
|
||||
-----> Running checks for app (APP.web.2)
|
||||
For more efficient zero downtime deployments, create a file CHECKS.
|
||||
See http://dokku.viewdocs.io/dokku/checks-examples.md for examples
|
||||
CHECKS file not found in container: Running simple container check...
|
||||
-----> Waiting for 10 seconds ...
|
||||
-----> Default container check successful!
|
||||
-----> Running checks for app (APP.worker.1)
|
||||
For more efficient zero downtime deployments, create a file CHECKS.
|
||||
See http://dokku.viewdocs.io/dokku/checks-examples.md for examples
|
||||
CHECKS file not found in container: Running simple container check...
|
||||
-----> Waiting for 10 seconds ...
|
||||
-----> Default container check successful!
|
||||
```
|
||||
|
||||
Checks can be scoped to a particular process type:
|
||||
|
||||
```shell
|
||||
dokku checks:run APP worker
|
||||
```
|
||||
|
||||
```
|
||||
-----> Running pre-flight checks
|
||||
-----> Running checks for app (APP.worker.1)
|
||||
For more efficient zero downtime deployments, create a file CHECKS.
|
||||
See http://dokku.viewdocs.io/dokku/checks-examples.md for examples
|
||||
CHECKS file not found in container: Running simple container check...
|
||||
-----> Waiting for 10 seconds ...
|
||||
-----> Default container check successful!
|
||||
```
|
||||
|
||||
An app process id may also be specified:
|
||||
|
||||
```shell
|
||||
dokku checks:run APP web.2
|
||||
```
|
||||
|
||||
```
|
||||
-----> Running pre-flight checks
|
||||
-----> Running checks for app (APP.web.2)
|
||||
For more efficient zero downtime deployments, create a file CHECKS.
|
||||
See http://dokku.viewdocs.io/dokku/checks-examples.md for examples
|
||||
CHECKS file not found in container: Running simple container check...
|
||||
-----> Waiting for 10 seconds ...
|
||||
-----> Default container check successful!
|
||||
```
|
||||
|
||||
Non-existent process types will result in an error:
|
||||
|
||||
```shell
|
||||
dokku checks:run APP non-existent
|
||||
```
|
||||
|
||||
```
|
||||
-----> Running pre-flight checks
|
||||
Invalid process type specified (APP.non-existent)
|
||||
```
|
||||
|
||||
Non-existent process ids will *also* result in an error
|
||||
|
||||
```shell
|
||||
dokku checks:run APP web.3
|
||||
```
|
||||
|
||||
```
|
||||
-----> Running pre-flight checks
|
||||
Invalid container id specified (APP.web.3)
|
||||
```
|
||||
|
||||
## Customizing Checks
|
||||
|
||||
If your application needs a longer period to boot up - perhaps to load data into memory, or because of slow boot time - you may also use dokku's `checks` functionality to more precisely check whether an application can serve traffic or not.
|
||||
|
||||
Checks are run against the detected `web` process from your application's `Procfile`. For non-web processes, Dokku will fallback to the aforementioned process uptime check.
|
||||
|
||||
To specify checks, add a `CHECKS` file to the root of your project directory. The `CHECKS` file should be plain text and may contain:
|
||||
|
||||
* Check instructions
|
||||
* Settings (NAME=VALUE)
|
||||
* Comments (lines starting with #)
|
||||
* Empty lines
|
||||
* Check instructions
|
||||
* Settings (NAME=VALUE)
|
||||
* Comments (lines starting with #)
|
||||
* Empty lines
|
||||
|
||||
> For dockerfile-based deploys, the file *must* be in `/app/CHECKS` within the container. `/app` is used by default as the root container directory for buildpack-based deploys.
|
||||
|
||||
@@ -88,7 +203,7 @@ ATTEMPTS=10 # Attempt checks 10 times
|
||||
/ My Amazing App
|
||||
```
|
||||
|
||||
You can also override the default `WAIT`, `TIMEOUT`, and `ATTEMPTS` variables for the global dokku installation:
|
||||
You can also override the default `WAIT`, `TIMEOUT`, and `ATTEMPTS` variables for the global Dokku installation:
|
||||
|
||||
```shell
|
||||
dokku config:set --global DOKKU_CHECKS_WAIT=30
|
||||
@@ -102,31 +217,41 @@ If your application runs multiple processes (a background worker configured in y
|
||||
dokku config:set <app> DOKKU_DEFAULT_CHECKS_WAIT=0
|
||||
```
|
||||
|
||||
### Configuring docker stop timeout
|
||||
|
||||
[By default](https://docs.docker.com/engine/reference/commandline/stop/), docker will wait 10 seconds from the time the `stop` command is passed to a container before it attempts to kill said container. This timeout can be configured on a per-app basis in Dokku by setting the `DOKKU_DOCKER_STOP_TIMEOUT` configuration variable. This timeout applies to normal zero-downtime deployments as well as the `ps:stop` and `apps:destroy` commands.
|
||||
|
||||
```shell
|
||||
dokku config:set $APP DOKKU_DOCKER_STOP_TIMEOUT=20
|
||||
```
|
||||
|
||||
## Example: Successful Rails Deployment
|
||||
|
||||
In this example, a Rails application 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. `WAIT` is set to `10` because our application takes a while to boot up. `ATTEMPTS` is set to `6`, but the third attempt succeeds.
|
||||
|
||||
### CHECKS file
|
||||
|
||||
````
|
||||
```
|
||||
WAIT=10
|
||||
ATTEMPTS=6
|
||||
/check.txt simple_check
|
||||
````
|
||||
```
|
||||
|
||||
For this check to work, we've added a line to `config/routes.rb` that simply returns a string:
|
||||
|
||||
````
|
||||
```
|
||||
get '/check.txt', to: proc {[200, {}, ['simple_check']]}
|
||||
````
|
||||
```
|
||||
|
||||
### Deploy Output
|
||||
|
||||
> Note: The output has been trimmed for brevity
|
||||
|
||||
````
|
||||
```shell
|
||||
git push dokku master
|
||||
```
|
||||
|
||||
```
|
||||
-----> Cleaning up...
|
||||
-----> Building myapp from herokuish...
|
||||
-----> Adding BUILD_ENV to build environment...
|
||||
@@ -174,7 +299,7 @@ curl: (7) Failed to connect to 172.17.0.155 port 5000: Connection refused
|
||||
-----> Shutting down old container in 60 seconds
|
||||
=====> Application deployed:
|
||||
http://myapp.dokku.example.com
|
||||
````
|
||||
```
|
||||
|
||||
## Example: Failing Rails Deployment
|
||||
|
||||
@@ -184,11 +309,11 @@ Once the attempts have been exceeded, the deployment fails and we see the contai
|
||||
|
||||
### CHECKS file
|
||||
|
||||
````
|
||||
```
|
||||
WAIT=10
|
||||
ATTEMPTS=6
|
||||
/
|
||||
````
|
||||
```
|
||||
|
||||
> The check to the root url '/' would normally access the database.
|
||||
|
||||
@@ -196,9 +321,11 @@ ATTEMPTS=6
|
||||
|
||||
> Note: The output has been trimmed for brevity
|
||||
|
||||
````
|
||||
```shell
|
||||
git push dokku master
|
||||
```
|
||||
|
||||
```
|
||||
-----> Cleaning up...
|
||||
-----> Building myapp from herokuish...
|
||||
-----> Adding BUILD_ENV to build environment...
|
||||
@@ -272,8 +399,8 @@ Could not start due to 1 failed checks.
|
||||
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"
|
||||
/usr/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'
|
||||
````
|
||||
```
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
If you create your own plugin:
|
||||
|
||||
1. Take a look at the plugins shipped with dokku and hack away!
|
||||
1. Take a look at the plugins shipped with Dokku and hack away!
|
||||
2. Check out the [list of triggers](/dokku/development/plugin-triggers) 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](/dokku/plugins) and add a link to it.
|
||||
4. Edit [this page](/dokku/community/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
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ esac
|
||||
|
||||
Each plugin requires a `plugin.toml` descriptor file with the following required fields:
|
||||
|
||||
```shell
|
||||
```toml
|
||||
[plugin]
|
||||
description = "dokku hello plugin"
|
||||
version = "0.1.0"
|
||||
@@ -119,11 +119,12 @@ version = "0.1.0"
|
||||
|
||||
A few notes:
|
||||
|
||||
- Don't forget to `chmod +x` your executable files.
|
||||
- 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.
|
||||
- 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
|
||||
@@ -133,7 +134,7 @@ A few notes:
|
||||
fi
|
||||
```
|
||||
|
||||
In the case where the "user/repo" is not installed, dokku exits just before the awk command,
|
||||
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:
|
||||
@@ -155,3 +156,4 @@ A few notes:
|
||||
- From time to time you may want to allow other plugins access to (some of) your plugin's functionality. You can expose this by including a `functions` file in your plugin for others to source. Consider all functions in that file to be publicly accessible by other plugins. Any functions not wished to be made "public" should reside within your plugin trigger or commands files.
|
||||
- As of 0.4.0, we allow image tagging and deployment of said tagged images. Therefore, hard-coding of `$IMAGE` as `dokku/$APP` is no longer sufficient. Instead, for non `pre/post-build-*` plugins, use `get_running_image_tag()` & `get_app_image_name()` as sourced from common/functions. See the [plugin triggers](/dokku/development/plugin-triggers) doc for examples.
|
||||
- As of 0.5.0, we use container labels to help cleanup intermediate containers with `dokku cleanup`. If manually calling `docker run`, include `$DOKKU_GLOBAL_RUN_ARGS`. This will ensure you intermediate containers labeled correctly.
|
||||
- As of 0.6.0, we advise you to *not* call the `dokku` binary directly from within plugins. Clients using the `--app` argument are potentially broken, amongst other issues, when doing so. Instead, please source the `functions` file for a given plugin when attempting to call Dokku internal functions
|
||||
|
||||
@@ -8,7 +8,6 @@ To propose a release, the following tasks need to be performed:
|
||||
- The installable version must be changed in the `contrib/dokku-installer.py` file.
|
||||
- The installable version must be changed in the `debian/control` file.
|
||||
- The installable version must be changed in the `docs/home.html` file
|
||||
- The installable version must be changed in the `docs/index.md` file
|
||||
- The installable version must be changed in the `docs/installation.md` file.
|
||||
- The installable version must be changed in the `docs/template.html` file.
|
||||
- The installable version must be changed in the `README.md` file.
|
||||
@@ -40,9 +39,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.
|
||||
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.
|
||||
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:
|
||||
|
||||
@@ -67,7 +66,7 @@ The workflow looks like this:
|
||||
```shell
|
||||
# having dokku-arch in ../dokku-arch
|
||||
vagrant up build-arch
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.5.4-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.7.2-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
cd ../dokku-arch
|
||||
git add PKGBUILD .SRCINFO
|
||||
git commit -m 'Update to dokku 0.9.9'
|
||||
|
||||
@@ -1,36 +1,48 @@
|
||||
# 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.
|
||||
Dokku 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
|
||||
```
|
||||
We maintain the Dokku test harness within the `tests` directory:
|
||||
|
||||
Example apps can be found here:
|
||||
```
|
||||
tests/apps/
|
||||
```
|
||||
- `tests/unit/*.bats`: Bats tests
|
||||
- `tests/apps/`: Example applications that can be used for tests
|
||||
|
||||
### Executing tests locally
|
||||
## Continuous Integration
|
||||
|
||||
- Setup dokku in a [vagrant vm](/dokku/getting-started/install/vagrant)
|
||||
- Test setup and execution
|
||||
All pull requests have tests run against them on [CircleCI](https://circleci.com/), a continuous integration platform that provides Docker support for Ubuntu Trusty 14.04.
|
||||
|
||||
If you wish to skip tests for a particular commit - e.g. Documentation changes - you may add the `[ci skip]` designator to your commit message. Commits that *should* be tested but have the above designator will not be merged.
|
||||
|
||||
While we do provide official packages for a variety of platforms, as our test suite currently runs on Ubuntu Trusty 14.04, we only provide official installation support for that platform.
|
||||
|
||||
## Local Test Execution
|
||||
|
||||
- Setup Dokku in a [vagrant vm](/dokku/getting-started/install/vagrant)
|
||||
- Run the following to setup tests and execute them:
|
||||
|
||||
```shell
|
||||
$ vagrant ssh
|
||||
$ sudo su -
|
||||
$ cd ~/dokku
|
||||
$ make ci-dependencies setup-deploy-tests
|
||||
$ make test # execute the entire test suite (linter, bats tests, and app deployment tests)
|
||||
$
|
||||
$ make lint copyfiles # run linter & update vagrant dokku install from local git clone
|
||||
$ make unit-tests # execute all bats tests
|
||||
$ make deploy-tests # execute all app deployment tests
|
||||
```
|
||||
- Additionally you may run a specific app deployment tests with a target similar to:
|
||||
vagrant ssh
|
||||
sudo su -
|
||||
cd ~/dokku
|
||||
make ci-dependencies setup-deploy-tests
|
||||
|
||||
```shell
|
||||
$ make deploy-test-nodejs-express
|
||||
# execute the entire test suite (linter, bats tests, and app deployment tests)
|
||||
make test
|
||||
|
||||
# run linter & update vagrant Dokku install from local git clone
|
||||
make lint copyfiles
|
||||
|
||||
# execute all bats tests
|
||||
make unit-tests
|
||||
|
||||
# execute all app deployment tests
|
||||
make deploy-tests
|
||||
```
|
||||
- For a full list of test make targets check out `tests.mk` in the root of the dokku repository.
|
||||
|
||||
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.
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
# Dokku Core Storage Plugin
|
||||
|
||||
> New as of 0.5.0
|
||||
|
||||
The preferred method to mount external containers to a dokku managed container, is to use the dokku storage plugin.
|
||||
|
||||
|
||||
```shell
|
||||
storage:list <app>, List bind mounts for app's container(s) (host:container)
|
||||
storage:mount <app> <host-dir:container-dir>, Create a new bind mount
|
||||
storage:unmount <app> <host-dir:container-dir>, Remove an existing bind mount
|
||||
```
|
||||
|
||||
## Ideology and Background
|
||||
|
||||
The storage plugin requires explicit paths on the host side. This is intentional to ensure that new users avoid running into unexpected results with implicit paths that may not exist (a feature deprecate in [Docker 1.9.0](https://github.com/docker/docker/releases/tag/v1.9.0])). The container directory is created for the mount point in the container. Any existing directory contents are not accessible after a mount is added to the container. Dokku creates a new directory `/var/lib/dokku/data/storage` during installation, it's the general consensus that new users should use this directory. Mounts are only available at run and deploy times, you must redeploy (restart) an app to mount or unmount to an existing app's container.
|
||||
|
||||
## Usage
|
||||
|
||||
This example demonstrates how to mount the recommended directory to `/storage` inside the container:
|
||||
```
|
||||
$ dokku storage:mount app-name /var/lib/dokku/data/storage:/storage
|
||||
```
|
||||
Dokku will then mount the shared contents of`/var/lib/dokku/storage` to `/storage` inside the container.
|
||||
|
||||
## Use Cases
|
||||
|
||||
### Persistent storage
|
||||
|
||||
Dokku is powered by Docker containers, which recommends in their [best practices](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#containers-should-be-ephemeral) that containers be treated as ephemeral. In order to manage persistent storage for web applications, like user uploads or large binary assets like images, a directory outside the container should be mounted.
|
||||
|
||||
### Shared storage between containers
|
||||
|
||||
When scaling your app, you may require a common location to access shared assets between containers, a storage mount can be used in this situation.
|
||||
|
||||
### Shared storage across environments
|
||||
|
||||
Your app may be used in a cluster that requires containers or resources not running on the same host access your data. Mounting a shared file service (like S3FS or EFS) inside your container will give you great flexibility.
|
||||
|
||||
### Backing up
|
||||
|
||||
Your app may have services that are running in memory and need to be backed up locally (like a key store). Mount a non ephemeral storage mount will allow backups that are not lost when the app is shut down.
|
||||
|
||||
## Docker-Options Note
|
||||
|
||||
The storage plugins is compatible with storage mounts created with the docker-options. The storage plugin will only list mounts from the deploy phase.
|
||||
@@ -1,9 +1,11 @@
|
||||
# Advanced installation
|
||||
|
||||
You can always install dokku straight from the latest - potentially unstable - master release via the following bash command:
|
||||
You can always install Dokku straight from the latest - potentially unstable - master release via the following bash command:
|
||||
|
||||
```shell
|
||||
wget -qO- https://raw.githubusercontent.com/dokku/dokku/master/bootstrap.sh | sudo DOKKU_BRANCH=master bash
|
||||
# using a branch results in installing from source
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/master/bootstrap.sh
|
||||
sudo DOKKU_BRANCH=master bash bootstrap.sh
|
||||
```
|
||||
|
||||
## Development
|
||||
@@ -24,7 +26,7 @@ sudo SSHCOMMAND_URL=https://raw.githubusercontent.com/yourusername/sshcommand/ma
|
||||
|
||||
## 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:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/master/bootstrap.sh
|
||||
@@ -44,17 +46,19 @@ sudo BUILD_STACK=true STACK_URL=https://github.com/gliderlabs/herokuish.git make
|
||||
|
||||
## 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.
|
||||
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 should also stop and disable the `dokku-installer` service to remove public access to adding SSH keys.*
|
||||
|
||||
Follow the [user management documentation](/dokku/deployment/user-management) in order to add users to dokku.
|
||||
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).
|
||||
|
||||
Follow the [user management documentation](/dokku/deployment/user-management/) in order to add users to dokku.
|
||||
|
||||
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).
|
||||
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.
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
- If you don't already have one [generate an SSH key pair](https://help.github.com/articles/generating-ssh-keys/).
|
||||
|
||||
- Go to the [dokku on azure deployment page](https://github.com/azure/azure-quickstart-templates/tree/master/dokku-vm) and click **Deploy to Azure**.
|
||||
- Go to the [Dokku on azure deployment page](https://github.com/azure/azure-quickstart-templates/tree/master/dokku-vm) and click **Deploy to Azure**.
|
||||
|
||||
- You'll be prompted to enter a few parameters, including a unique storage account name and a unique name for the sub-domain used for your public IP address. For the `sshKeyData` parameter, copy and paste the contents of the **public** key file you just created. After a few minutes the Dokku instance will be deployed.
|
||||
|
||||
- In your browser of choice, navigate to `http://[[dnsNameForPublicIP]].[[location]].cloudapp.azure.com`. Where `[[dnsNameForPublicIP]]` and `[[location]]` are template parameters you used to deploy the template.
|
||||
|
||||
- Finish your dokku setup like you normally would by creating a **new** public/private key pair for your deployments using `ssh-keygen` (don't use the same one as you created in the first step). You should select 'Use Virtual Host Naming' and set the `Hostname` to a **public dns name** that you own such as one you would purchase from [namecheap](http://namecheap.com). Alternatively thanks to [xip.io]( http://xip.io/) you can just use yourAzurePublicIP.xip.io for free. For example, if your public IP is `44.44.44.44` then you would set it to `44.44.44.44.xip.io`.
|
||||
- Finish your Dokku setup like you normally would by creating a **new** public/private key pair for your deployments using `ssh-keygen` (don't use the same one as you created in the first step). You should select 'Use Virtual Host Naming' and set the `Hostname` to a **public dns name** that you own such as one you would purchase from [namecheap](http://namecheap.com). Alternatively thanks to [xip.io]( http://xip.io/) you can just use yourAzurePublicIP.xip.io for free. For example, if your public IP is `44.44.44.44` then you would set it to `44.44.44.44.xip.io`.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# 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:
|
||||
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
|
||||
# install prerequisites
|
||||
@@ -14,7 +14,7 @@ wget -nv -O - https://get.docker.com/ | sh
|
||||
wget -nv -O - https://packagecloud.io/gpg.key | apt-key add -
|
||||
echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ trusty main" | sudo tee /etc/apt/sources.list.d/dokku.list
|
||||
sudo apt-get update -qq > /dev/null
|
||||
sudo apt-get install dokku
|
||||
sudo apt-get install -qq -y dokku
|
||||
sudo dokku plugin:install-dependencies --core
|
||||
```
|
||||
|
||||
@@ -38,4 +38,4 @@ After setting the desired options, proceed with the installation as described ab
|
||||
| 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/skip_key_file| boolean | false | Don't check for the existence of the dokku/key_file. Warning: This setting this to true, will require you to manually add an SSH key later on. |
|
||||
| dokku/key_file | string | /root/.ssh/id_rsa.pub | SSH key to add to the Dokku user (Will be ignored on `dpkg-reconfigure`) |
|
||||
| dokku/key_file | string | /root/.ssh/id_rsa.pub | Path on disk to an SSH key to add to the Dokku user (Will be ignored on `dpkg-reconfigure`) |
|
||||
|
||||
185
docs/getting-started/install/dreamhost.md
Normal file
@@ -0,0 +1,185 @@
|
||||
# Install Dokku on DreamHost Cloud Server with cloud-init
|
||||
|
||||
Cloud-init script can be used to automate installation of Dokku on
|
||||
Dreamhost (or any other OpenStack-compatible cloud with minimal
|
||||
changes).
|
||||
|
||||
A new server can be created on DreamHost Cloud from the command line
|
||||
using openstack client or from the web UI and with the same command
|
||||
use a cloud-init script to install Dokku. Install the [openstack
|
||||
cli](https://help.dreamhost.com/hc/en-us/articles/216185658-How-to-Install-the-OpenStack-command-line-clients),
|
||||
download the [DreamHost Cloud credentials
|
||||
file](https://iad2.dreamcompute.com/project/access_and_security/api_access/openrc/)
|
||||
before proceeding and make sure your public SSH key is added to the
|
||||
cloud.
|
||||
|
||||
```sh
|
||||
source openrc.sh # Set the environment variables for DreamHost Cloud
|
||||
```
|
||||
|
||||
This allows openstack client to connect to DreamHost API endpoints.
|
||||
The command below creates a new server named `my-dokku-instance` based
|
||||
on Ubuntu 14.04, with 2GB RAM and 1CPU (the flavor called
|
||||
`semisonic`), opening network port access to http and ssh (the
|
||||
`default` security group), and the name of the chosen SSH key. This
|
||||
key will be automatically added to the new server in the
|
||||
`authorized_keys` for the default SSH user (`dhc-user`), and it will
|
||||
be reused by Dokku.
|
||||
|
||||
```sh
|
||||
openstack server create \
|
||||
--image Ubuntu-14.04 \
|
||||
--flavor gp1.semisonic \
|
||||
--security-group default \
|
||||
--key-name $YOUR_SSH_KEYNAME \
|
||||
--user-data dokku-cloudinit.sh \
|
||||
my-dokku-instance
|
||||
```
|
||||
|
||||
The content of dokku-cloudinit.sh script contains instructions to add
|
||||
Docker and Dokku's apt repositories and install Dokku with the proper
|
||||
debconf options set. Don't forget to add the FQDN for your application
|
||||
server:
|
||||
|
||||
```yaml
|
||||
#cloud-config
|
||||
apt_upgrade: true
|
||||
|
||||
apt_sources:
|
||||
- source: "deb https://packagecloud.io/dokku/dokku/ubuntu/ trusty main"
|
||||
key: |
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: SKS 1.1.5
|
||||
Comment: Hostname: pgpkeys.eu
|
||||
|
||||
mQINBFLUbogBEADceEoxBDoE6QM5xV/13qiELbFIkQgy/eEi3UesXmJblFdU7wcDLOW3NuOI
|
||||
x/dgbZljeMEerj6N1cR7r7X5sVoFVEZiK4RLkC3Cpdns0d90ud2f3VyKK7PXRBstdLm3JlW9
|
||||
OWZoe4VSADSMGWm1mIhT601qLKKAuWJoBIhnKY/RhA/RBXt7z22g4ta9bT67PlliTo1a8y6D
|
||||
hUA7gd+5TsVHaxDRrzc3mKObdyS5LOT/gf8Ti2tYBY5MBbQ8NUGExls4dXKlieePhKutFbde
|
||||
7sq3n5sdp1Ndoran1u0LsWnaSDx11R3xiYfXJ6xGukAc6pYlUD1yYjU4oRGhD2fPyuewqhHN
|
||||
UVwqupTBQtEGULrtdwK04kgIH93ssGRsLqUKe88uZeeBczVuupv8ZLd1YcQ29AfJHe6nsevs
|
||||
gjF+eajYlzsvC8BNq3nOvvedcuI6BW4WWFjraH06GNTyMAZi0HibTg65guZXpLcpPW9hTzXM
|
||||
oUrZz8MvJ9yUBcFPKuFOLDpRP6uaIbxJsYqiituoltl0vgS/vJcpIVVRwSaqPHa6S63dmKm2
|
||||
6gq18v4l05mVcInPn+ciHtcSlZgQkCsRTSvfUrK+7nzyWtNQMGKstAZ7AHCoA8Pbc3i7wyOt
|
||||
nTgfPFHVpHg3JHsPXKk9/71YogtoNFoETMFeKL1K+O+GMQddYQARAQABtDdwYWNrYWdlY2xv
|
||||
dWQgb3BzIChwcm9kdWN0aW9uIGtleSkgPG9wc0BwYWNrYWdlY2xvdWQuaW8+iQI+BBMBAgAo
|
||||
BQJS1G6IAhsvBQkJZgGABgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRDC5zQk1ZCXq13K
|
||||
D/wNzAi6rEzRyx6NH61Hc19s2QAgcU1p1mX1Tw0fU7CThx1nr8JrG63465c9dzUpVzNTYvMs
|
||||
USBJwbb1phahCMNGbJpZRQ5bvW/i3azmk/EHKL7wgMV8wu1atu6crrxGoDEfWUa4aIwbxZGk
|
||||
oxDZKZeKaLxz2ZChuKzjvkGUk4PUoOxxPn9XeFmJQ68ys4Z0CgIGfx2i64apqfsjVEdWEEBL
|
||||
oxHFIPy7FgFafRL0bgsquwPkb5q/dihIzJEZ2EMOGwXuUaKI/UAhgRIUGizuW7ECEjX4FG92
|
||||
8RsizHBjYL5Gl7DMt1KcPFe/YU/AdWEirs9pLQUr9eyGZN7HYJ03Aiy8R5aMBoeYsfxjifkb
|
||||
WCpbN+SEATaB8YY6Zy2LK/5TiUYNUYb/VHP//ZEv0+uPgkoro6gWVkvGDdXqH2d9svwfrQKf
|
||||
GSEQYXlLytZKvQSDLAqclSANs/y5HDjUxgtWKdsL3xNPCmffjpyiqS4pvoTiUwS4FwBsIR2s
|
||||
BDToIEHDvTNk1imeSmxCUgDxFzWkmB70FBmwz7zs9FzuoegrAxXonVit0+f3CxquN7tS0mHa
|
||||
WrZfhHxEIt65edkIz1wETOch3LIg6RaFwsXgrZCNTB/zjKGAFEzxOSBkjhyJCY2g74QNObKg
|
||||
TSeGNFqG0ZBHe2/JQ33UxrDtpeKvCYTbjuWlyrkCDQRS1G6IARAArtNBXq+CNU9DR2YCi759
|
||||
fLR9F62Ec/QLWY3c/D26OqjTgjxAzGKbu1aLzphP8tq1GDCbWQ2BMMZI+L0Ed502u6kC0fzv
|
||||
bppRRXrVaxBrwxY9XhnzvkXXzwNwnBalkrJ5Yk0lN8ocwCuUJohms7V14nEDyHgAB8yqCEWz
|
||||
Qm/SIZw35N/insTXshcdiUGeyufo85SFhCUqZ1x1TkSC/FyDG+BCwArfj8Qwdab3UlUEkF6c
|
||||
zTjwWIO+5vYuR8bsCGYKCSrGRh5nxw0tuGXWXWFlBMSZP6mFcCDRQDGcKOuGTjiWzLJcgsEc
|
||||
BoIX4WpHJYgl6ovex7HkfQsWPYL5V1FIHMlw34ALx4aQDH0dPJpC+FxynrfTfsIzPnmm2huX
|
||||
PGGYul/TmOp00CsJEcKOjqcrYOgraYkCGVXbd4ri6Pf7wJNiJ8V1iKTzQIrNpqGDk306Fww1
|
||||
VsYBLOnrSxNPYOOu1s8c8c9N5qbEbOCtQdFf5pfuqsr5nJ0G4mhjQ/eLtDA4E7GPrdtUoceO
|
||||
kYKcQFt/yqnL1Sj9Ojeht3ENPyVSgE8NiWxNIEM0YxPyJEPQawejT66JUnTjzLfGaDUxHfse
|
||||
RcyMMTbTrZ0fLJSRaIH1AubPxhiYy+IcWOVMyLiUwjBBpKMStej2XILEpIJXP6Pn96KjMcB1
|
||||
grd0J2vMw2Kg3E8AEQEAAYkERAQYAQIADwUCUtRuiAIbLgUJCWYBgAIpCRDC5zQk1ZCXq8Fd
|
||||
IAQZAQIABgUCUtRuiAAKCRA3u+4/etlbPwI5D/4idr7VHQpou6c/YLnK1lmz3hEikdxUxjC4
|
||||
ymOyeODsGRlaxXfjvjOCdocMzuCY3C+ZfNFKOTtVY4fV5Pd82MuY1H8lnuzqLxT6UwpIwo+y
|
||||
Ev6xSK0mqm2FhT0JSQ7E7MnoHqsU0aikHegyEucGIFzew6BJUD2xBu/qmVP/YEPUzhW4g8uD
|
||||
+oRMxdAHXqvtThvFySY/rakLQRMRVwYdTFHrvu3zHP+6hpZt25llJb3DiO+dTsv+ptLmlUr5
|
||||
JXLSSw2DfLxQa0kD5PGWpFPVJcxraS2pNDK9KTi2nr1ZqDxeKjDBT6zZOs9+4JQ9fepn1S26
|
||||
AmHWHhyzvpjKxVm4sOilKysi84CYluNrlEnidNf9wQa3NlLmtvxXQfm1py5tlwL5rE+ek1fw
|
||||
leaKXRcNNmm+T+vDdIw+JcHy8a53nK1JEfBqEuY6IqEPKDke0wDIsDLSwI1OgtQoe7Cm1PBu
|
||||
jfJu4rYQE+wwgWILTAgIy8WZXAloTcwVMtgfSsgHia++LqKfLDZ3JuwpaUAHAtguPy0QddvF
|
||||
I4R7eFDVwHT0sS3AsG0HAOCY/1FRe8cAw/+9Vp0oDtOvBWAXycnCbdQeHvwh2+Uj2u2f7K3C
|
||||
DMoevcBl4L5fkFkYTkmixCDy5nst1VM5nINueUIkUAJJbOGpd6yFdif7mQR0JWcPLudb+fwu
|
||||
sJ4UEACYWhPa8Gxa7eYopRsydlcdEzwpmo6E+V8GIdLFRFFpKHQEzbSW5coxzU6oOiPbTurC
|
||||
ZorIMHTA9cpAZoMUGKaSt19UKIMvSqtcDayhgf4cZ2ay1z0fdJ2PuLeNnWeiGyfq78q6wqSa
|
||||
Jq/h6JdAiwXplFd3gqJZTrFZz7A6Q6Pd7B+9PZ/DUdEO3JeZlHJDfRmfU2XPoyPUoq79+whP
|
||||
5Tl3WwHUv7Fg357kRSdzKv9DbgmhqRHlgVeKn9pwN4cpVBN+idzwPefQksSKH4lBDvVr/9j+
|
||||
V9mmrOx7QmQ5LCc/1on+L0dqo6suoajADhKy+lDQbzs2mVb4CLpPKncDup/9iJbjiR17DDFM
|
||||
wgyCoy5OHJICQ5lckNNgkHTS6Xiogkt28YfK4P3S0GaZgIrhKQ7AmO3O+hB12Zr+olpeyhGB
|
||||
OpBD80URntdEcenvfnXBY/BsuAVbTGXiBzrlBEyQxg656jUeqAdXg+nzCvP0yJlBUOjEcwyh
|
||||
K/U2nw9nGyaR3u0a9r24LgijGpdGabIeJm6O9vuuqFHHGI72pWUEs355lt8q1pAoJUv8NehQ
|
||||
mlaR0h5wcwhEtwM6fiSIUTnuJnyHT053GjsUD7ef5fY1KEFmaZeW04kRtFDOPinz0faE8hvs
|
||||
xzsVgkKye1c2vkXKdOXvA3x+pZzlTHtcgMOhjKQAsA==
|
||||
=H60S
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
filename: dokku.list
|
||||
- source: "deb https://apt.dockerproject.org/repo ubuntu-trusty main"
|
||||
key: |
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: SKS 1.1.5
|
||||
Comment: Hostname: pgpkeys.co.uk
|
||||
|
||||
mQINBFWln24BEADrBl5p99uKh8+rpvqJ48u4eTtjeXAWbslJotmC/CakbNSqOb9oddfzRvGV
|
||||
eJVERt/Q/mlvEqgnyTQy+e6oEYN2Y2kqXceUhXagThnqCoxcEJ3+KM4RmYdoe/BJ/J/6rHOj
|
||||
q7Omk24z2qB3RU1uAv57iY5VGw5p45uZB4C4pNNsBJXoCvPnTGAs/7IrekFZDDgVraPx/hdi
|
||||
wopQ8NltSfZCyu/jPpWFK28TR8yfVlzYFwibj5WKdHM7ZTqlA1tHIG+agyPf3Rae0jPMsHR6
|
||||
q+arXVwMccyOi+ULU0z8mHUJ3iEMIrpTX+80KaN/ZjibfsBOCjcfiJSB/acn4nxQQgNZigna
|
||||
32velafhQivsNREFeJpzENiGHOoyC6qVeOgKrRiKxzymj0FIMLru/iFF5pSWcBQB7PYlt8J0
|
||||
G80lAcPr6VCiN+4cNKv03SdvA69dCOj79PuO9IIvQsJXsSq96HB+TeEmmL+xSdpGtGdCJHHM
|
||||
1fDeCqkZhT+RtBGQL2SEdWjxbF43oQopocT8cHvyX6Zaltn0svoGs+wX3Z/H6/8P5anog43U
|
||||
65c0A+64Jj00rNDr8j31izhtQMRo892kGeQAaaxg4Pz6HnS7hRC+cOMHUU4HA7iMzHrouAdY
|
||||
eTZeZEQOA7SxtCME9ZnGwe2grxPXh/U/80WJGkzLFNcTKdv+rwARAQABtDdEb2NrZXIgUmVs
|
||||
ZWFzZSBUb29sIChyZWxlYXNlZG9ja2VyKSA8ZG9ja2VyQGRvY2tlci5jb20+iQIcBBABCgAG
|
||||
BQJWw7vdAAoJEFyzYeVS+w0QHysP/i37m4SyoOCVcnybl18vzwBEcp4VCRbXvHvOXty1gccV
|
||||
IV8/aJqNKgBV97lY3vrpOyiIeB8ETQegsrxFE7t/Gz0rsLObqfLEHdmn5iBJRkhLfCpzjeOn
|
||||
yB3Z0IJB6UogO/msQVYe5CXJl6uwr0AmoiCBLrVlDAktxVh9RWch0l0KZRX2FpHu8h+uM0/z
|
||||
ySqIidlYfLa3y5oHscU+nGU1i6ImwDTD3ysZC5jp9aVfvUmcESyAb4vvdcAHR+bXhA/RW8QH
|
||||
eeMFliWw7Z2jYHyuHmDnWG2yUrnCqAJTrWV+OfKRIzzJFBs4e88ru5h2ZIXdRepw/+COYj34
|
||||
LyzxR2cxr2u/xvxwXCkSMe7F4KZAphD+1ws61FhnUMi/PERMYfTFuvPrCkq4gyBjt3fFpZ2N
|
||||
R/fKW87QOeVcn1ivXl9id3MMs9KXJsg7QasT7mCsee2VIFsxrkFQ2jNpD+JAERRn9Fj4ArHL
|
||||
5TbwkkFbZZvSi6fr5h2GbCAXIGhIXKnjjorPY/YDX6X8AaHOW1zblWy/CFr6VFl963jrjJga
|
||||
g0G6tNtBZLrclZgWhOQpeZZ5Lbvz2ZA5CqRrfAVcwPNW1fObFIRtqV6vuVluFOPCMAAnOnqR
|
||||
02w9t17iVQjO3oVN0mbQi9vjuExXh1YoScVetiO6LSmlQfVEVRTqHLMgXyR/EMo7iQIcBBAB
|
||||
CgAGBQJXSWBlAAoJEFyzYeVS+w0QeH0QAI6btAfYwYPuAjfRUy9qlnPhZ+xt1rnwsUzsbmo8
|
||||
K3XTNh+l/R08nu0dsczw30Q1wju28fh1N8ay223+69f0+yICaXqR18AbGgFGKX7vo0gfEVax
|
||||
dItUN3eHNydGFzmeOKbAlrxIMECnSTG/TkFVYO9Ntlv9vSN2BupmTagTRErxLZKnVsWRzp+X
|
||||
elwlgU5BCZ6U6Ze8+bIc6F1bZstf17X8i6XNV/rOCLx2yP0hn1osoljoLPpW8nzkwvqYsYbC
|
||||
A28lMt1aqe0UWvRCqR0zxlKn17NZQqjbxcajEMCajoQ01MshmO5GWePViv2abCZ/iaC5zKqV
|
||||
T3deMJHLq7lum6qhA41E9gJH9QoqT+qgadheeFfoC1QP7cke+tXmYg2R39p3l5Hmm+JQbP4f
|
||||
9V5mpWExvHGCSbcatr35tnakIJZugq2ogzsm1djCSz9222RXl9OoFqsm1bNzA78+/cOt5N2c
|
||||
yhU0bM2T/zgh42YbDD+JDU/HSmxUIpU+wrGvZGM2FU/up0DRxOC4U1fL6HHlj8liNJWfEg3v
|
||||
hougOh66gGF9ik5j4eIlNoz6lst+gmvlZQ9/9hRDeoG+AbhZeIlQ4CCw+Y1j/+fUxIzKHPVK
|
||||
+aFJd+oJVNvbojJW/SgDdSMtFwqOvXyYcHl30Ws0gZUeDyAmNGZeJ3kFklnApDmeKK+OiQIi
|
||||
BBABCgAMBQJXe5zTBYMHhh+AAAoJEDG4FaMBBnSp7YMQAJqrXoBonZAq07B6qUaT3aBCgnY4
|
||||
JshbXmFb/XrrS75f7YJDPx2fJJdqrbYDIHHgOjzxvp3ngPpOpJzI5sYmkaugeoCO/KHu/+39
|
||||
XqgTB7fguzapRfbvuWp+qzPcHSdb9opnagfzKAze3DQnnLiwCPlsyvGpzC4KzXgV2ze/4raa
|
||||
Oye1kK7O0cHyapmn/q/TR3S8YapyXq5VpLThwJAw1SRDu0YxeXIAQiIfaSxT79EktoioW2CS
|
||||
V8/djt+gBjXnKYJJA8P1zzX7GNt/Rc2YG0Ot4v6tBW16xqFTg+n5JzbeK5cZ1jbIXXfCcaZJ
|
||||
yiM2MzYGhSJ9+EV7JYF05OAIWE4SGTRjXMquQ2oMLSwMCPQHm+FCD9PXQ0tHYx6tKT34wksd
|
||||
moWsdejl/n3NS+178mG1WI/lN079h3im2gRwOykMou/QWs3vGw/xDoOYHPV2gJ7To9BLVnVK
|
||||
/hROgdFLZFeyRScNzwKm57HmYMFA74tX601OiHhk1ymP2UUc25oDWpLXlfcRULJJlo/KfZZF
|
||||
3pmKwIq3CilGayFUi1NNwuavG76EcAVtVFUVFFIITwkhkuRbBHIytzEHYosFgD5/acK0Pauq
|
||||
JnwrwKv0nWq3aK7nKiALAD+iZvPNjFZau3/APqLEmvmRnAElmugcHsWREFxMMjMMVgYFiYKU
|
||||
AJO8u46eiQI4BBMBAgAiBQJVpZ9uAhsvBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRD3
|
||||
YiFXLFJgnbRfEAC9Uai7Rv20QIDlDogRzd+Vebg4ahyoUdj0CH+nAk40RIoq6G26u1e+sdgj
|
||||
pCa8jF6vrx+smpgd1HeJdmpahUX0XN3X9f9qU9oj9A4I1WDalRWJh+tP5WNv2ySy6AwcP9Qn
|
||||
juBMRTnTK27pk1sEMg9oJHK5p+ts8hlSC4SluyMKH5NMVy9c+A9yqq9NF6M6d6/ehKfBFFLG
|
||||
9BX+XLBATvf1ZemGVHQusCQebTGv0C0V9yqtdPdRWVIEhHxyNHATaVYOafTj/EF0lDxLl6zD
|
||||
T6trRV5n9F1VCEh4Aal8L5MxVPcIZVO7NHT2EkQgn8CvWjV3oKl2GopZF8V4XdJRl90U/WDv
|
||||
/6cmfI08GkzDYBHhS8ULWRFwGKobsSTyIvnbk4NtKdnTGyTJCQ8+6i52s+C54PiNgfj2ieNn
|
||||
6oOR7d+bNCcG1CdOYY+ZXVOcsjl73UYvtJrO0Rl/NpYERkZ5d/tzw4jZ6FCXgggA/Zxcjk6Y
|
||||
1ZvIm8Mt8wLRFH9Nww+FVsCtaCXJLP8DlJLASMD9rl5QS9Ku3u7ZNrr5HWXPHXITX660jgly
|
||||
shch6CWeiUATqjIAzkEQom/kEnOrvJAtkypRJ59vYQOedZ1sFVELMXg2UCkD/FwojfnVtjzY
|
||||
aTCeGwFQeqzHmM241iuOmBYPeyTY5veF49aBJA1gEJOQTvBR8Q==
|
||||
=Yhur
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
filename: docker.list
|
||||
|
||||
package_upgrade: true
|
||||
|
||||
debconf_selections: |
|
||||
|
||||
dokku dokku/web_config boolean false
|
||||
dokku dokku/vhost_enable boolean true
|
||||
# set the domain name of the new Dokku server
|
||||
dokku dokku/hostname string $YOUR_FULL_QUALIFIED_DOMAIN
|
||||
# this copies over the public SSH key assigned to the server
|
||||
dokku dokku/key_file string /home/dhc-user/.ssh/authorized_keys
|
||||
|
||||
packages:
|
||||
- dokku
|
||||
```
|
||||
@@ -24,9 +24,11 @@ __Warning__: These steps will delete *everything* on your Linode.
|
||||
|
||||
5. SSH into your Linode as root and run the following commands:
|
||||
|
||||
apt-get update
|
||||
apt-get -qq upgrade
|
||||
apt-get -qq install linux-image-virtual linux-image-extra-virtual
|
||||
```shell
|
||||
apt-get update
|
||||
apt-get -qq upgrade
|
||||
apt-get install linux-image-virtual linux-image-extra-virtual
|
||||
```
|
||||
|
||||
6. When prompted, install Grub onto the first hard drive.
|
||||
|
||||
@@ -36,4 +38,4 @@ __Warning__: These steps will delete *everything* on your Linode.
|
||||
|
||||
9. Lastly, reboot the Linode.
|
||||
|
||||
Once your server comes back online, you'll be running Ubuntu's default kernel. You can now follow Dokku's [normal installation instructions](/dokku/installation) and `bootstrap.sh` will take care of everything else.
|
||||
Once your server comes back online, you'll be running Ubuntu's default kernel. You can now follow Dokku's [normal installation instructions](/dokku/getting-started/installation/) and `bootstrap.sh` will take care of everything else.
|
||||
|
||||
@@ -4,18 +4,13 @@
|
||||
- Download and install [Vagrant](http://www.vagrantup.com/downloads.html)
|
||||
- Clone Dokku
|
||||
|
||||
```
|
||||
```shell
|
||||
git clone https://github.com/dokku/dokku.git
|
||||
```
|
||||
|
||||
- Setup SSH hosts in your `/etc/hosts`
|
||||
|
||||
```
|
||||
10.0.0.2 dokku.me
|
||||
```
|
||||
|
||||
- Create VM
|
||||
```
|
||||
|
||||
```shell
|
||||
# Optional ENV arguments:
|
||||
# - `BOX_NAME`
|
||||
# - `BOX_URI`
|
||||
@@ -28,13 +23,14 @@
|
||||
```
|
||||
- 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`
|
||||
|
||||
```
|
||||
```ini
|
||||
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.
|
||||
|
||||
Please note, the `dokku.me` domain is setup to point to `10.0.0.2` along with all subdomains (ie yourapp.dokku.me). If you change the `DOKKU_IP` in your vagrant setup you'll need to update your `/etc/hosts` file to point your reconfigured ip address.
|
||||
|
||||
You are now ready to deploy an app or install plugins.
|
||||
|
||||
For a different, complete, example see https://github.com/RyanBalfanz/dokku-vagrant-example.
|
||||
|
||||
@@ -20,35 +20,38 @@ Dokku is designed for usage on a fresh installation of Ubuntu, and should instal
|
||||
To install the latest stable version of dokku, you can run the following shell commands:
|
||||
|
||||
```shell
|
||||
# installs dokku via apt-get
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.5.4/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.5.4 bash bootstrap.sh
|
||||
# for debian systems, installs Dokku via apt-get
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.7.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.7.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
The installation process takes about 5-10 minutes, depending upon internet connection speed.
|
||||
|
||||
#### 2. Setup SSH key and Virtualhost Settings
|
||||
|
||||
Once the installation is complete, you can open a browser to setup your SSH key and virtualhost settings. Open your browser of choice and navigate to the host's IP address - or the domain you assigned to that IP previously - and configure dokku via the web admin.
|
||||
Once the installation is complete, you can open a browser to setup your SSH key and virtualhost settings. Open your browser of choice and navigate to the host's IP address - or the domain you assigned to that IP previously - and configure Dokku via the web admin.
|
||||
|
||||
*If you don't complete setup via the web installer (even if you set up SSH keys and virtual hosts otherwise) your Dokku installation will remain vulnerable to anyone finding the setup page and inserting their key.*
|
||||
|
||||
#### 3. Deploy your first application
|
||||
Once you save your settings, the web admin will self-terminate and you should be able to run or deploy to the dokku installation.
|
||||
Once you save your settings, the web admin will self-terminate and you should be able to run or deploy to the Dokku installation.
|
||||
|
||||
### Installing via other methods
|
||||
|
||||
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](/dokku/getting-started/install/digitalocean)
|
||||
- [DreamHost Cloud Installation Notes](/dokku/getting-started/install/dreamhost/)
|
||||
- [Linode Installation Notes](/dokku/getting-started/install/linode/)
|
||||
- [Microsoft Azure Installation Notes](/dokku/getting-started/install/azure/)
|
||||
|
||||
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](/dokku/getting-started/install/debian)
|
||||
- [Vagrant Installation Notes](/dokku/getting-started/install/vagrant)
|
||||
- [Advanced Install Customization](/dokku/advanced-installation)
|
||||
- [Debian Package Installation Notes](/dokku/getting-started/install/debian/)
|
||||
- [Vagrant Installation Notes](/dokku/getting-started/install/vagrant/)
|
||||
- [Advanced Install Customization](/dokku/getting-started/advanced-installation/)
|
||||
|
||||
---
|
||||
|
||||
- <sup>[1]: To check whether your system has an fqdn set, run `sudo hostname -f`</sup>
|
||||
- <sup>[2]: If your system has less than 1GB of memory, you can use [this workaround](/dokku/advanced-installation/#vms-with-less-than-1gb-of-memory).</sup>
|
||||
- <sup>[2]: If your system has less than 1GB of memory, you can use [this workaround](/dokku/getting-started/advanced-installation/#vms-with-less-than-1gb-of-memory).</sup>
|
||||