Skip to content

Commit

Permalink
Merge pull request #269 from firezone/263/fix_fqdn_changes
Browse files Browse the repository at this point in the history
Set URL_HOST to updated fqdn upon changing
  • Loading branch information
jamilbk committed Oct 1, 2021
2 parents 35d7b8f + 3c36b19 commit 6ad0580
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 1 addition & 3 deletions omnibus/cookbooks/firezone/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
# attributes are further down in this file.

# The fully qualified domain name. Will use the node's fqdn if nothing is
# specified.
# specified. Used for generating URLs that point back to this application.
default['firezone']['fqdn'] = (node['fqdn'] || node['hostname']).downcase

default['firezone']['config_directory'] = '/etc/firezone'
Expand All @@ -59,8 +59,6 @@
default['firezone']['var_directory'] = '/var/opt/firezone'
default['firezone']['user'] = 'firezone'
default['firezone']['group'] = 'firezone'
# Used for generating URLs that point back to this application.
default['firezone']['url_host'] = node['firezone']['fqdn']
# Email for the primary admin user.
default['firezone']['admin_email'] = "firezone@localhost"

Expand Down
2 changes: 1 addition & 1 deletion omnibus/cookbooks/firezone/libraries/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def self.app_env(attributes, reject = [])
'DATABASE_PORT' => attributes['database']['port'].to_s,
'DATABASE_POOL' => attributes['database']['pool'].to_s,
'PHOENIX_PORT' => attributes['phoenix']['port'].to_s,
'URL_HOST' => attributes['url_host'],
'URL_HOST' => attributes['fqdn'],
'ADMIN_EMAIL' => attributes['admin_email'],
'WIREGUARD_INTERFACE_NAME' => attributes['wireguard']['interface_name'],
'WIREGUARD_ENDPOINT_IP' => attributes['wireguard']['endpoint_ip'],
Expand Down
2 changes: 2 additions & 0 deletions omnibus/cookbooks/firezone/recipes/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
owner node['firezone']['user']
group node['firezone']['group']
mode '0600'

subscribes :create, "file[#{node['firezone']['config_directory']}/firezone.rb]", :immediately
end

execute 'database schema' do
Expand Down

0 comments on commit 6ad0580

Please sign in to comment.