lobsters / lobsters-ansible

Ansible playbook for lobste.rs
ISC License
78 stars 25 forks source link

Convert from cron to systemd timers #38

Closed hmadison closed 4 years ago

hmadison commented 5 years ago

Supports the elasticsearch pull request.

This allows us to pass all of the environment and configuration to the site via environment variables instead of having to hard code them in an initializer.

Per @alanpost's request the deployment steps are as followed:

  1. (Anytime) Make a /srv/lobsters/environment file following the required format.
  2. Merge in lobsters #579.
  3. Deploy lobsters #579 and leave elasticsearch disabled. This will keep things on the site from using it, but we can still index stories.
  4. Start a rails console and run the following:
    • ElasticSearch.client.indices.create(index: ElasticSearch.index) To create the index.
    • Story.find_each { |s| IndexStoryJob.perform_now(s) } To index all of the submitted stories.
    • Comment.find_each { |s| IndexCommentJob.perform_now(s) } To index all of the submitted comments.
  5. Enable elasticsearch in config/site.yml.

Once that is completed, we should have all of the stories and comments searchable again.

hmadison commented 4 years ago

Only needed for lobsters/#579