Skip to content
This repository has been archived by the owner on Jun 13, 2019. It is now read-only.

Commit

Permalink
Merge pull request #11 from aeons/configurable-paths
Browse files Browse the repository at this point in the history
Allow configuring path to dockerfiles
  • Loading branch information
teamon authored Feb 7, 2017
2 parents b5393ef + 4b21119 commit 8887e73
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ like this:
```elixir
config :hello, Hello.Endpoint,
server: true,
url: [host: "${DOMAIN}"]
url: [host: "${DOMAIN}"]

config :hello, Hello.Mailer,
adapter: Bamboo.MailgunAdapter,
Expand All @@ -89,6 +89,20 @@ Feel free to add some more apk packages or run some custom commands.
TIP: To keep the build process efficient check whether a given package is required only for
compilation (build) or runtime (release) or both.

#### How to move the Dockerfiles?

You can specify where to find the two Dockerfiles in the config.

```elixir
# config/config.exs
config :mix_docker,
dockerfile_build: "path/to/Dockerfile.build",
dockerfile_release: "path/to/Dockerfile.release"
```

The path is relative to the project root, and the files must be located inside
the root.


#### How to configure a Phoenix app?

Expand Down
4 changes: 2 additions & 2 deletions lib/mix_docker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ defmodule MixDocker do
require Logger

@dockerfile_path :code.priv_dir(:mix_docker)
@dockerfile_build "Dockerfile.build"
@dockerfile_release "Dockerfile.release"
@dockerfile_build Application.get_env(:mix_docker, :dockerfile_build, "Dockerfile.build")
@dockerfile_release Application.get_env(:mix_docker, :dockerfile_release, "Dockerfile.release")

def init(args) do
# copy .dockerignore
Expand Down

0 comments on commit 8887e73

Please sign in to comment.