Switch ejabberd, mastodon and gitea to a hostname for Postgres

This commit is contained in:
Greg Karékinian
2021-01-23 16:43:15 +01:00
parent fdd70d1872
commit bb0e73d1b9
3 changed files with 4 additions and 16 deletions

View File

@@ -37,10 +37,6 @@ smtp_credentials = data_bag_item("credentials", "smtp")
jwt_secret = gitea_data_bag_item["jwt_secret"]
internal_token = gitea_data_bag_item["internal_token"]
secret_key = gitea_data_bag_item["secret_key"]
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]
# Dependency
package "git"
@@ -110,7 +106,7 @@ template "#{config_directory}/app.ini" do
jwt_secret: jwt_secret,
internal_token: internal_token,
secret_key: secret_key,
postgresql_host: "#{postgresql_server}:5432",
postgresql_host: "pg.kosmos.local:5432",
postgresql_password: gitea_data_bag_item["postgresql_password"],
smtp_host: smtp_credentials["relayhost"],
smtp_user: smtp_credentials["user_name"],