-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
21 lines (18 loc) · 754 Bytes
/
Makefile
File metadata and controls
21 lines (18 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
ERLANG_VERSION ?= `grep 'erlang_version' elixir_buildpack.config | cut -d '=' -f2`
ELIXIR_VERSION ?= `grep 'elixir_version' elixir_buildpack.config | cut -d '=' -f2`
ALPINE_VERSION ?= `grep 'alpine_version' elixir_buildpack.config | cut -d '=' -f2`
COMMAND ?= `grep 'web' Procfile | cut -d ':' -f2`
REVISION ?= `git rev-parse HEAD`
APP_NAME ?= ex_gridhook
prod-image:
DOCKER_BUILDKIT=1 docker build \
--build-arg MIX_ENV=prod \
--build-arg ERLANG_VERSION=$(ERLANG_VERSION) \
--build-arg ELIXIR_VERSION=$(ELIXIR_VERSION) \
--build-arg ALPINE_VERSION=$(ALPINE_VERSION) \
--build-arg REVISION=$(REVISION) \
--progress=plain \
-f Dockerfile \
-t ${APP_NAME} .
run: prod-image
docker run -p 48546:48546 -it ${APP_NAME} $(COMMAND)