diff --git a/.dockerignore b/.dockerignore index 7892e503..21d1f59a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,3 +5,4 @@ public/assets node_modules storybook neo4j +vendor/bundle diff --git a/.slugignore b/.slugignore index cbf0615e..b0141b0e 100644 --- a/.slugignore +++ b/.slugignore @@ -1,2 +1,5 @@ node_modules/ .cache/ +docs/ +spec/ +storybook/ diff --git a/Dockerfile b/Dockerfile index bcc91134..f5eb0889 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ ENV RAILS_ENV=production \ WORKDIR /mastodon -COPY . /mastodon +COPY Gemfile Gemfile.lock package.json yarn.lock /mastodon/ RUN BUILD_DEPS=" \ postgresql-dev \ @@ -28,4 +28,6 @@ RUN BUILD_DEPS=" \ && apk del $BUILD_DEPS \ && rm -rf /tmp/* /var/cache/apk/* +COPY . /mastodon + VOLUME /mastodon/public/system /mastodon/public/assets diff --git a/app/services/fan_out_on_write_service.rb b/app/services/fan_out_on_write_service.rb index a25c20c9..19eedc0a 100644 --- a/app/services/fan_out_on_write_service.rb +++ b/app/services/fan_out_on_write_service.rb @@ -58,15 +58,15 @@ class FanOutOnWriteService < BaseService Rails.logger.debug "Delivering status #{status.id} to hashtags" status.tags.pluck(:name).each do |hashtag| - Redis.current.publish("hashtag:#{hashtag}", @payload) - Redis.current.publish("hashtag:#{hashtag}:local", @payload) if status.local? + Redis.current.publish("timeline:hashtag:#{hashtag}", @payload) + Redis.current.publish("timeline:hashtag:#{hashtag}:local", @payload) if status.local? end end def deliver_to_public(status) Rails.logger.debug "Delivering status #{status.id} to public timeline" - Redis.current.publish('public', @payload) - Redis.current.publish('public:local', @payload) if status.local? + Redis.current.publish('timeline:public', @payload) + Redis.current.publish('timeline:public:local', @payload) if status.local? end end diff --git a/app/services/remove_status_service.rb b/app/services/remove_status_service.rb index 60ce9987..50bb7fc9 100644 --- a/app/services/remove_status_service.rb +++ b/app/services/remove_status_service.rb @@ -70,14 +70,14 @@ class RemoveStatusService < BaseService def remove_from_hashtags(status) status.tags.pluck(:name) do |hashtag| - Redis.current.publish("hashtag:#{hashtag}", @payload) - Redis.current.publish("hashtag:#{hashtag}:local", @payload) if status.local? + Redis.current.publish("timeline:hashtag:#{hashtag}", @payload) + Redis.current.publish("timeline:hashtag:#{hashtag}:local", @payload) if status.local? end end def remove_from_public(status) - Redis.current.publish('public', @payload) - Redis.current.publish('public:local', @payload) if status.local? + Redis.current.publish('timeline:public', @payload) + Redis.current.publish('timeline:public:local', @payload) if status.local? end def redis diff --git a/app/workers/import_worker.rb b/app/workers/import_worker.rb index 7cf29fb5..d5a33cad 100644 --- a/app/workers/import_worker.rb +++ b/app/workers/import_worker.rb @@ -46,7 +46,7 @@ class ImportWorker begin FollowService.new.call(from_account, row[0]) - rescue Goldfinger::Error, HTTP::Error, OpenSSL::SSL::SSLError + rescue Mastodon::NotPermittedError, ActiveRecord::RecordNotFound, Goldfinger::Error, HTTP::Error, OpenSSL::SSL::SSLError next end end diff --git a/docs/Running-Mastodon/Scalingo-guide.md b/docs/Running-Mastodon/Scalingo-guide.md index 6552056a..9329f753 100644 --- a/docs/Running-Mastodon/Scalingo-guide.md +++ b/docs/Running-Mastodon/Scalingo-guide.md @@ -8,6 +8,6 @@ Scalingo guide * You can use a .scalingo.io domain, which will be simple to set up, or you can use a custom domain. * You will want Amazon S3 for file storage. The only exception is for development purposes, where you may not care if files are not saved. Follow a guide online for creating a free Amazon S3 bucket and Access Key, then enter the details. * If you want your Mastodon to be able to send emails, configure SMTP settings here (or later). Consider using [Mailgun](https://mailgun.com) or similar, who offer free plans that should suit your interests. -3. Deploy! The app should be set up, with a working web interface and database. You can change settings and manage versions from the Heroku dashboard. +3. Deploy! The app should be set up, with a working web interface and database. You can change settings and manage versions from the Scalingo dashboard. -You may need to use the `scalingo` CLI application to run `USERNAME=yourUsername rails mastodon:make_admin` to make yourself an admin. +To make yourself an admin, you can use the `scalingo` CLI: `scalingo run -e USERNAME=yourusername rails mastodon:make_admin`. diff --git a/docs/Running-Mastodon/Vagrant-guide.md b/docs/Running-Mastodon/Vagrant-guide.md index b24f14e8..83a89240 100644 --- a/docs/Running-Mastodon/Vagrant-guide.md +++ b/docs/Running-Mastodon/Vagrant-guide.md @@ -17,6 +17,8 @@ To create and provision a new virtual machine for Mastodon development: cd mastodon vagrant up +**Note:** On Linux hosts, you will need to [enable NFS support](https://www.vagrantup.com/docs/synced-folders/nfs.html). + Running `vagrant up` for the first time will run provisioning, which will: - Download the Ubuntu 14.04 base image, if there isn't already a copy on your machine @@ -61,4 +63,4 @@ To run the `rspec` tests and `rubocop` style checker, you may either: ## Support/help -If you are confused, or having any issues with the above, the Mastodon IRC channel ( irc.freenode.net #mastodon ) is a good place to find assistance. \ No newline at end of file +If you are confused, or having any issues with the above, the Mastodon IRC channel ( irc.freenode.net #mastodon ) is a good place to find assistance. diff --git a/scalingo.json b/scalingo.json index 84b690e2..d60f1529 100644 --- a/scalingo.json +++ b/scalingo.json @@ -1,7 +1,7 @@ { "name": "Mastodon", "description": "A GNU Social-compatible microblogging server", - "repository": "https://github.com/johnsudaar/mastodon", + "repository": "https://github.com/tootsuite/mastodon", "logo": "https://github.com/tootsuite/mastodon/raw/master/app/assets/images/logo.png", "env": { "LOCAL_DOMAIN": {