Reduce phoenix startup time by setting RELEASE_MODE=interactive

This commit is contained in:
Jamil Bou Kheir
2021-09-22 00:18:49 +00:00
parent 3d21852146
commit e1bef2fbff
3 changed files with 5 additions and 5 deletions

View File

@@ -51,7 +51,6 @@ end
if node['firezone']['phoenix']['enable']
component_runit_service 'phoenix' do
package 'firezone'
control ['t']
action :enable
subscribes :restart, 'file[environment-variables]'
end

View File

@@ -1,4 +0,0 @@
#!/bin/sh
echo "received TERM from runit, sending to process group (-PID)"
pid=$(<%= node['firezone']['app_directory'] %>/bin/firezone pid)
kill -- -$pid

View File

@@ -16,3 +16,8 @@
# RELEASE_DISTRIBUTION variable below. Must be "sname", "name" or "none".
export RELEASE_DISTRIBUTION=name
export RELEASE_NODE=<%= @release.name %>@127.0.0.1
# Choices here are 'interactive' and 'embedded'. 'interactive' boots faster which
# prevents some runit process management edge cases at the expense of the application
# not technically being ready to serve requests "right away". This is a useful tradeoff.
export RELEASE_MODE=interactive