- We use
capistrano
for deployments. - Currently hosted on AWS EC2 Tokyo region
- All applications run as
rurema
user.
- All applications run as
- Periodic tasks run in systemd timer (
systemctl list-timers
)
- Debian 10 (buster)
apt install nginx groonga git bundler certbot
- passenger nginx module: https://www.phusionpassenger.com/docs/advanced_guides/install_and_upgrade/standalone/install/oss/buster.html
- rurema-search:
/var/rubydoc
- docs.ruby-lang.org:
/var/www/docs.ruby-lang.org
- nginx configuration:
/etc/nginx/sites-available/docs.ruby-lang.org
- old statically generated contents (old versions need to copy from old server):
/var/www/docs.ruby-lang.org/shared/public/{en,ja}/*
- Fastly API Key:
/home/rurema/.docs-fastly
- Slack webhook URL:
/etc/systemd/system/notify-to-slack.env
Usage:
git clone https://github.com/ruby/docs.ruby-lang.org
git clone https://github.com/ruby/rurema-search
cd docs.ruby-lang.org
vagrant up
vagrant ssh-config >> ~/.ssh/config
bundle install
cap vagrant deploy
cp config/deploy/vagrant.rb ../rurema-search/config/deploy/vagrant.rb
cd ../rurema-search
cap vagrant deploy
cd ../docs.ruby-lang.org
vagrant ssh
sudo systemctl start rdoc-static-all.service bc-setup-all.service &
sudo systemctl status rdoc-static-all.service bc-setup-all.service bc-static-all.service update-rurema-index.service
- Open
https://localhost:10443/
in browser (ignore certificate error (NET::ERR_CERT_AUTHORITY_INVALID
) because of using self signed certificate generated byprovision/selfsigned.yml
) - Run
sudo systemctl start rdoc-static-all.service
to update English documents. - Run
sudo systemctl start bc-setup-all.service
to update Japanese documents. - Run
sudo systemctl status rdoc-static-all.service bc-setup-all.service bc-static-all.service update-rurema-index.service
to see progress.Active: activating (start) since ...
means running.Active: inactive (dead) since ...
means finished.