2023-07-23 22:08:01 +00:00
|
|
|
ARG AKKOMA_COMMIT
|
|
|
|
FROM registry.nrd.li/nrdli/akkoma-base:${AKKOMA_COMMIT}
|
|
|
|
|
|
|
|
ENV PROD_SECRET_FILE=/config/prod.secret.exs
|
|
|
|
|
|
|
|
USER root
|
|
|
|
WORKDIR /
|
|
|
|
RUN mkdir -p "$(dirname "${PROD_SECRET_FILE}")" && \
|
|
|
|
chown -R 1000:1000 "$(dirname "${PROD_SECRET_FILE}")" && \
|
|
|
|
rm -rf /opt/akkoma
|
|
|
|
|
|
|
|
USER akkoma
|
|
|
|
ADD --chown=akkoma:akkoma prod.secret.exs ${PROD_SECRET_FILE}
|
|
|
|
ADD --chown=akkoma:akkoma akkoma /opt/akkoma
|
|
|
|
ADD --chown=akkoma:akkoma static /opt/akkoma-static
|
|
|
|
|
|
|
|
WORKDIR /opt/akkoma
|
|
|
|
RUN mix local.hex --force && mix local.rebar --force
|
|
|
|
RUN mix deps.get
|
|
|
|
RUN mix compile
|
|
|
|
RUN mix pleroma.frontend install pleroma-fe --ref stable
|
|
|
|
RUN mix pleroma.frontend install admin-fe --ref stable
|