view modules/python/examples/gunicorn.pp @ 399:2c6065b5be5e

Switch to config-based PHP extensions This makes it compatible with Ubuntu, otherwise it keeps trying to re-install the same module because the "phpX.X" package is a virtual package and the Puppet handling of Ubuntu's "is it installed" system is incapable of saying "yes" when a virtual package is installed.
author IBBoard <dev@ibboard.co.uk>
date Wed, 20 Apr 2022 19:08:14 +0100
parents c42fb28cff86
children adf6fe9bbc17
line wrap: on
line source

class { 'python':
  version    => 'system',
  dev        => true,
  virtualenv => true,
}

python::gunicorn { 'vhost':
  ensure      => present,
  virtualenv  => '/var/www/project1',
  mode        => 'wsgi',
  dir         => '/var/www/project1/current',
  bind        => 'unix:/tmp/gunicorn.socket',
  environment => 'prod',
  appmodule   => 'app:app',
  osenv       => {
    'DBHOST' => 'dbserver.example.com',
  },
  timeout     => 30,
  template    => 'python/gunicorn.erb',
}