]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/commitdiff
Enable https for cryptoportfolio
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Tue, 20 Feb 2018 10:40:51 +0000 (11:40 +0100)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Tue, 20 Feb 2018 10:54:00 +0000 (11:54 +0100)
modules/role/manifests/cryptoportfolio.pp

index d2323a45bc0213f8fdd933e577c9db7f4a80975a..05f2c595753d658c2b556d46322aad09ca03343e 100644 (file)
@@ -18,7 +18,7 @@ class role::cryptoportfolio {
   $cf_env = "prod"
   $cf_front_app_host = "cryptoportfolio.immae.eu"
   $cf_front_app_port = ""
-  $cf_front_app_ssl = "false"
+  $cf_front_app_ssl = "true"
   $cf_front_app = "${cf_home}/go/src/immae.eu/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Front"
   $cf_front_app_api_workdir = "${cf_front_app}/cmd/app"
   $cf_front_app_api_bin = "${cf_front_app_api_workdir}/cryptoportfolio-app"
@@ -172,6 +172,7 @@ class role::cryptoportfolio {
       group   => $cf_group,
       mode    => "0600",
       content => template("role/cryptoportfolio/static_conf.env.erb"),
+      notify  => Exec["remove build ${cf_front_app}/cmd/web/build/"],
     }
 
     exec { "web-cryptoportfolio-dependencies":
@@ -179,9 +180,16 @@ class role::cryptoportfolio {
       environment => ["HOME=${cf_home}"],
       command     => "/usr/bin/make install",
       creates     => "${cf_front_app}/cmd/web/node_modules",
+      notify      => Exec["remove build ${cf_front_app}/cmd/web/build/"],
       require     => [Package["npm"], Package["nodejs"], Package["yarn"]]
     }
 
+    exec { "remove build ${cf_front_app}/cmd/web/build/":
+      command     => "/usr/bin/rm -rf '${cf_front_app}/cmd/web/build/'",
+      refreshonly => true,
+      before      => Exec["web-cryptoportfolio-build"]
+    }
+
     exec { "web-cryptoportfolio-build":
       cwd         => "${cf_front_app}/cmd/web",
       environment => ["HOME=${cf_home}"],