Files
dokku/docs/deployment/methods/tar.md
Jose Diaz-Gonzalez 5c1a1baf08 feat: implement git:from-archive
The previous tar support lacked the ability to track changes between tarball deploys. Critically, it also failed to be handled correctly when there was _also_ a git deployment done on the app, resulting in odd deployment states depending on the angles of the moon and the sun in the sky.

Rather than try to "fix" this through some hokey mechanism, importing the tar file contents into the git repository is preferred, as then the user can refer to the repository for commit history.

Additionally, we add support for non-tar files (tar.gz and zip), enabling deployments from systems that do not create tar files, such as Github (their tarball url is a tar.gz file).

Finally, this deprecates the tar plugin, and sets it to be removed in the next minor release (in addition to the tags plugin).

Closes #3458
Closes #4207
2021-03-01 08:13:51 -05:00

1.7 KiB

Tarball Deployment

Warning: As of 0.24.0, this functionality is deprecated in favor of the git:from-archive command. It will be removed in a future release, and is considered unmaintained. Users are highly encouraged to switch their workflows to git:from-arhive.

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.

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:

# run from the generated artifact directory
tar c . $* | dokku tar:in node-js-app