Github repository is at https://github.com/iherman/r2epub

W3C deployment at https://labs.w3.org/r2epub

ssh ivan@pictor.w3.internal leads to the right machine on AWS (see ssh config below).

Do a pm2 reload r2epub.

The project is managed by pm2 that takes care of restarting the node process if there's an exception.

A few commands:

  • check the list of pm2 process: pm2 list
  • start r2epub: pm2 start r2epub
  • stop r2epub: pm2 stop r2epub
  • reload the sources: pm2 reload r2epub

If an environment variable is added/changed, the following must be done (in fact, the environment variable setting below is the current, default setting):

  • pm2 delete 0
  • `R2EPUB_MODIFIED_EPUB_FILES="/home/ivan/assets/epub/"
  • pm2 -l /var/log/deno/r2epub.log start "deno run --reload -A jsr:@iherman/r2epub/serve" -n r2epub
  • pm2 save

Note that the PORT environment variable must be set to 8000; this is the way the lab service has been set up.

See also the pm2 manual.

(Additional part of Denis’ email, not used now)

W3C AWS server access

The .ssh/config file should include:

1
Host *.w3.internal
2
ProxyJump ivan@ssh-aws.w3.org

and then ssh ivan@pictor.w3.internal works.

Attic

node.js version:

  • pm2 delete 0
  • cd source/r2epub
  • `R2EPUB_MODIFIED_EPUB_FILES="/home/ivan/source/r2epub/docs/epub_assets/"
  • pm2 -l /var/log/nodejs/r2epub.log start dist/server.js -n r2epub`
  • pm2 dump