From eeac44ec8e07980b3dcdb0789666db17f3e23ea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Fri, 4 May 2018 23:45:05 +0200 Subject: Handle postgresql sockets for cryptoportfolio app --- modules/role/templates/cryptoportfolio/api_conf.toml.erb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'modules/role/templates/cryptoportfolio') diff --git a/modules/role/templates/cryptoportfolio/api_conf.toml.erb b/modules/role/templates/cryptoportfolio/api_conf.toml.erb index 63f39c7..d806778 100644 --- a/modules/role/templates/cryptoportfolio/api_conf.toml.erb +++ b/modules/role/templates/cryptoportfolio/api_conf.toml.erb @@ -6,7 +6,13 @@ log_out="stdout" user="<%= @pg_user %>" password="<%= @pg_password %>" database="<%= @pg_db %>" -address="<%= @pg_host %>" +<%- if @pg_hostname[0] == "/" -%> +type="unix" +address="<%= @pg_hostname %>/.s.PGSQL.<%= @pg_port %>" +<%- else -%> +type="tcp" +address="<%= @pg_hostname %>:<%= @pg_port %>" +<%- end -%> <%- if !@redis_host.nil? && @redis_host != "" -%> [redis] -- cgit v1.2.3