Add support for volumes
This commit is contained in:
@@ -95,7 +95,6 @@ If the referenced secret ENVs are missing, the configuration will be halted with
|
|||||||
|
|
||||||
Note: Marking an ENV as secret currently only redacts its value in the output for MRSK. The ENV is still injected in the clear into the container at runtime.
|
Note: Marking an ENV as secret currently only redacts its value in the output for MRSK. The ENV is still injected in the clear into the container at runtime.
|
||||||
|
|
||||||
|
|
||||||
### Using volumes
|
### Using volumes
|
||||||
|
|
||||||
You can add custom volumes into the app containers using `volumes`:
|
You can add custom volumes into the app containers using `volumes`:
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ class Mrsk::Configuration
|
|||||||
ensure_required_keys_present if validate
|
ensure_required_keys_present if validate
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def roles
|
def roles
|
||||||
@roles ||= role_names.collect { |role_name| Role.new(role_name, config: self) }
|
@roles ||= role_names.collect { |role_name| Role.new(role_name, config: self) }
|
||||||
end
|
end
|
||||||
@@ -60,6 +61,7 @@ class Mrsk::Configuration
|
|||||||
roles.select(&:running_traefik?).flat_map(&:hosts)
|
roles.select(&:running_traefik?).flat_map(&:hosts)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def version
|
def version
|
||||||
@version
|
@version
|
||||||
end
|
end
|
||||||
@@ -76,6 +78,7 @@ class Mrsk::Configuration
|
|||||||
"#{service}-#{version}"
|
"#{service}-#{version}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def env_args
|
def env_args
|
||||||
if config.env.present?
|
if config.env.present?
|
||||||
argumentize_env_with_secrets(config.env)
|
argumentize_env_with_secrets(config.env)
|
||||||
@@ -85,9 +88,11 @@ class Mrsk::Configuration
|
|||||||
end
|
end
|
||||||
|
|
||||||
def volumes
|
def volumes
|
||||||
return unless config.volumes.present?
|
if config.volumes.present?
|
||||||
|
config.volumes.map { |volume| "--volume #{volume}" }
|
||||||
config.volumes.map { |volume| "--volume #{volume}" }
|
else
|
||||||
|
[]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def ssh_user
|
def ssh_user
|
||||||
@@ -118,6 +123,7 @@ class Mrsk::Configuration
|
|||||||
}.compact
|
}.compact
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
attr_accessor :config
|
attr_accessor :config
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user