mirror of
				https://github.com/zulip/docker-zulip.git
				synced 2025-11-04 05:53:19 +00:00 
			
		
		
		
	Added $ignoreNginxService for nginx service
This commit is contained in:
		@@ -18,6 +18,7 @@ class zulip::dockervoyager {
 | 
			
		||||
  safepackage { $appdb_packages: ensure => "installed" }
 | 
			
		||||
 | 
			
		||||
  $ignoreSupervisorService = true
 | 
			
		||||
  $ignoreNginxService = true
 | 
			
		||||
 | 
			
		||||
  include zulip::supervisor
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -41,4 +41,30 @@ class zulip::nginx {
 | 
			
		||||
    group      => "adm",
 | 
			
		||||
    mode       => 650
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  # Depending on the environment, ignoreNginxService is set, meaning we
 | 
			
		||||
  # don't want/need supervisor to be started/stopped
 | 
			
		||||
  # /bin/true is used as a decoy command, to maintain compatibility with other
 | 
			
		||||
  # code using the supervisor service.
 | 
			
		||||
  if $ignoreNginxService != undef and $ignoreNginxService {
 | 
			
		||||
    service { "nginx":
 | 
			
		||||
      ensure     => running,
 | 
			
		||||
      require    => [
 | 
			
		||||
        File["/var/log/nginx"],
 | 
			
		||||
        Package["nginx-full"],
 | 
			
		||||
      ],
 | 
			
		||||
      hasstatus  => true,
 | 
			
		||||
      status     => "/bin/true",
 | 
			
		||||
      hasrestart => true,
 | 
			
		||||
      restart => "/bin/true"
 | 
			
		||||
    }
 | 
			
		||||
  } else {
 | 
			
		||||
    service { "supervisor":
 | 
			
		||||
      ensure => running,
 | 
			
		||||
      require    => [
 | 
			
		||||
        File["/var/log/nginx"],
 | 
			
		||||
        Package["nginx-full"],
 | 
			
		||||
      ],
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user