HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //var/cache/puppet/lib/puppet/type/docker_compose.rb
# frozen_string_literal: true

Puppet::Type.newtype(:docker_compose) do
  @doc = 'A type representing a Docker Compose file'

  ensurable

  def refresh
    provider.restart
  end

  newparam(:scale) do
    desc 'A hash of compose services and number of containers.'
    validate do |value|
      raise _('scale should be a Hash') unless value.is_a? Hash
      unless value.all? { |k, _v| k.is_a? String }
        raise _('The name of the compose service in scale should be a String')
      end
      unless value.all? { |_k, v| v.is_a? Integer }
        raise _('The number of containers in scale should be an Integer')
      end
    end
  end

  newparam(:options) do
    desc 'Additional options to be passed directly to docker-compose.'
    validate do |value|
      raise _('options should be a String') unless value.is_a? String
    end
  end

  newparam(:up_args) do
    desc 'Arguments to be passed directly to docker-compose up.'
    validate do |value|
      raise _('up_args should be a String') unless value.is_a? String
    end
  end

  newparam(:compose_files, array_matching: :all) do
    desc 'An array of Docker Compose Files paths.'
    validate do |value|
      raise _('compose files should be an array') unless value.is_a? Array
    end
  end

  newparam(:name) do
    isnamevar
    desc 'The name of the project'
  end
end