following upstream develop; adds sentry
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
938 B

  1. FROM elixir:1.9-alpine as build
  2. COPY . .
  3. ENV MIX_ENV=prod
  4. RUN apk add git gcc g++ musl-dev make &&\
  5. echo "import Mix.Config" > config/prod.secret.exs &&\
  6. mix local.hex --force &&\
  7. mix local.rebar --force &&\
  8. mix deps.get --only prod &&\
  9. mkdir release &&\
  10. mix release --path release
  11. FROM alpine:3.9
  12. ARG HOME=/opt/pleroma
  13. ARG DATA=/var/lib/pleroma
  14. RUN echo "http://nl.alpinelinux.org/alpine/latest-stable/community" >> /etc/apk/repositories &&\
  15. apk update &&\
  16. apk add ncurses postgresql-client &&\
  17. adduser --system --shell /bin/false --home ${HOME} pleroma &&\
  18. mkdir -p ${DATA}/uploads &&\
  19. mkdir -p ${DATA}/static &&\
  20. chown -R pleroma ${DATA} &&\
  21. mkdir -p /etc/pleroma &&\
  22. chown -R pleroma /etc/pleroma
  23. USER pleroma
  24. COPY --from=build --chown=pleroma:0 /release ${HOME}
  25. COPY ./config/docker.exs /etc/pleroma/config.exs
  26. COPY ./docker-entrypoint.sh ${HOME}
  27. EXPOSE 4000
  28. ENTRYPOINT ["/opt/pleroma/docker-entrypoint.sh"]