2021-04-24 23:01:14 +00:00
|
|
|
FROM elixir:1.11.4-alpine
|
2018-08-25 16:28:19 +00:00
|
|
|
|
|
|
|
ARG PLEROMA_VER=develop
|
2022-03-17 14:21:04 +00:00
|
|
|
ARG UID=911
|
|
|
|
ARG GID=911
|
2021-10-15 16:14:30 +00:00
|
|
|
ENV MIX_ENV=prod
|
|
|
|
|
2022-11-28 18:37:36 +00:00
|
|
|
RUN echo "http://nl.alpinelinux.org/alpine/latest-stable/main" >> /etc/apk/repositories \
|
2021-10-15 16:14:30 +00:00
|
|
|
&& apk update \
|
|
|
|
&& apk add git gcc g++ musl-dev make cmake file-dev \
|
|
|
|
exiftool imagemagick libmagic ncurses postgresql-client ffmpeg
|
2018-08-25 16:28:19 +00:00
|
|
|
|
|
|
|
RUN addgroup -g ${GID} pleroma \
|
2021-10-15 16:14:30 +00:00
|
|
|
&& adduser -h /pleroma -s /bin/false -D -G pleroma -u ${UID} pleroma
|
|
|
|
|
|
|
|
ARG DATA=/var/lib/pleroma
|
|
|
|
RUN mkdir -p /etc/pleroma \
|
|
|
|
&& chown -R pleroma /etc/pleroma \
|
|
|
|
&& mkdir -p ${DATA}/uploads \
|
|
|
|
&& mkdir -p ${DATA}/static \
|
|
|
|
&& chown -R pleroma ${DATA}
|
2018-08-25 16:28:19 +00:00
|
|
|
|
|
|
|
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 \
|
2021-10-15 16:14:30 +00:00
|
|
|
&& git checkout ${PLEROMA_VER}
|
2018-08-25 16:28:19 +00:00
|
|
|
|
2021-10-15 16:14:30 +00:00
|
|
|
RUN echo "import Mix.Config" > config/prod.secret.exs \
|
2018-08-25 16:28:19 +00:00
|
|
|
&& mix local.hex --force \
|
2021-10-15 16:14:30 +00:00
|
|
|
&& mix local.rebar --force \
|
|
|
|
&& mix deps.get --only prod \
|
|
|
|
&& mkdir release \
|
|
|
|
&& mix release --path /pleroma
|
|
|
|
|
|
|
|
COPY ./config.exs /etc/pleroma/config.exs
|
2018-08-25 16:28:19 +00:00
|
|
|
|
2021-10-15 16:14:30 +00:00
|
|
|
EXPOSE 4000
|
2018-08-25 16:28:19 +00:00
|
|
|
|
2022-03-17 14:21:04 +00:00
|
|
|
ENTRYPOINT ["/pleroma/docker-entrypoint.sh"]
|