clone git as root

This commit is contained in:
Kegan Myers 2023-07-23 13:48:45 -05:00
parent 8062c75935
commit 187106349a

View file

@ -7,17 +7,16 @@ USER root
RUN mkdir -p "$(dirname "${PROD_SECRET_FILE}")" && \
touch "${PROD_SECRET_FILE}" && \
chown -R 1000:1000 "$(dirname "${PROD_SECRET_FILE}")" && \
rm -rf /opt/akkoma
USER akkoma
WORKDIR /opt
RUN git clone https://akkoma.dev/AkkomaGang/akkoma.git akkoma && \
git fetch --all && \
git checkout "${AKKOMA_COMMIT}"
rm -rf /opt/akkoma && \
cd /opt && \
git clone https://akkoma.dev/AkkomaGang/akkoma.git akkoma && \
chown -R akkoma: /opt/akkoma
ADD --chown=akkoma:akkoma prod.exs /opt/akkoma/config/prod.exs
WORKDIR /opt/akkoma
USER akkoma
WORKDIR /opt/akkoma
RUN git fetch --all && git checkout "${AKKOMA_COMMIT}"
RUN mix deps.get
RUN mix compile
RUN mix pleroma.frontend install pleroma-fe --ref stable