diff --git a/Dockerfile b/Dockerfile index 8cc2aac..b367669 100644 --- a/Dockerfile +++ b/Dockerfile @@ -90,8 +90,15 @@ RUN ldconfig && \ ffmpeg -version && \ ffprobe -version -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' && \ +# Download Mastodon source +RUN curl -L https://github.com/tootsuite/mastodon/archive/v${MASTODON_VERSION}.tar.gz | tar -xz --strip-components 1 -f - + +# Apply character limit patch +COPY char-limit.patch /tmp/ +RUN patch -p1 < /tmp/char-limit.patch + +# Install Ruby dependencies +RUN bundle config --local set deployment 'true' && \ bundle config --local set without 'development test' && \ bundle config --local set silence_root_warning true && \ bundle install && \ @@ -100,7 +107,6 @@ RUN curl -L https://github.com/tootsuite/mastodon/archive/v${MASTODON_VERSION}.t RUN corepack enable && \ corepack prepare --activate - RUN yarn workspaces focus --production @mastodon/mastodon RUN yarn install @@ -134,3 +140,4 @@ 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/ CMD [ "/app/pkg/start.sh" ] + diff --git a/char-limit.patch b/char-limit.patch new file mode 100644 index 0000000..c1f9fa1 --- /dev/null +++ b/char-limit.patch @@ -0,0 +1,17 @@ +--- a/app/validators/status_length_validator.rb ++++ b/app/validators/status_length_validator.rb +@@ -3,7 +3,7 @@ + class StatusLengthValidator < ActiveModel::Validator +- MAX_CHARS = 500 ++ MAX_CHARS = 2500 + URL_PLACEHOLDER_CHARS = 23 + URL_PLACEHOLDER = 'x' * 23 + +--- a/app/javascript/mastodon/features/compose/containers/compose_form_container.js ++++ b/app/javascript/mastodon/features/compose/containers/compose_form_container.js +@@ -50,7 +50,7 @@ +- maxChars: state.getIn(['server', 'server', 'configuration', 'statuses', 'max_characters'], 500), ++ maxChars: state.getIn(['server', 'server', 'configuration', 'statuses', 'max_characters'], 2500), + }); + + export default connect(mapStateToProps, mapDispatchToProps)(ComposeForm);