From 307f559226901c7e837bfcd015e50788675e7b10 Mon Sep 17 00:00:00 2001 From: Matchu Date: Sun, 20 Aug 2023 14:42:21 -0700 Subject: [PATCH] Oops, add EXECJS_RUNTIME=Disabled to service file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Uhhh I think I must have made a mistake here where like… I must have left this in the service file for a while then accidentally deleted it from the Ansible playbook but not the live server? I had tested with this, then tested again without it and thought it wasn't necessary, but it turns out to have been necessary I guess? Ok! This instructs Rails's ExecJS library to not bother looking for Node or something similar, because the app doesn't actually need to run any JS, even though the `react-rails` library (?) seems to be pretty eager about the possibility that we'll need to server-side-render stuff. (We should consider whether we want to though tbh? But… idk that would be a pretty different arch than what we've done with `jsbundling-rails` so like. idk whatever) --- deploy/setup.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/deploy/setup.yml b/deploy/setup.yml index 0946bb48..0a119b6f 100644 --- a/deploy/setup.yml +++ b/deploy/setup.yml @@ -252,6 +252,7 @@ WorkingDirectory=/srv/impress/current ExecStart=/opt/ruby-3.1.4/bin/bundle exec puma --port=3000 Environment="RAILS_ENV=production" + Environment="EXECJS_RUNTIME=Disabled" ; to save us from installing Node EnvironmentFile=/srv/impress/shared/production.env ; Some security directives, adapted from Akkoma's service file, they seem like sensible defaults!