Compare commits

...

2 commits

Author SHA1 Message Date
60e2a918fc Copy from local to assist with caching 2024-02-15 12:20:46 -06:00
de82776d28 Alter package caching to persist 2024-02-15 12:19:16 -06:00

View file

@ -11,7 +11,8 @@ ENV RAILS_ENV="production"
ENV NODE_ENV="production"
# Install build dependencies
RUN apk add --no-cache whois nodejs yarn ca-certificates git bash \
RUN --mount=cache,target=/etc/apk/cache,sharing=locked \
apk add whois nodejs yarn ca-certificates git bash \
gcc g++ make libc-dev file sed \
imagemagick protobuf-dev libpq ffmpeg icu-dev libidn-dev yaml-dev \
readline-dev postgresql-dev curl tini python3 shared-mime-info && \
@ -35,10 +36,14 @@ ARG MASTO_VERSION=unknown
# Install mastodon
USER mastodon
RUN git clone -vvv -b ${GIT_BRANCH} ${GIT_REPOSITORY} /opt/mastodon && \
rm -rf /opt/mastodon/.git
COPY ../mastodon/* /opt/mastodon/
RUN rm -rf /opt/mastodon/.git
USER root
RUN apk -U upgrade
# Install dependencies
USER mastodon
WORKDIR /opt/mastodon
RUN mkdir -p /opt/mastodon/.config/yarn/global && \
touch /opt/mastodon/.config/yarn/global/.yarnclean && \
@ -55,4 +60,9 @@ RUN OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder \
COPY root/ /
COPY sounds/ /opt/mastodon/public/sounds/
# Final ENV setup
ENV RAILS_SERVE_STATIC_FILES="false"
ENV RAILS_ENV="production"
ENV NODE_ENV="production"
ENTRYPOINT ["/sbin/tini", "--"]