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