Git Product home page Git Product logo

docs.ruby-lang.org's Introduction

docs.ruby-lang.org

Platform Environment

  • We use capistrano for deployments.
  • Currently hosted on AWS EC2 Tokyo region
    • All applications run as rurema user.
  • Periodic tasks run in systemd timer (systemctl list-timers)

Requisites

Files and Directories

  • rurema-search: /var/rubydoc
  • docs.ruby-lang.org: /var/www/docs.ruby-lang.org
  • nginx configuration: /etc/nginx/sites-available/docs.ruby-lang.org

Files need to backup

  • 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

Related repos

Vagrant Environment

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 by provision/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.

Production Environment

Capstrano

cap production deploy

ansible

ansible-playbook -i docs-2020, provision/playbook.yml
ansible-playbook -i docs-2020, provision/users.yml
ansible-playbook -i docs-2020, provision/rurema-search.yml
ansible-playbook -i docs-2020, provision/letsencrypt.yml

/etc/mackerel-agent/mackerel-agent.conf

Install mackerel-check-plugins too.

Add/Modified:

[filesystems]
ignore = "/dev/loop*"

[plugin.checks.fileage-bc-setup-all]
command = ["check-file-age", "-i", "-w", "90000", "-c", "172800", "-f", "/run/docs.ruby-lang.org/bc-setup-all.updated"]
[plugin.checks.fileage-bc-static-all]
command = ["check-file-age", "-i", "-w", "90000", "-c", "172800", "-f", "/run/docs.ruby-lang.org/bc-static-all.updated"]
[plugin.checks.fileage-rdoc-static-all]
command = ["check-file-age", "-i", "-w", "90000", "-c", "172800", "-f", "/run/docs.ruby-lang.org/rdoc-static-all.updated"]
[plugin.checks.fileage-update-rurema-index]
command = ["check-file-age", "-i", "-w", "90000", "-c", "172800", "-f", "/run/docs.ruby-lang.org/update-rurema-index.updated"]

docs.ruby-lang.org's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar hsbt avatar jeremyevans avatar kou avatar okkez avatar sho-h avatar sorah avatar unak avatar yhara avatar znz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.