Class: Brut::CLI::Apps::Deploy::DeployConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/brut/cli/apps/deploy/deploy_config.rb

Overview

Describes your app’s need for deployment, which can drive the automatic deploy system. You must subclass this in deploy/deploy_config.rb. This class is used in a somewhat isolated environment, so you will not have access to your app’s Brut configuration or any of your app’s code. To say it another way, this is a way to store configuration information without having to use YAML. You’re welcome.

Direct Known Subclasses

Heroku::DeployConfig

Defined Under Namespace

Classes: ProcessDescription

Instance Method Summary collapse

Instance Method Details

#additional_processesObject

Returns a hash where each key is the name of a process you wish to run, other than the default, ‘web’. The keys are largely arbitrary and for documentation purposes, however you are advised to make them ASCII alphanumerics only with no whitespace.

The values of each key should be an instance ‘ProcessDescription`.

Examples:

Running Sidekiq


class AppDeployConfig < Brut::CLI::Apps::Deploy::DeployConfig
  def additional_processes = [
    ProcessDescription.new(name: "sidekiq", cmd: "bin/run sidekiq")
  ]
end


33
# File 'lib/brut/cli/apps/deploy/deploy_config.rb', line 33

def additional_processes = []

#platformObject

Returns the Docker platform for which the images should be built



14
# File 'lib/brut/cli/apps/deploy/deploy_config.rb', line 14

def platform = "linux/amd64"

#processesObject

Returns all processes this app needs in production. Generally, do not override this since it configures your web process. Override #additional_processes instead.



38
39
40
# File 'lib/brut/cli/apps/deploy/deploy_config.rb', line 38

def processes = [
  process_description("web", ["bundle", "exec", "bin/run"])
] + (additional_processes || [])

#registry_hostnameObject

Override this to push to another registory



11
# File 'lib/brut/cli/apps/deploy/deploy_config.rb', line 11

def registry_hostname = nil