Deployment section added
This commit is contained in:
parent
e5ceab72a9
commit
011a61afd4
1 changed files with 71 additions and 1 deletions
72
README.rdoc
72
README.rdoc
|
|
@ -1,6 +1,76 @@
|
||||||
== Installing debshots
|
== Installing debshots
|
||||||
|
|
||||||
TODO
|
=== Prepare PostgreSQL database server and user
|
||||||
|
|
||||||
|
apt install postgresql
|
||||||
|
|
||||||
|
su - postgres
|
||||||
|
|
||||||
|
createuser -d debshots
|
||||||
|
|
||||||
|
createdb -O debshots debshots
|
||||||
|
|
||||||
|
=== Create an application user
|
||||||
|
|
||||||
|
adduser debshots
|
||||||
|
|
||||||
|
su - debshots
|
||||||
|
|
||||||
|
=== Install the required Ruby version using rbenv
|
||||||
|
|
||||||
|
https://github.com/rbenv/rbenv
|
||||||
|
|
||||||
|
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
|
||||||
|
|
||||||
|
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
|
||||||
|
|
||||||
|
|
||||||
|
# Load rbenv automatically by appending
|
||||||
|
# the following to ~/.bashrc:
|
||||||
|
|
||||||
|
eval "$(rbenv init -)"
|
||||||
|
|
||||||
|
|
||||||
|
https://github.com/rbenv/ruby-build#readme
|
||||||
|
|
||||||
|
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
|
||||||
|
|
||||||
|
=== Get the application
|
||||||
|
|
||||||
|
Clone the debshots Git repository.
|
||||||
|
|
||||||
|
=== Install the Ruby dependencies
|
||||||
|
|
||||||
|
rbenv install
|
||||||
|
|
||||||
|
echo "gem: --no-rdoc --no-ri" > ~/.gemrc
|
||||||
|
|
||||||
|
gem install bundler
|
||||||
|
|
||||||
|
bundle install --deployment
|
||||||
|
|
||||||
|
=== Copy screenshots and database from the former live website
|
||||||
|
|
||||||
|
scp screenshots.debian.net:debshots-screenshots.tar .
|
||||||
|
|
||||||
|
mv live/screenshots/approved public/screenshots
|
||||||
|
|
||||||
|
rm -r live
|
||||||
|
|
||||||
|
scp screenshots.debian.net:debshots.sql .
|
||||||
|
|
||||||
|
psql debshots < debshots.sql
|
||||||
|
|
||||||
|
Migrate database:
|
||||||
|
|
||||||
|
bundle exec rake db:migrate RAILS_ENV=production
|
||||||
|
|
||||||
|
(config/database.yml: production: user/password/host must be commented out)
|
||||||
|
|
||||||
|
Convert screenshots to new format (paperclip):
|
||||||
|
|
||||||
|
bundle exec rake debshots:screenshots_to_paperclip RAILS_ENV=production
|
||||||
|
|
||||||
|
|
||||||
== Supported URL paths (aka routes)
|
== Supported URL paths (aka routes)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue