Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Goat/upstream #11

Merged
merged 123 commits into from
Nov 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
e9e4938
Fix casing and spacing of words (#20504)
helloworldstack Nov 13, 2022
cf77d93
Fix saving server registration settings redirecting to branding setti…
ClearlyClaire Nov 13, 2022
290d78c
Allow unsetting x-amz-acl S3 Permission headers (#20510)
davidmhewitt Nov 13, 2022
cf36ee9
New Crowdin updates (#20476)
Gargron Nov 13, 2022
1af4826
Copied Spaces support from packer .rake (#20573)
v-aisac Nov 13, 2022
3d3bd34
Fix announcement dates not being validated client-side (#20577)
ClearlyClaire Nov 13, 2022
cd5e98d
Fix public/local timeline posts not being properly filtered (#20567)
ClearlyClaire Nov 13, 2022
a6186da
Clean up GitHub sourced gem entry (#20542)
larouxn Nov 13, 2022
bd806a3
Update fix-duplicates (#20502)
ClearlyClaire Nov 13, 2022
c223153
Test blank account field verifiability (#20458)
emilyst Nov 13, 2022
e62b514
Stick batch table toolbar to the top (#20442)
sk22 Nov 13, 2022
82c6633
Helm: support statsd publishing (#20455)
deepy Nov 13, 2022
ad66bbe
Add the option to configure external postgresql port (#20370)
WyriHaximus Nov 13, 2022
0722908
Change in-app links to keep you in-app (#20540)
trwnh Nov 13, 2022
87fbd08
helm: Add helm chart tests (#20394)
consideRatio Nov 13, 2022
24b2c60
Fix icons having an image role (#20600)
Gargron Nov 13, 2022
d0b7bd4
Fix wrong cut-off point for "Read more" in web UI (#20599)
Gargron Nov 13, 2022
9d03920
Add `Cache-Control` header to openstack-stored files (#20610)
TheBlueMatt Nov 14, 2022
147d8bd
Support UTF-8 Characters in Domains During CSV Import (#20592)
HamptonMakes Nov 14, 2022
6da9df7
Fix dropdown menu on profiles not being accessible on narrow screens …
Gargron Nov 14, 2022
2e2ba39
Fix rules with same priority being sorted non-deterministically (#20623)
Gargron Nov 14, 2022
167d86d
Fix `role_ids` not accepting arrays in admin API (#20625)
Gargron Nov 14, 2022
5c826c4
Fix image type not being set after conversion for convertible image t…
Gargron Nov 14, 2022
b31afc6
Fix error when passing unknown filter param in REST API (#20626)
Gargron Nov 14, 2022
523e106
Fix style of username in navigation bar above compose form in web UI …
Gargron Nov 14, 2022
552d69a
Fix error when invalid domain name is submitted (#19474)
Gargron Nov 14, 2022
1e83092
Update AUTHORS.md (#20630)
Gargron Nov 14, 2022
457c37e
Fix index name in fix-duplicates task (#20632)
ClearlyClaire Nov 14, 2022
b59ce0a
Move V2 Filter methods under /api/v2 prefix (#20622)
trwnh Nov 14, 2022
32c70d2
Merge branch 'main' into glitch-soc/merge-upstream
ClearlyClaire Nov 14, 2022
75299a0
Bump version to 4.0.0rc4 (#20634)
Gargron Nov 14, 2022
cd713ca
Merge branch 'main' into glitch-soc/merge-upstream
ClearlyClaire Nov 14, 2022
9fd866f
[Glitch] Stick batch table toolbar to the top
sk22 Nov 13, 2022
9db90d2
[Glitch] Fix dropdown menu on profiles not being accessible on narrow…
Gargron Nov 14, 2022
c31e756
[Glitch] Move V2 Filter methods under /api/v2 prefix
trwnh Nov 14, 2022
7233569
Merge pull request #1923 from ClearlyClaire/glitch-soc/merge-upstream
ClearlyClaire Nov 14, 2022
2d54986
Fix media metadata being only editable once (#20665)
ClearlyClaire Nov 14, 2022
9ab4e3f
Merge branch 'main' into glitch-soc/merge-upstream
ClearlyClaire Nov 14, 2022
96c1ef6
[Glitch] Fix media metadata being only editable once
ClearlyClaire Nov 14, 2022
a34aa2a
Merge pull request #1927 from ClearlyClaire/glitch-soc/merge-upstream
ClearlyClaire Nov 14, 2022
625e086
Fix emoji substitution not applying only to text nodes in Web UI (#20…
ClearlyClaire Nov 14, 2022
71c92d3
Fix emoji substitution not applying only to text nodes in backend cod…
ClearlyClaire Nov 14, 2022
21fd25a
Fix rate limiting for paths with formats (#20675)
Gargron Nov 14, 2022
fb389bd
Bump version to 4.0.0 (#20636)
Gargron Nov 14, 2022
767630b
Merge branch 'main' into glitch-soc/merge-upstream
ClearlyClaire Nov 14, 2022
71982e5
[Glitch] Fix emoji substitution not applying only to text nodes in We…
ClearlyClaire Nov 9, 2022
7a8cd0c
Merge pull request #1928 from ClearlyClaire/glitch-soc/merge-upstream
ClearlyClaire Nov 14, 2022
ccbca50
Fix nodes order being sometimes mangled when rewriting emoji (#20677)
ClearlyClaire Nov 14, 2022
4415dd6
Bump version to 4.0.1 (#20696)
Gargron Nov 14, 2022
b5698af
Merge branch 'main' into glitch-soc/merge-upstream
ClearlyClaire Nov 14, 2022
8aa56ae
[Glitch] Fix nodes order being sometimes mangled when rewriting emoji
ClearlyClaire Nov 14, 2022
e589afa
Merge pull request #1929 from ClearlyClaire/glitch-soc/merge-upstream
ClearlyClaire Nov 14, 2022
ceafd1f
Fix infinite loop when system emoji font is enabled (#1931)
ClearlyClaire Nov 14, 2022
8c3c6dc
Fix filters from other users being used in the streaming service (#20…
ClearlyClaire Nov 15, 2022
66461ae
Merge branch 'main' into glitch-soc/merge-upstream
ClearlyClaire Nov 15, 2022
eb675af
Merge pull request #1932 from ClearlyClaire/glitch-soc/merge-upstream
ClearlyClaire Nov 15, 2022
17bd9a8
Fix wrong color on mentions hidden behind content warning in web UI (…
Gargron Nov 15, 2022
b59683c
Bump nokogiri from 1.13.8 to 1.13.9 (#20041)
dependabot[bot] Nov 15, 2022
b46b7c3
Use "unsafe-wasm-eval" instead of "unsafe-eval" in script-src CSP (#2…
prplecake Nov 15, 2022
43b0b2f
Fix wrong directive `unsafe-wasm-eval` to `wasm-unsafe-eval` (#20729)
Gargron Nov 15, 2022
03b0f3a
Bump version to 4.0.2 (#20725)
Gargron Nov 15, 2022
a1738f8
New Crowdin updates (#20580)
Gargron Nov 15, 2022
66a22ab
Bump promise.prototype.finally from 3.1.3 to 3.1.4 (#20050)
dependabot[bot] Nov 15, 2022
3b82d1e
Bump reselect from 4.1.6 to 4.1.7 (#20052)
dependabot[bot] Nov 15, 2022
61264e5
Bump memory_profiler from 1.0.0 to 1.0.1 (#20054)
dependabot[bot] Nov 15, 2022
c76f29a
Bump tzinfo-data from 1.2022.4 to 1.2022.6 (#20056)
dependabot[bot] Nov 15, 2022
fc44521
Bump json-ld-preloaded from 3.2.0 to 3.2.2 (#20058)
dependabot[bot] Nov 15, 2022
4ef4db2
Bump loader-utils from 1.4.0 to 1.4.1 (#20085)
dependabot[bot] Nov 15, 2022
3301aad
Bump redux-thunk from 2.4.1 to 2.4.2 (#20060)
dependabot[bot] Nov 15, 2022
9f95c41
Bump yargs from 17.6.0 to 17.6.2 (#20063)
dependabot[bot] Nov 15, 2022
dba1645
Bump postcss from 8.4.18 to 8.4.19 (#20684)
dependabot[bot] Nov 15, 2022
ca61066
Bump array-includes from 3.1.5 to 3.1.6 (#20680)
dependabot[bot] Nov 15, 2022
dd360e6
Bump blurhash from 2.0.3 to 2.0.4 (#19601)
dependabot[bot] Nov 15, 2022
acbf4d0
Bump jsdom from 20.0.1 to 20.0.2 (#19603)
dependabot[bot] Nov 15, 2022
f32c2de
Bump pg from 1.4.3 to 1.4.4 (#19597)
dependabot[bot] Nov 15, 2022
dde60e2
Bump object.values from 1.1.5 to 1.1.6 (#20047)
dependabot[bot] Nov 15, 2022
575bf3f
Bump oj from 3.13.21 to 3.13.23 (#20046)
dependabot[bot] Nov 15, 2022
f7d261c
Bump sidekiq from 6.5.7 to 6.5.8 (#20035)
dependabot[bot] Nov 15, 2022
ac7a29f
Bump loader-utils from 1.4.1 to 1.4.2 (#20826)
dependabot[bot] Nov 16, 2022
4d85c27
Add 'private' to Cache-Control, match Rails expectations (#20608)
daxtens Nov 16, 2022
1901829
Merge branch 'main' into glitch-soc/merge-upstream
ClearlyClaire Nov 16, 2022
7efe2cf
Modify image build workflow for Glitch workflows (#1942)
ineffyble Nov 16, 2022
ad84fd2
Merge pull request #1941 from ClearlyClaire/glitch-soc/merge-upstream
ClearlyClaire Nov 16, 2022
f890fdc
Bump Helm app version to 4.0.2 (#20697)
ineffyble Nov 16, 2022
8c56441
Add form-action CSP directive (#1948)
ClearlyClaire Nov 16, 2022
23ea0e7
Add aria-label and title attributes to local settings navigation item…
ClearlyClaire Nov 16, 2022
aaca78d
Fix safari explore disappearing tabs (#20917)
nyura123dev Nov 17, 2022
a2931d1
Add missing admin scopes (fix #20892) (#20918)
trwnh Nov 17, 2022
413481f
Add maskable icon support for Android (#20904)
workeffortwaste Nov 17, 2022
0cc7726
Change batch account suspension to create a strike (#20897)
ClearlyClaire Nov 17, 2022
642870c
Bump Helm chart version to account for mastodon 4 (#20886)
deepy Nov 17, 2022
654d348
Make the button that expands the publish form differentiable from the…
Tak Nov 17, 2022
e1f819f
Fix pagination of followed tags (#20861)
trwnh Nov 17, 2022
eb80789
Fix misleading wording about waitlists (#20850)
ClearlyClaire Nov 17, 2022
7955d4b
Add form-action CSP directive (#20781)
ClearlyClaire Nov 17, 2022
00b2720
Change automatic post deletion configuration to be accessible to redi…
ClearlyClaire Nov 17, 2022
72618eb
Fix getting a single EmailDomainBlock (#20846)
trwnh Nov 17, 2022
7fdeed5
Make tag following idempotent (#20860)
trwnh Nov 17, 2022
cbb0153
Fix invalid/empty RSS feed link on account pages (#20772)
ClearlyClaire Nov 17, 2022
daf6f34
Handle links with no href in VerifyLinkService (#20741)
joshuap Nov 17, 2022
92734e3
Use buildx functions for faster build (#20692)
inductor Nov 17, 2022
e7deea6
Remove last references to "silencing" in UI text (#20637)
cincodenada Nov 17, 2022
c373148
Support for import/export of instance-level domain blocks/allows for …
lenoregilbert Nov 17, 2022
4f15fd0
Fix style for hashes (#20518)
AreaZR Nov 17, 2022
585cc1a
Remove use of DOMParser in front-end emoji rewriting code (#20758)
ClearlyClaire Nov 17, 2022
ab7d99e
Fix various issues with domain block import (#1944)
ClearlyClaire Nov 17, 2022
aec61a7
Merge branch 'main' into glitch-soc/merge-upstream
ClearlyClaire Nov 17, 2022
5ef92df
Remove glitch-soc-specific translations of upstreamed feature (domain…
ClearlyClaire Nov 17, 2022
1b5ed32
Split off Dockerfile components for faster build times (#20933)
moritzheiber Nov 17, 2022
87929ad
[Glitch] Fix safari explore disappearing tabs
nyura123dev Nov 17, 2022
4b449ff
[Glitch] Make the button that expands the publish form differentiable…
Tak Nov 17, 2022
c22f3a8
[Glitch] Remove use of DOMParser in front-end emoji rewriting code
ClearlyClaire Nov 17, 2022
381137c
Merge pull request #1951 from ClearlyClaire/glitch-soc/merge-upstream
ClearlyClaire Nov 17, 2022
0a78631
New Crowdin updates (#20759)
Gargron Nov 17, 2022
231e3ec
Remove blank line from start of Dockerfile breaking syntax declaratio…
ineffyble Nov 17, 2022
4ae97a2
Fix OAuth flow being broken by recent CSP change (#20958)
ClearlyClaire Nov 17, 2022
367db82
Merge branch 'main' into glitch-soc/merge-upstream
ClearlyClaire Nov 17, 2022
f233b5e
Merge pull request #1954 from ClearlyClaire/glitch-soc/merge-upstream
ClearlyClaire Nov 17, 2022
48e1366
Fix form-action CSP directive for external login (#20962)
ClearlyClaire Nov 17, 2022
597a783
Merge branch 'main' into glitch-soc/merge-upstream
ClearlyClaire Nov 18, 2022
e0e7a09
Merge pull request #1955 from ClearlyClaire/glitch-soc/merge-upstream
ClearlyClaire Nov 18, 2022
26dae3e
baps
vitunvuohi Nov 19, 2022
a8b62a2
Merge remote-tracking branch 'glitch-soc/main' into goat/upstream
vitunvuohi Nov 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
branches:
- 'main'
tags:
- '*'
pull_request:
paths:
- .github/workflows/build-image.yml
Expand All @@ -31,18 +29,16 @@ jobs:
id: meta
with:
images: ghcr.io/${{ github.repository_owner }}/mastodon
flavor: |
latest=auto
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=edge,branch=main
type=pep440,pattern={{raw}}
type=pep440,pattern=v{{major}}.{{minor}}
type=ref,event=pr
type=sha,prefix=,format=long
- uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
builder: ${{ steps.buildx.outputs.name }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/mastodon:edge
cache-to: type=inline
cache-from: type=gha
cache-to: type=gha,mode=max
4 changes: 4 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ Style/HashTransformKeys:
Style/HashTransformValues:
Enabled: false

Style/HashSyntax:
Enabled: true
EnforcedStyle: ruby19_no_mixed_keys

Style/IfUnlessModifier:
Enabled: false

Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ Changelog

All notable changes to this project will be documented in this file.

## [4.0.2] - 2022-11-15
### Fixed

- Fix wrong color on mentions hidden behind content warning in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/20724))
- Fix filters from other users being used in the streaming service ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20719))
- Fix `unsafe-eval` being used when `wasm-unsafe-eval` is enough in Content Security Policy ([Gargron](https://github.com/mastodon/mastodon/pull/20729), [prplecake](https://github.com/mastodon/mastodon/pull/20606))

## [4.0.1] - 2022-11-14
### Fixed

Expand Down Expand Up @@ -2054,7 +2061,7 @@ Some of the features in this release have been funded through the [NGI0 Discover

### Removed

- Remove zopfli compression to speed up Webpack from 6min to 1min ([nolanlawson](https://github.com/mastodon/mastodon/pull/10288))
- Remove zopfli compression to speed up Webpack from 6min to 1min ([nolanlawson](https://github.com/mastodon/mastodon/pull/10288))>>>
- Remove stats.json generation to speed up Webpack ([nolanlawson](https://github.com/mastodon/mastodon/pull/10290))

### Fixed
Expand Down
178 changes: 76 additions & 102 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,121 +1,95 @@
FROM ubuntu:20.04 as build-dep

# Use bash for the shell
SHELL ["/bin/bash", "-c"]
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections

# Install Node v16 (LTS)
ENV NODE_VER="16.17.1"
RUN ARCH= && \
dpkgArch="$(dpkg --print-architecture)" && \
case "${dpkgArch##*-}" in \
amd64) ARCH='x64';; \
ppc64el) ARCH='ppc64le';; \
s390x) ARCH='s390x';; \
arm64) ARCH='arm64';; \
armhf) ARCH='armv7l';; \
i386) ARCH='x86';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac && \
echo "Etc/UTC" > /etc/localtime && \
apt-get update && \
apt-get install -y --no-install-recommends ca-certificates wget python3 apt-utils && \
cd ~ && \
wget -q https://nodejs.org/download/release/v$NODE_VER/node-v$NODE_VER-linux-$ARCH.tar.gz && \
tar xf node-v$NODE_VER-linux-$ARCH.tar.gz && \
rm node-v$NODE_VER-linux-$ARCH.tar.gz && \
mv node-v$NODE_VER-linux-$ARCH /opt/node

# Install Ruby 3.0
ENV RUBY_VER="3.0.4"
RUN apt-get update && \
apt-get install -y --no-install-recommends build-essential \
bison libyaml-dev libgdbm-dev libreadline-dev libjemalloc-dev \
libncurses5-dev libffi-dev zlib1g-dev libssl-dev && \
cd ~ && \
wget https://cache.ruby-lang.org/pub/ruby/${RUBY_VER%.*}/ruby-$RUBY_VER.tar.gz && \
tar xf ruby-$RUBY_VER.tar.gz && \
cd ruby-$RUBY_VER && \
./configure --prefix=/opt/ruby \
--with-jemalloc \
--with-shared \
--disable-install-doc && \
make -j"$(nproc)" > /dev/null && \
make install && \
rm -rf ../ruby-$RUBY_VER.tar.gz ../ruby-$RUBY_VER

ENV PATH="${PATH}:/opt/ruby/bin:/opt/node/bin"

RUN npm install -g npm@latest && \
npm install -g yarn && \
gem install bundler && \
apt-get update && \
apt-get install -y --no-install-recommends git libicu-dev libidn11-dev \
libpq-dev shared-mime-info
# syntax=docker/dockerfile:1.4
# This needs to be bullseye-slim because the Ruby image is built on bullseye-slim
ARG NODE_VERSION="16.17.1-bullseye-slim"

COPY Gemfile* package.json yarn.lock /opt/mastodon/
FROM ghcr.io/moritzheiber/ruby-jemalloc:3.0.4-slim as ruby
FROM node:${NODE_VERSION} as build

COPY --link --from=ruby /opt/ruby /opt/ruby

RUN cd /opt/mastodon && \
bundle config set --local deployment 'true' && \
bundle config set --local without 'development test' && \
bundle config set silence_root_warning true && \
bundle install -j"$(nproc)" && \
yarn install --pure-lockfile
ENV DEBIAN_FRONTEND="noninteractive" \
PATH="${PATH}:/opt/ruby/bin"

FROM ubuntu:20.04
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Copy over all the langs needed for runtime
COPY --from=build-dep /opt/node /opt/node
COPY --from=build-dep /opt/ruby /opt/ruby
WORKDIR /opt/mastodon
COPY Gemfile* package.json yarn.lock /opt/mastodon/

# Add more PATHs to the PATH
ENV PATH="${PATH}:/opt/ruby/bin:/opt/node/bin:/opt/mastodon/bin"
RUN apt update && \
apt-get install -y --no-install-recommends build-essential \
ca-certificates \
git \
libicu-dev \
libidn11-dev \
libpq-dev \
libjemalloc-dev \
zlib1g-dev \
libgdbm-dev \
libgmp-dev \
libssl-dev \
libyaml-0-2 \
ca-certificates \
libreadline8 \
python3 \
shared-mime-info && \
bundle config set --local deployment 'true' && \
bundle config set --local without 'development test' && \
bundle config set silence_root_warning true && \
bundle install -j"$(nproc)" && \
yarn install --pure-lockfile

FROM node:${NODE_VERSION}

ARG UID="991"
ARG GID="991"

COPY --link --from=ruby /opt/ruby /opt/ruby

# Create the mastodon user
ARG UID=991
ARG GID=991
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

ENV DEBIAN_FRONTEND="noninteractive" \
PATH="${PATH}:/opt/ruby/bin:/opt/mastodon/bin"

RUN apt-get update && \
echo "Etc/UTC" > /etc/localtime && \
apt-get install -y --no-install-recommends whois wget && \
addgroup --gid $GID mastodon && \
useradd -m -u $UID -g $GID -d /opt/mastodon mastodon && \
echo "mastodon:$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 24 | mkpasswd -s -m sha-256)" | chpasswd && \
rm -rf /var/lib/apt/lists/*

# Install mastodon runtime deps
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
RUN apt-get update && \
apt-get -y --no-install-recommends install \
libssl1.1 libpq5 imagemagick ffmpeg libjemalloc2 \
libicu66 libidn11 libyaml-0-2 \
file ca-certificates tzdata libreadline8 gcc tini apt-utils && \
ln -s /opt/mastodon /mastodon && \
gem install bundler && \
rm -rf /var/cache && \
rm -rf /var/lib/apt/lists/*

# Copy over mastodon source, and dependencies from building, and set permissions
COPY --chown=mastodon:mastodon . /opt/mastodon
COPY --from=build-dep --chown=mastodon:mastodon /opt/mastodon /opt/mastodon
echo "Etc/UTC" > /etc/localtime && \
groupadd -g "${GID}" mastodon && \
useradd -u "$UID" -g "${GID}" -m -d /opt/mastodon mastodon && \
apt-get -y --no-install-recommends install whois \
wget \
libssl1.1 \
libpq5 \
imagemagick \
ffmpeg \
libjemalloc2 \
libicu67 \
libidn11 \
libyaml-0-2 \
file \
ca-certificates \
tzdata \
libreadline8 \
tini && \
ln -s /opt/mastodon /mastodon

# Note: no, cleaning here since Debian does this automatically
# See the file /etc/apt/apt.conf.d/docker-clean within the Docker image's filesystem

# Run mastodon services in prod mode
ENV RAILS_ENV="production"
ENV NODE_ENV="production"
COPY --chown=mastodon:mastodon . /opt/mastodon
COPY --chown=mastodon:mastodon --from=build /opt/mastodon /opt/mastodon

# Tell rails to serve static files
ENV RAILS_SERVE_STATIC_FILES="true"
ENV BIND="0.0.0.0"
ENV RAILS_ENV="production" \
NODE_ENV="production" \
RAILS_SERVE_STATIC_FILES="true" \
BIND="0.0.0.0"

# Set the run user
USER mastodon
WORKDIR /opt/mastodon

# Precompile assets
RUN cd ~ && \
OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder rails assets:precompile && \
yarn cache clean
RUN OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder rails assets:precompile && \
yarn cache clean

# Set the work dir and the container entry point
WORKDIR /opt/mastodon
ENTRYPOINT ["/usr/bin/tini", "--"]
EXPOSE 3000 4000
16 changes: 8 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ GEM
multi_json (~> 1.15)
rack (~> 2.2)
rdf (~> 3.2, >= 3.2.9)
json-ld-preloaded (3.2.0)
json-ld-preloaded (3.2.2)
json-ld (~> 3.2)
rdf (~> 3.2)
jsonapi-renderer (0.2.2)
Expand Down Expand Up @@ -395,7 +395,7 @@ GEM
mario-redis-lock (1.2.1)
redis (>= 3.0.5)
matrix (0.4.2)
memory_profiler (1.0.0)
memory_profiler (1.0.1)
method_source (1.0.0)
microformats (4.4.1)
json (~> 2.2)
Expand All @@ -414,15 +414,15 @@ GEM
net-ssh (>= 2.6.5, < 8.0.0)
net-ssh (7.0.1)
nio4r (2.5.8)
nokogiri (1.13.8)
nokogiri (1.13.9)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
nsa (0.2.8)
activesupport (>= 4.2, < 7)
concurrent-ruby (~> 1.0, >= 1.0.2)
sidekiq (>= 3.5)
statsd-ruby (~> 1.4, >= 1.4.0)
oj (3.13.21)
oj (3.13.23)
omniauth (1.9.2)
hashie (>= 3.4.6)
rack (>= 1.6.2, < 3)
Expand Down Expand Up @@ -457,7 +457,7 @@ GEM
parslet (2.0.0)
pastel (0.8.0)
tty-color (~> 0.5)
pg (1.4.3)
pg (1.4.4)
pghero (2.8.3)
activerecord (>= 5)
pkg-config (1.4.9)
Expand Down Expand Up @@ -611,8 +611,8 @@ GEM
activerecord (>= 4.0.0)
railties (>= 4.0.0)
semantic_range (3.0.0)
sidekiq (6.5.7)
connection_pool (>= 2.2.5)
sidekiq (6.5.8)
connection_pool (>= 2.2.5, < 3)
rack (~> 2.0)
redis (>= 4.5.0, < 5)
sidekiq-bulk (0.2.0)
Expand Down Expand Up @@ -684,7 +684,7 @@ GEM
unf (~> 0.1.0)
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
tzinfo-data (1.2022.4)
tzinfo-data (1.2022.6)
tzinfo (>= 1.0.0)
unf (0.1.4)
unf_ext
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/accounts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ def show
respond_to do |format|
format.html do
expires_in 0, public: true unless user_signed_in?

@rss_url = rss_url
end

format.rss do
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/admin/domain_blocks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ def batch
@form = Form::DomainBlockBatch.new(form_domain_block_batch_params.merge(current_account: current_account, action: action_from_button))
@form.save
rescue ActionController::ParameterMissing
flash[:alert] = I18n.t('admin.email_domain_blocks.no_domain_block_selected')
flash[:alert] = I18n.t('admin.domain_blocks.no_domain_block_selected')
rescue Mastodon::NotPermittedError
flash[:alert] = I18n.t('admin.domain_blocks.created_msg')
flash[:alert] = I18n.t('admin.domain_blocks.not_permitted')
else
redirect_to admin_instances_path(limited: '1'), notice: I18n.t('admin.domain_blocks.created_msg')
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/admin/email_domain_blocks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def batch
rescue ActionController::ParameterMissing
flash[:alert] = I18n.t('admin.email_domain_blocks.no_email_domain_block_selected')
rescue Mastodon::NotPermittedError
flash[:alert] = I18n.t('admin.custom_emojis.not_permitted')
flash[:alert] = I18n.t('admin.email_domain_blocks.not_permitted')
ensure
redirect_to admin_email_domain_blocks_path
end
Expand Down
6 changes: 3 additions & 3 deletions app/controllers/admin/export_domain_allows_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ class ExportDomainAllowsController < BaseController

before_action :set_dummy_import!, only: [:new]

ROWS_PROCESSING_LIMIT = 20_000

def new
authorize :domain_allow, :create?
end
Expand All @@ -23,9 +21,11 @@ def import
authorize :domain_allow, :create?
begin
@import = Admin::Import.new(import_params)
return render :new unless @import.validate

parse_import_data!(export_headers)

@data.take(ROWS_PROCESSING_LIMIT).each do |row|
@data.take(Admin::Import::ROWS_PROCESSING_LIMIT).each do |row|
domain = row['#domain'].strip
next if DomainAllow.allowed?(domain)

Expand Down
Loading