aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2018-02-20 11:40:51 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2018-02-20 11:54:00 +0100
commite17078be2c92c88e0fc8ecc88a626cdb99d0d09a (patch)
tree4e397fac9e1af5b46918ebf62c3046419ea27e02 /modules
parent73bca64c33744027a0e800ce6c98a549ec924c6e (diff)
downloadPuppet-e17078be2c92c88e0fc8ecc88a626cdb99d0d09a.tar.gz
Puppet-e17078be2c92c88e0fc8ecc88a626cdb99d0d09a.tar.zst
Puppet-e17078be2c92c88e0fc8ecc88a626cdb99d0d09a.zip
Enable https for cryptoportfolio
Diffstat (limited to 'modules')
-rw-r--r--modules/role/manifests/cryptoportfolio.pp10
1 files changed, 9 insertions, 1 deletions
diff --git a/modules/role/manifests/cryptoportfolio.pp b/modules/role/manifests/cryptoportfolio.pp
index d2323a4..05f2c59 100644
--- a/modules/role/manifests/cryptoportfolio.pp
+++ b/modules/role/manifests/cryptoportfolio.pp
@@ -18,7 +18,7 @@ class role::cryptoportfolio {
18 $cf_env = "prod" 18 $cf_env = "prod"
19 $cf_front_app_host = "cryptoportfolio.immae.eu" 19 $cf_front_app_host = "cryptoportfolio.immae.eu"
20 $cf_front_app_port = "" 20 $cf_front_app_port = ""
21 $cf_front_app_ssl = "false" 21 $cf_front_app_ssl = "true"
22 $cf_front_app = "${cf_home}/go/src/immae.eu/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Front" 22 $cf_front_app = "${cf_home}/go/src/immae.eu/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Front"
23 $cf_front_app_api_workdir = "${cf_front_app}/cmd/app" 23 $cf_front_app_api_workdir = "${cf_front_app}/cmd/app"
24 $cf_front_app_api_bin = "${cf_front_app_api_workdir}/cryptoportfolio-app" 24 $cf_front_app_api_bin = "${cf_front_app_api_workdir}/cryptoportfolio-app"
@@ -172,6 +172,7 @@ class role::cryptoportfolio {
172 group => $cf_group, 172 group => $cf_group,
173 mode => "0600", 173 mode => "0600",
174 content => template("role/cryptoportfolio/static_conf.env.erb"), 174 content => template("role/cryptoportfolio/static_conf.env.erb"),
175 notify => Exec["remove build ${cf_front_app}/cmd/web/build/"],
175 } 176 }
176 177
177 exec { "web-cryptoportfolio-dependencies": 178 exec { "web-cryptoportfolio-dependencies":
@@ -179,9 +180,16 @@ class role::cryptoportfolio {
179 environment => ["HOME=${cf_home}"], 180 environment => ["HOME=${cf_home}"],
180 command => "/usr/bin/make install", 181 command => "/usr/bin/make install",
181 creates => "${cf_front_app}/cmd/web/node_modules", 182 creates => "${cf_front_app}/cmd/web/node_modules",
183 notify => Exec["remove build ${cf_front_app}/cmd/web/build/"],
182 require => [Package["npm"], Package["nodejs"], Package["yarn"]] 184 require => [Package["npm"], Package["nodejs"], Package["yarn"]]
183 } 185 }
184 186
187 exec { "remove build ${cf_front_app}/cmd/web/build/":
188 command => "/usr/bin/rm -rf '${cf_front_app}/cmd/web/build/'",
189 refreshonly => true,
190 before => Exec["web-cryptoportfolio-build"]
191 }
192
185 exec { "web-cryptoportfolio-build": 193 exec { "web-cryptoportfolio-build":
186 cwd => "${cf_front_app}/cmd/web", 194 cwd => "${cf_front_app}/cmd/web",
187 environment => ["HOME=${cf_home}"], 195 environment => ["HOME=${cf_home}"],