Skip to content

Instantly share code, notes, and snippets.

@paveltyk
Last active September 11, 2019 21:06
Show Gist options
  • Save paveltyk/d8aacafed862f4d42fc3b83f9fea4c33 to your computer and use it in GitHub Desktop.
Save paveltyk/d8aacafed862f4d42fc3b83f9fea4c33 to your computer and use it in GitHub Desktop.
FROM node:10-alpine AS assets
WORKDIR /app/assets
COPY ./assets /app/assets
RUN yarn install && yarn build
FROM elixir:1.9.1-alpine
ARG MIX_ENV=prod
ARG DATABASE_URL=postgres://postgres:postgres@localhost/healthyskin_dev
ARG SECRET_KEY_BASE=secret
ENV MIX_HOME=/root/.mix
WORKDIR /app
COPY . /app
COPY --from=assets /app/assets/build /app/assets/build
RUN apk --no-cache add curl
RUN mix local.hex --force && mix local.rebar --force && mix do deps.get, compile
CMD mix phx.server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment