Add Dockerfile

This commit is contained in:
Correl Roush 2019-12-26 15:37:28 -05:00
parent af886edff2
commit 91c04ba43b
3 changed files with 25 additions and 0 deletions

5
.dockerignore Normal file
View file

@ -0,0 +1,5 @@
_build/
priv/riichi.js
priv/riichi.css
priv/elm-stuff/
priv/node_modules/

17
Dockerfile Normal file
View file

@ -0,0 +1,17 @@
FROM erlang:19.3 as builder
MAINTAINER Correl Roush <correl@gmail.com>
WORKDIR /home/build
RUN apt-get update \
&& apt-get -y install curl gnupg \
&& curl -sL https://deb.nodesource.com/setup_11.x | bash - \
&& apt-get -y install nodejs
COPY . /home/build
RUN rebar3 as prod release
FROM erlang:19.3-slim
WORKDIR /home/app
ENV RELX_REPLACE_OS_VARS true
COPY --from=builder /home/build/_build/prod/rel/riichi /home/app
EXPOSE 8080 8080
ENTRYPOINT ["/home/app/bin/riichi"]

View file

@ -23,3 +23,6 @@
{dev_mode, true}, {dev_mode, true},
{include_erts, false}, {include_erts, false},
{extended_start_script, true}]}. {extended_start_script, true}]}.
{profiles, [{prod, [{relx, [{dev_mode, false}
,{include_erts, true}]}]}]}.