Commit a6599261 authored by Frank Rousseau's avatar Frank Rousseau
Browse files

Fix Dockerfile

parent d7d56492
Pipeline #74280626 passed with stage
in 3 minutes and 41 seconds
......@@ -29,13 +29,13 @@ RUN mix do deps.get, deps.compile, compile
RUN \
mkdir -p /opt/built && \
mix release --verbose && \
mix distillery.release --env=prod --name=gaja --verbose && \
cp _build/${MIX_ENV}/rel/${APP_NAME}/releases/${APP_VSN}/${APP_NAME}.tar.gz /opt/built && \
cd /opt/built && \
tar -xzf ${APP_NAME}.tar.gz && \
rm ${APP_NAME}.tar.gz
FROM alpine:${ALPINE_VERSION}
FROM elixir:1.7.2-alpine
ARG APP_NAME=gaja
......@@ -47,8 +47,11 @@ RUN apk update && \
ENV REPLACE_OS_VARS=true \
APP_NAME=${APP_NAME}
RUN apk add postgresql-client
WORKDIR /opt/gaja
COPY --from=builder /opt/built .
CMD trap 'exit' INT; /opt/gaja/bin/${APP_NAME} foreground
CMD /opt/gaja/bin/gaja create && \
/opt/gaja/bin/gaja migrate && \
/opt/gaja/bin/gaja foreground
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment