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

Commit 8887e73

Browse files
authored
Merge pull request #11 from aeons/configurable-paths
Allow configuring path to dockerfiles
2 parents b5393ef + 4b21119 commit 8887e73

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ like this:
6363
```elixir
6464
config :hello, Hello.Endpoint,
6565
server: true,
66-
url: [host: "${DOMAIN}"]
66+
url: [host: "${DOMAIN}"]
6767

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

92+
#### How to move the Dockerfiles?
93+
94+
You can specify where to find the two Dockerfiles in the config.
95+
96+
```elixir
97+
# config/config.exs
98+
config :mix_docker,
99+
dockerfile_build: "path/to/Dockerfile.build",
100+
dockerfile_release: "path/to/Dockerfile.release"
101+
```
102+
103+
The path is relative to the project root, and the files must be located inside
104+
the root.
105+
92106

93107
#### How to configure a Phoenix app?
94108

lib/mix_docker.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ defmodule MixDocker do
22
require Logger
33

44
@dockerfile_path :code.priv_dir(:mix_docker)
5-
@dockerfile_build "Dockerfile.build"
6-
@dockerfile_release "Dockerfile.release"
5+
@dockerfile_build Application.get_env(:mix_docker, :dockerfile_build, "Dockerfile.build")
6+
@dockerfile_release Application.get_env(:mix_docker, :dockerfile_release, "Dockerfile.release")
77

88
def init(args) do
99
# copy .dockerignore

0 commit comments

Comments
 (0)