+
+ services.websites.env.integration.vhostConfs.denise_oms_beta = {
+ certName = "denise";
+ addToCerts = true;
+ hosts = [ "beta.oms.syanni.eu" ];
+ root = null;
+ extraConfig = [
+ ''
+ ProxyPreserveHost on
+ ProxyVia On
+ ProxyRequests Off
+ ProxyPassMatch ^/.well-known/acme-challenge !
+ ProxyPass / unix://${socket_beta}|http://beta.oms.syanni.eu/
+ ProxyPassReverse / unix://${socket_beta}|http://beta.oms.syanni.eu/
+ ''
+ ];
+ };
+
+ systemd.services.denise-oms-beta = {
+ description = "Denise OMS beta website";
+ after = [ "network.target" ];
+ wantedBy = [ "multi-user.target" ];
+
+ serviceConfig = {
+ Type = "simple";
+ WorkingDirectory = varDirBeta;
+ ExecStart = let
+ python = pkgs.python3.withPackages (p: [ p.gunicorn p.flask p.matplotlib p.unidecode ]);
+ in
+ "${python}/bin/gunicorn -w4 -p /run/denise_oms_beta/gunicorn.pid --bind unix:${socket_beta} app:app";
+ User = "buildbot";
+ Restart = "always";
+ RestartSec = "5s";
+ PIDFile = "/run/denise_oms_beta/gunicorn.pid";
+ RuntimeDirectory = "denise_oms_beta";
+ StandardOutput = "journal";
+ StandardError = "inherit";
+ };
+ };