DoESLiverpool / weeknote-generator

Collects reports of #weeknotes and collates them into a blog post
1 stars 1 forks source link

weeknote-generator

Collects reports of #weeknotes and collates them into a blog post

Development

Not a complete set of instructions, needs fleshing out more...

  1. Run bundle install
  2. Create a YAML file for the config

Then there are three main operations:

Those two should be run regularly to gather the data needed by the third script:

which is run once-a-week to create the weeknotes post.

Deployment

We run the code under Docker when deployed.

  1. Clone the repo
  2. Generate the Gemfile.lock file: docker run --rm -v "$PWD":/usr/src/app -w /usr/src/app ruby:3.1 bundle install
  3. Build the image docker build -t weeknotes .
  4. Set up webserver to serve the static files. The docker setup expects this to be available as a volume mounted at /var/local/media_root
  5. Create a folder to hold the work files (list of who has given consent, toots ready to publish, etc.). The docker setup expects this to be available as a volume mounted at /var/local/workfiles
  6. Create the config YAML file called weeknotes-config.yaml. This should live in the folder used to contain the work files (docker expects to find it at /var/local/workfiles/weeknotes-config.yaml)
  7. Set up cron to run:
    • docker run [add volume arguments] weeknotes [operation]