Last active
April 8, 2019 15:51
-
-
Save felix-d/6acfe282998543f6a8e77de4acab734d to your computer and use it in GitHub Desktop.
Revisions
-
felix-d revised this gist
Dec 29, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -29,7 +29,7 @@ RUN mkdir target RUN tar xzf ./_build/prod/rel/$APP_NAME/releases/*/$APP_NAME.tar.gz -C ./target # Final image FROM alpine:latest RUN apk add --update openssl bash && \ rm -rf /var/cache/apk/* -
felix-d revised this gist
Dec 29, 2017 . 1 changed file with 11 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,44 +1,42 @@ # Assets compilation FROM aparedes/alpine-node-yarn as node ## Node modules COPY ./deps /tmp/deps COPY ./assets/package.json /tmp/deps COPY ./assets/package-lock.json /tmp/deps WORKDIR /tmp/deps RUN yarn ## Assets compilation COPY ./assets /tmp/assets RUN cp -R /tmp/deps/node_modules /tmp/assets WORKDIR /tmp/assets RUN ./node_modules/.bin/brunch build --production # Distillery release FROM bitwalker/alpine-elixir as distillery ARG APP_NAME=web ENV MIX_ENV prod COPY . /app COPY --from=node /tmp/priv/static /app/priv/static WORKDIR /app RUN mix phx.digest && mix release --env=prod RUN mkdir target RUN tar xzf ./_build/prod/rel/$APP_NAME/releases/*/$APP_NAME.tar.gz -C ./target # Final image from alpine:latest RUN apk add --update openssl bash && \ rm -rf /var/cache/apk/* COPY --from=distillery /app/target /app ENV PORT 4000 WORKDIR /app CMD ["./bin/web", "foreground", "--sname", "web", "--cookie", "secret"] -
felix-d revised this gist
Dec 21, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -27,7 +27,7 @@ COPY --from=node /tmp/priv/static /app/priv/static RUN mix phx.digest && mix release --env=prod RUN mkdir target RUN tar xzf ./_build/prod/rel/$APP_NAME/releases/*/$APP_NAME.tar.gz -C ./target # Final image from alpine:latest -
felix-d revised this gist
Dec 21, 2017 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,6 +16,8 @@ RUN ./node_modules/.bin/brunch build --production # Distillery release FROM bitwalker/alpine-elixir as distillery ARG APP_NAME=web ENV MIX_ENV prod WORKDIR /app @@ -25,7 +27,7 @@ COPY --from=node /tmp/priv/static /app/priv/static RUN mix phx.digest && mix release --env=prod RUN mkdir target RUN tar xzf ./_build/prod/rel/$APP_NAME/releases/$APP_NAME/web.tar.gz -C ./target # Final image from alpine:latest -
felix-d created this gist
Dec 21, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,42 @@ # Assets compilation FROM aparedes/alpine-node-yarn as node WORKDIR /tmp/node_modules COPY ./deps /tmp/deps COPY ./assets/package.json . COPY ./assets/package-lock.json . RUN yarn WORKDIR /tmp/assets COPY ./assets . RUN cp -R /tmp/node_modules/node_modules . RUN ./node_modules/.bin/brunch build --production # Distillery release FROM bitwalker/alpine-elixir as distillery ENV MIX_ENV prod WORKDIR /app COPY . /app COPY --from=node /tmp/priv/static /app/priv/static RUN mix phx.digest && mix release --env=prod RUN mkdir target RUN tar xzf ./_build/prod/rel/web/releases/*/web.tar.gz -C ./target # Final image from alpine:latest WORKDIR /app RUN apk add --update openssl bash && \ rm -rf /var/cache/apk/* COPY --from=distillery /app/target /app ENV PORT 4000 CMD ["./bin/web", "foreground", "--sname", "web", "--cookie", "secret"]