Editing Moebooru
From Bibliotheca Anonoma
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 61: | Line 61: | ||
{{ic|libpqxx}} is required for libpq-ruby to build. | {{ic|libpqxx}} is required for libpq-ruby to build. | ||
Now log in and create the moebooru database and user with createdb permissions: (make sure to give it a very good password!) | Now log in and create the moebooru database and user with createdb permissions: (make sure to give it a very good password!) | ||
Line 108: | Line 101: | ||
''For most small sites'', Ruby 2.3 and higher with the Unicorn server is sufficient. | ''For most small sites'', Ruby 2.3 and higher with the Unicorn server is sufficient. | ||
''A site with heavier traffic'' may find it helpful to use Rubinius with the Puma server [https://blog.engineyard.com/2014/ruby-app-server-arena-pt1to make better use of concurrent multithreading,] but this may require compilation | ''A site with heavier traffic'' may find it helpful to use Rubinius with the Puma server [https://blog.engineyard.com/2014/ruby-app-server-arena-pt1to make better use of concurrent multithreading,] but this may require compilation. | ||
=== Method 1: Set up Normal Ruby 2.3 or newer === | === Method 1: Set up Normal Ruby 2.3 or newer === | ||
Line 120: | Line 111: | ||
=== Method 2: Installing Rubinius Binaries with chruby === | === Method 2: Installing Rubinius Binaries with chruby === | ||
Rubinius is particularly tough to compile, and as of 2017-01-28 we have not been able to compile it with Debian Jessie. Instead, [https://rubinius.com/install/ Rubinius provides Ubuntu 14.04 binaries designed for use with Travis-Cl.] | Rubinius is particularly tough to compile, and as of 2017-01-28 we have not been able to compile it with Debian Jessie. Instead, [https://rubinius.com/install/ Rubinius provides Ubuntu 14.04 binaries designed for use with Travis-Cl.] | ||
Line 180: | Line 159: | ||
{{bc| | {{bc| | ||
sudo yum install ruby | sudo yum install ruby | ||
sudo yum install -y patch autoconf patch automake libtool bison sqlite | sudo yum install -y patch autoconf patch automake libtool bison sqlite-devel | ||
}} | }} | ||
Line 352: | Line 331: | ||
https://zonio.net/rubinius_rpm_packages/ | https://zonio.net/rubinius_rpm_packages/ | ||
--> | --> | ||
== Mandatory Access Control == | == Mandatory Access Control == | ||
Line 472: | Line 449: | ||
{{bc|bundle exec rake db:reset}} | {{bc|bundle exec rake db:reset}} | ||
{{Note|Whenever you update moebooru using {{ic|git pull}}, make sure to migrate the database table schema with the command below.}} | {{Note|Whenever you update moebooru using {{ic|git pull}}, make sure to migrate the database table schema with the command below.}} | ||
Line 595: | Line 570: | ||
=== Run the Server === | === Run the Server === | ||
Finally, to run the server | Finally, to run the server (default is port 3000), run one of the following commands: | ||
Ruby: | Ruby: | ||
{{bc|bundle exec unicorn -p | {{bc|bundle exec unicorn -p 3000 -E production}} | ||
Rubinius: | Rubinius: | ||
{{bc|<nowiki>RAILS_ENV=production bundle exec puma -e production | {{bc|<nowiki>RAILS_ENV=production bundle exec puma -e production</nowiki>}} | ||
* [http://stackoverflow.com/a/27318704 Source: StackOverflow - Rails 4: assets not loading in production] | * [http://stackoverflow.com/a/27318704 Source: StackOverflow - Rails 4: assets not loading in production] | ||
Line 695: | Line 670: | ||
{{bc|bundle exec puma -C shared/puma.rb}} | {{bc|bundle exec puma -C shared/puma.rb}} | ||
== Systemd Service == | == Systemd Service == | ||
Line 887: | Line 805: | ||
then import the sql dump with that user. | then import the sql dump with that user. | ||
== Sources == | == Sources == | ||
* Get configuration tips from here: http://wiki.douglasqsantos.com.br/doku.php/deploying_a_rails_app_on_debian_jessie_with_capistrano_nginx_and_puma_en | * Get configuration tips from here: http://wiki.douglasqsantos.com.br/doku.php/deploying_a_rails_app_on_debian_jessie_with_capistrano_nginx_and_puma_en |