Compare commits
2 commits
e6419761f5
...
60e2a918fc
Author | SHA1 | Date | |
---|---|---|---|
60e2a918fc | |||
de82776d28 |
1 changed files with 13 additions and 3 deletions
16
Dockerfile
16
Dockerfile
|
@ -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", "--"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue