2021-04-24 23:01:14 +00:00
|
|
|
FROM elixir:1.11.4-alpine
|
2018-08-25 16:28:19 +00:00
|
|
|
|
|
|
|
ENV UID=911 GID=911 \
|
|
|
|
MIX_ENV=prod
|
|
|
|
|
|
|
|
ARG PLEROMA_VER=develop
|
|
|
|
|
|
|
|
RUN apk -U upgrade \
|
|
|
|
&& apk add --no-cache \
|
2020-07-24 10:15:05 +00:00
|
|
|
build-base \
|
2020-08-22 09:25:08 +00:00
|
|
|
cmake \
|
2020-10-18 17:45:04 +00:00
|
|
|
git \
|
|
|
|
file-dev
|
2018-08-25 16:28:19 +00:00
|
|
|
|
|
|
|
RUN addgroup -g ${GID} pleroma \
|
|
|
|
&& adduser -h /pleroma -s /bin/sh -D -G pleroma -u ${UID} pleroma
|
|
|
|
|
|
|
|
USER pleroma
|
2020-07-24 10:15:05 +00:00
|
|
|
WORKDIR /pleroma
|
2018-08-25 16:28:19 +00:00
|
|
|
|
|
|
|
RUN git clone -b develop https://git.pleroma.social/pleroma/pleroma.git /pleroma \
|
|
|
|
&& git checkout ${PLEROMA_VER}
|
|
|
|
|
|
|
|
COPY config/secret.exs /pleroma/config/prod.secret.exs
|
|
|
|
|
|
|
|
RUN mix local.rebar --force \
|
|
|
|
&& mix local.hex --force \
|
|
|
|
&& mix deps.get \
|
|
|
|
&& mix compile
|
|
|
|
|
|
|
|
VOLUME /pleroma/uploads/
|
|
|
|
|
2021-07-22 19:30:20 +00:00
|
|
|
RUN chown -R pleroma:pleroma ./
|
|
|
|
|
2018-08-25 16:28:19 +00:00
|
|
|
CMD ["mix", "phx.server"]
|