docs: cleanup deployment-tasks.md and plugins.md

This commit is contained in:
Jose Diaz-Gonzalez
2021-07-09 22:08:21 -04:00
parent 93f1a8e59d
commit db421c97dc
2 changed files with 113 additions and 113 deletions

View File

@@ -4,39 +4,39 @@
Sometimes you need to run a command on deployment time, but before an app is completely deployed. Common use cases include:
* Checking a database is initialized
* Running database migrations
* Any commands required to set up the server (e.g. something like a Django `collectstatic`)
- Checking a database is initialized
- Running database migrations
- Any commands required to set up the server (e.g. something like a Django `collectstatic`)
To support this, Dokku provides support for a special `release` command within your app's `Procfile`, as well as a special `scripts.dokku` key inside of your app's `app.json` file. Be aware that all commands are run within the context of the built docker image - no commands affect the host unless there are volume mounts attached to your app.
Each "phase" has different expectations and limitations:
- `app.json`: `scripts.dokku.predeploy`
- When to use: This should be used if your app does not support arbitrary build commands and you need to make changes to the built image.
- Are changes committed to the image at this phase: Yes
- Example use-cases
- Bundling assets in a slightly different way
- Installing a custom package from source or copying a binary into place
- When to use: This should be used if your app does not support arbitrary build commands and you need to make changes to the built image.
- Are changes committed to the image at this phase: Yes
- Example use-cases
- Bundling assets in a slightly different way
- Installing a custom package from source or copying a binary into place
- `app.json`: `scripts.dokku.postdeploy`
- When to use: This should be used in conjunction with external systems to signal the completion of your deploy.
- Are changes committed to the image at this phase: No
- Example use-cases
- Notifying slack that your app is deployed
- Coordinating traffic routing with a central load balancer
- When to use: This should be used in conjunction with external systems to signal the completion of your deploy.
- Are changes committed to the image at this phase: No
- Example use-cases
- Notifying slack that your app is deployed
- Coordinating traffic routing with a central load balancer
- `app.json`: `scripts.postdeploy`
- When to use: This should be used when you wish to run a command _once_, after the app is created and not on subsequent deploys to the app.
- Are changes committed to the image at this phase: No
- Example use-cases
- Setting up OAuth clients and DNS
- Loading seed/test data into the apps test database
- When to use: This should be used when you wish to run a command _once_, after the app is created and not on subsequent deploys to the app.
- Are changes committed to the image at this phase: No
- Example use-cases
- Setting up OAuth clients and DNS
- Loading seed/test data into the apps test database
- `Procfile`: `release`
- When to use: This should be used in conjunction with external systems to signal the completion of your app image build.
- Are changes committed to the image at this phase: No
- Example use-cases
- Sending CSS, JS, and other assets from your apps slug to a CDN or S3 bucket
- Priming or invalidating cache stores
- Running database migrations
- When to use: This should be used in conjunction with external systems to signal the completion of your app image build.
- Are changes committed to the image at this phase: No
- Example use-cases
- Sending CSS, JS, and other assets from your apps slug to a CDN or S3 bucket
- Priming or invalidating cache stores
- Running database migrations
Additionally, if using a Dockerfile with an `ENTRYPOINT`, the deployment task is passed to that entrypoint as is. The exceptions are if the entrypoint is one of the following:
@@ -54,8 +54,8 @@ Please keep the above in mind when utilizing deployment tasks.
Dokku provides limited support for the `app.json` manifest from Heroku (documentation available [here](https://devcenter.heroku.com/articles/app-json-schema)). The keys available for use with Deployment Tasks are:
- `scripts.dokku.predeploy`: This is run _after_ an app's docker image is built, but _before_ any containers are scheduled. Changes made to your image are committed at this phase.
- `scripts.dokku.postdeploy`: This is run _after_ an app's containers are scheduled. Changes made to your image are *not* committed at this phase.
- `scripts.postdeploy`: This is run _after_ an app's containers are scheduled. Changes made to your image are *not* committed at this phase.
- `scripts.dokku.postdeploy`: This is run _after_ an app's containers are scheduled. Changes made to your image are _not_ committed at this phase.
- `scripts.postdeploy`: This is run _after_ an app's containers are scheduled. Changes made to your image are _not_ committed at this phase.
For buildpack-based deployments, the location of the `app.json` file should be at the root of your repository. Dockerfile-based app deploys should have the `app.json` in the configured `WORKDIR` directory; otherwise Dokku defaults to the buildpack app behavior of looking in `/app`.
@@ -87,6 +87,6 @@ To use the `release` command, simply add a `release` stanza to your Procfile.
release: curl https://some.external.api.service.com/deployment?state=built
```
Unlike the `scripts.dokku.predeploy` command, changes made during by the `release` command are *not* persisted to disk.
Unlike the `scripts.dokku.predeploy` command, changes made during by the `release` command are _not_ persisted to disk.
> Warning: scaling the release command up will likely result in unspecified issues within your deployment, and is highly discouraged.

View File

@@ -47,92 +47,6 @@ The following plugins are available and provided by Dokku maintainers. Please f
> Warning: 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
[ademuk]: https://github.com/ademuk
[agco-adm]: https://github.com/agco-adm
[alessio]: https://github.com/alessio
[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
[artofrawr]: https://github.com/artofrawr
[badsyntax]: https://github.com/badsyntax
[basgys]: https://github.com/basgys
[Benjamin-Dobell]: https://github.com/Benjamin-Dobell
[blag]: https://github.com/blag
[cameron-martin]: https://github.com/cameron-martin
[candlewaster]: https://notabug.org/candlewaster
[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
[dokku-community]: https://github.com/dokku-community
[dyson]: https://github.com/dyson
[fermuch]: https://github.com/fermuch
[fgrehm]: https://github.com/fgrehm
[Flink]: https://github.com/Flink
[fomojola]: https://github.com/fomojola
[gdi2290]: https://github.com/gdi2290
[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
[m0rth1um]: https://github.com/m0rth1um
[Maciej Łebkowski]: https://github.com/mlebkowski
[matto1990]: https://github.com/matto1990
[mbreit]: https://github.com/mbreit
[mbriskar]: https://github.com/mbriskar
[michaelshobbs]: https://github.com/michaelshobbs
[mikecsh]: https://github.com/mikecsh
[mikexstudios]: https://github.com/mikexstudios
[mimischi]: https://github.com/mimischi
[mixxorz]: https://github.com/mixxorz
[mlebkowski]: https://github.com/mlebkowski
[motin]: https://github.com/motin
[mrname]: https://github.com/mrname
[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
[pauldub]: https://github.com/pauldub
[pnegahdar]: https://github.com/pnegahdar
[RaceHub]: https://github.com/racehub
[ribot]: https://github.com/ribot
[rlaneve]: https://github.com/rlaneve
[robv]: https://github.com/robv
[scottatron]: https://github.com/scottatron
[sehrope]: https://github.com/sehrope
[sekjun9878]: https://github.com/sekjun9878
[sgulseth]: https://github.com/sgulseth
[sseemayer]: https://github.com/sseemayer
[statianzo]: https://github.com/statianzo
[stuartpb]: https://github.com/stuartpb
[thrashr888]: https://github.com/thrashr888
[wmluke]: https://github.com/wmluke
[Zenedith]: https://github.com/Zenedith
[fteychene]: https://github.com/fteychene
[sarendsen]: https://github.com/sarendsen
[baikunz]: https://github.com/baikunz
[lazyatom]: https://github.com/lazyatom
[ollej]: https://github.com/ollej
### Datastores
#### Relational
@@ -323,3 +237,89 @@ The following plugins are no longer maintained by their developers.
| [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.
[256dpi]: https://github.com/256dpi
[abossard]: https://github.com/dudagroup
[ademuk]: https://github.com/ademuk
[agco-adm]: https://github.com/agco-adm
[alessio]: https://github.com/alessio
[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
[artofrawr]: https://github.com/artofrawr
[badsyntax]: https://github.com/badsyntax
[basgys]: https://github.com/basgys
[Benjamin-Dobell]: https://github.com/Benjamin-Dobell
[blag]: https://github.com/blag
[cameron-martin]: https://github.com/cameron-martin
[candlewaster]: https://notabug.org/candlewaster
[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
[dokku-community]: https://github.com/dokku-community
[dyson]: https://github.com/dyson
[fermuch]: https://github.com/fermuch
[fgrehm]: https://github.com/fgrehm
[Flink]: https://github.com/Flink
[fomojola]: https://github.com/fomojola
[gdi2290]: https://github.com/gdi2290
[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
[m0rth1um]: https://github.com/m0rth1um
[Maciej Łebkowski]: https://github.com/mlebkowski
[matto1990]: https://github.com/matto1990
[mbreit]: https://github.com/mbreit
[mbriskar]: https://github.com/mbriskar
[michaelshobbs]: https://github.com/michaelshobbs
[mikecsh]: https://github.com/mikecsh
[mikexstudios]: https://github.com/mikexstudios
[mimischi]: https://github.com/mimischi
[mixxorz]: https://github.com/mixxorz
[mlebkowski]: https://github.com/mlebkowski
[motin]: https://github.com/motin
[mrname]: https://github.com/mrname
[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
[pauldub]: https://github.com/pauldub
[pnegahdar]: https://github.com/pnegahdar
[RaceHub]: https://github.com/racehub
[ribot]: https://github.com/ribot
[rlaneve]: https://github.com/rlaneve
[robv]: https://github.com/robv
[scottatron]: https://github.com/scottatron
[sehrope]: https://github.com/sehrope
[sekjun9878]: https://github.com/sekjun9878
[sgulseth]: https://github.com/sgulseth
[sseemayer]: https://github.com/sseemayer
[statianzo]: https://github.com/statianzo
[stuartpb]: https://github.com/stuartpb
[thrashr888]: https://github.com/thrashr888
[wmluke]: https://github.com/wmluke
[Zenedith]: https://github.com/Zenedith
[fteychene]: https://github.com/fteychene
[sarendsen]: https://github.com/sarendsen
[baikunz]: https://github.com/baikunz
[lazyatom]: https://github.com/lazyatom
[ollej]: https://github.com/ollej