2023-07-23 05:37:34 +00:00
|
|
|
ARG AKKOMA_COMMIT
|
2023-07-23 03:49:40 +00:00
|
|
|
FROM registry.nrd.li/nrdli/akkoma-base:${AKKOMA_COMMIT}
|
|
|
|
|
|
|
|
ENV PROD_SECRET_FILE=/config/prod.secret.exs
|
|
|
|
|
|
|
|
USER root
|
2023-07-23 18:20:16 +00:00
|
|
|
RUN mkdir -p "$(dirname "${PROD_SECRET_FILE}")" && \
|
|
|
|
touch "${PROD_SECRET_FILE}" && \
|
2023-07-23 18:24:55 +00:00
|
|
|
chown -R 1000:1000 "$(dirname "${PROD_SECRET_FILE}")" && \
|
2023-07-23 18:48:45 +00:00
|
|
|
rm -rf /opt/akkoma && \
|
|
|
|
cd /opt && \
|
|
|
|
git clone https://akkoma.dev/AkkomaGang/akkoma.git akkoma && \
|
|
|
|
chown -R akkoma: /opt/akkoma
|
2023-07-23 18:20:16 +00:00
|
|
|
|
|
|
|
ADD --chown=akkoma:akkoma prod.exs /opt/akkoma/config/prod.exs
|
|
|
|
|
2023-07-23 18:48:45 +00:00
|
|
|
USER akkoma
|
|
|
|
WORKDIR /opt/akkoma
|
|
|
|
RUN git fetch --all && git checkout "${AKKOMA_COMMIT}"
|
2023-07-23 18:20:16 +00:00
|
|
|
RUN mix deps.get
|
|
|
|
RUN mix compile
|
2023-07-23 17:53:07 +00:00
|
|
|
RUN mix pleroma.frontend install pleroma-fe --ref stable
|
|
|
|
RUN mix pleroma.frontend install admin-fe --ref stable
|