Switch ejabberd, mastodon and gitea to a hostname for Postgres
This commit is contained in:
@@ -21,10 +21,6 @@ end
|
||||
elasticsearch_service 'elasticsearch'
|
||||
|
||||
postgresql_data_bag_item = data_bag_item('credentials', 'postgresql')
|
||||
postgresql_primary_node = postgresql_primary
|
||||
postgresql_server = postgresql_primary_node[:ipaddress]
|
||||
# PostgreSQL is on the same server, connect through localhost
|
||||
postgresql_server = "localhost" if postgresql_primary_node[:hostname] == node[:hostname]
|
||||
|
||||
mastodon_path = node["kosmos-mastodon"]["directory"]
|
||||
|
||||
@@ -138,7 +134,8 @@ application mastodon_path do
|
||||
vapid_private_key: mastodon_credentials['vapid_private_key'],
|
||||
vapid_public_key: mastodon_credentials['vapid_public_key'],
|
||||
db_pass: postgresql_data_bag_item['mastodon_user_password'],
|
||||
db_host: postgresql_server
|
||||
db_host: "pg.kosmos.local"
|
||||
notifies :restart, "application[#{mastodon_path}]", :delayed
|
||||
end
|
||||
|
||||
execute "bundle install" do
|
||||
|
||||
Reference in New Issue
Block a user