Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/artofrawr/dokku-multi-dockerfile

Dokku plugin to choose which Dockerfile is used depending on the app being deployed to
https://github.com/artofrawr/dokku-multi-dockerfile

Last synced: 5 days ago
JSON representation

Dokku plugin to choose which Dockerfile is used depending on the app being deployed to

Awesome Lists containing this project

README

        

dokku-multi-dockerfile
===============

Dokku plugin to choose which Dockerfile is used depending on the app being deployed to.

## Install

```
dokku plugin:install https://github.com/artofrawr/dokku-multi-dockerfile
```

## Usage

```
$ ls
.dokku-multi-dockerfile
Dockerfile
Dockerfile.storybook
```

The file .dokku-multi-dockerfile determines which Dockerfile is used for which app:
```
app=Dockerfile
stories=Dockerfile.storybook
```

The part before `=` is used to identify the dokku application. For example, here:
```
$ git remote -v
first [email protected]:app
first-storybook [email protected]:stories
second [email protected]:second-app
```

For the `app` and `second-app` applications `Dockerfile` would be used. For `stories` the `Dockerfile.storybook` would be used.

When you push the code to an application's remote, the correct Dockerfile gets detected for you:
```
$ git push first-storybook
Counting objects: 253, done.
Writing objects: 100% (253/253), 38.27 KiB | 0 bytes/s, done.
Total 253 (delta 117), reused 233 (delta 109)
=====> Multi Dockerfile Project detected
=====> Installing with Dockerfile.storybook
-----> Cleaning up...
...
```

It's that easy!