]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/commitdiff
Add redis host for cryptoportfolio api
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Tue, 1 May 2018 08:36:28 +0000 (10:36 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Tue, 1 May 2018 08:52:11 +0000 (10:52 +0200)
modules/role/templates/cryptoportfolio/api_conf.toml.erb

index 7a4b66d1062a24341f0524d2e6aaca030cff84ce..8d0e037fdfe521422451f757613dac42138a56e4 100644 (file)
@@ -8,6 +8,17 @@ password="<%= @pg_password %>"
 database="<%= @pg_db %>"
 address="<%= @pg_host %>"
 
+<%- if !@redis_host.nil? && @redis_host != "" -%>
+[redis]
+<%- if @redis_host[0] == "/" -%>
+type="unix"
+<%- else -%>
+type="tcp"
+<%- end -%>
+address="<%= @redis_host %>"
+database=0
+<%- end -%>
+
 [api]
 domain="<%= @web_host %>"
 jwt_secret="<%= @cf_front_app_api_secret %>"