mirror of
https://git.cloudron.io/cloudron/mastodon-app.git
synced 2024-11-22 07:41:00 +00:00
Dockerfile tidying up
This commit is contained in:
parent
d7dcfc832d
commit
f9869d4b3d
1 changed files with 6 additions and 13 deletions
19
Dockerfile
19
Dockerfile
|
@ -1,11 +1,5 @@
|
||||||
ARG MASTODON_VERSION=4.3.0
|
|
||||||
ARG MASTODON_VERSION_PRERELEASE=""
|
|
||||||
ARG MASTODON_VERSION_METADATA=""
|
|
||||||
|
|
||||||
FROM cloudron/base:4.2.0@sha256:46da2fffb36353ef714f97ae8e962bd2c212ca091108d768ba473078319a47f4 as build
|
FROM cloudron/base:4.2.0@sha256:46da2fffb36353ef714f97ae8e962bd2c212ca091108d768ba473078319a47f4 as build
|
||||||
|
|
||||||
ARG MASTODON_VERSION
|
|
||||||
|
|
||||||
RUN mkdir -p /app/code /app/pkg
|
RUN mkdir -p /app/code /app/pkg
|
||||||
WORKDIR /app/code
|
WORKDIR /app/code
|
||||||
|
|
||||||
|
@ -177,16 +171,17 @@ RUN ./configure \
|
||||||
|
|
||||||
FROM build
|
FROM build
|
||||||
|
|
||||||
|
# renovate: datasource=github-releases depName=tootsuite/mastodon versioning=semver extractVersion=^v(?<version>.+)$
|
||||||
|
ARG MASTODON_VERSION=4.3.0
|
||||||
|
ARG MASTODON_VERSION_PRERELEASE=""
|
||||||
|
ARG MASTODON_VERSION_METADATA=""
|
||||||
|
|
||||||
ENV RAILS_ENV production
|
ENV RAILS_ENV production
|
||||||
ENV NODE_ENV production
|
ENV NODE_ENV production
|
||||||
ARG RAILS_SERVE_STATIC_FILES="true"
|
ARG RAILS_SERVE_STATIC_FILES="true"
|
||||||
ARG RUBY_YJIT_ENABLE="1"
|
ARG RUBY_YJIT_ENABLE="1"
|
||||||
|
|
||||||
ENV \
|
ENV \
|
||||||
MASTODON_VERSION=${MASTODON_VERSION} \
|
|
||||||
# Apply Mastodon version information
|
|
||||||
MASTODON_VERSION_PRERELEASE="${MASTODON_VERSION_PRERELEASE}" \
|
|
||||||
MASTODON_VERSION_METADATA="${MASTODON_VERSION_METADATA}" \
|
|
||||||
# Apply Mastodon static files and YJIT options
|
# Apply Mastodon static files and YJIT options
|
||||||
RAILS_SERVE_STATIC_FILES=${RAILS_SERVE_STATIC_FILES} \
|
RAILS_SERVE_STATIC_FILES=${RAILS_SERVE_STATIC_FILES} \
|
||||||
RUBY_YJIT_ENABLE=${RUBY_YJIT_ENABLE} \
|
RUBY_YJIT_ENABLE=${RUBY_YJIT_ENABLE} \
|
||||||
|
@ -211,7 +206,6 @@ RUN ldconfig && \
|
||||||
ffmpeg -version && \
|
ffmpeg -version && \
|
||||||
ffprobe -version
|
ffprobe -version
|
||||||
|
|
||||||
# renovate: datasource=github-releases depName=tootsuite/mastodon versioning=semver extractVersion=^v(?<version>.+)$
|
|
||||||
RUN curl -L https://github.com/tootsuite/mastodon/archive/v${MASTODON_VERSION}.tar.gz | tar -xz --strip-components 1 -f - && \
|
RUN curl -L https://github.com/tootsuite/mastodon/archive/v${MASTODON_VERSION}.tar.gz | tar -xz --strip-components 1 -f - && \
|
||||||
bundle config --local set deployment 'true' && \
|
bundle config --local set deployment 'true' && \
|
||||||
bundle config --local set without 'development test' && \
|
bundle config --local set without 'development test' && \
|
||||||
|
@ -223,7 +217,7 @@ RUN curl -L https://github.com/tootsuite/mastodon/archive/v${MASTODON_VERSION}.t
|
||||||
RUN corepack enable && \
|
RUN corepack enable && \
|
||||||
corepack prepare --activate
|
corepack prepare --activate
|
||||||
|
|
||||||
RUN yarn workspaces focus --production @mastodon/mastodon;
|
RUN yarn workspaces focus --production @mastodon/mastodon
|
||||||
RUN yarn install
|
RUN yarn install
|
||||||
|
|
||||||
# Use Ruby on Rails to create Mastodon assets
|
# Use Ruby on Rails to create Mastodon assets
|
||||||
|
@ -258,4 +252,3 @@ RUN ln -fs /app/data/system /app/code/public/system
|
||||||
COPY start.sh cleanup.sh config.sh env.template cache-env.sh.template /app/pkg/
|
COPY start.sh cleanup.sh config.sh env.template cache-env.sh.template /app/pkg/
|
||||||
|
|
||||||
CMD [ "/app/pkg/start.sh" ]
|
CMD [ "/app/pkg/start.sh" ]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue