Class: Mxrb::Runtime::DockerWorkspace
- Inherits:
-
Object
- Object
- Mxrb::Runtime::DockerWorkspace
- Defined in:
- lib/mxrb/runtime/docker_workspace.rb
Overview
Produces the argv-safe command for a natively compiled Runtime package.
Instance Attribute Summary collapse
-
#plan ⇒ Object
readonly
Returns the value of attribute plan.
-
#project_path ⇒ Object
readonly
Returns the value of attribute project_path.
Instance Method Summary collapse
-
#initialize(project_path, plan, workspace_size: "8g") ⇒ DockerWorkspace
constructor
A new instance of DockerWorkspace.
- #runtime_command(package_volume:, http_port: 8080, admin_port: 8090) ⇒ Object
Constructor Details
#initialize(project_path, plan, workspace_size: "8g") ⇒ DockerWorkspace
Returns a new instance of DockerWorkspace.
9 10 11 12 13 |
# File 'lib/mxrb/runtime/docker_workspace.rb', line 9 def initialize(project_path, plan, workspace_size: "8g") @project_path = File.(project_path) @plan = plan @workspace_size = workspace_size.to_s end |
Instance Attribute Details
#plan ⇒ Object (readonly)
Returns the value of attribute plan.
7 8 9 |
# File 'lib/mxrb/runtime/docker_workspace.rb', line 7 def plan @plan end |
#project_path ⇒ Object (readonly)
Returns the value of attribute project_path.
7 8 9 |
# File 'lib/mxrb/runtime/docker_workspace.rb', line 7 def project_path @project_path end |
Instance Method Details
#runtime_command(package_volume:, http_port: 8080, admin_port: 8090) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/mxrb/runtime/docker_workspace.rb', line 15 def runtime_command(package_volume:, http_port: 8080, admin_port: 8090) [ "docker", "run", "--rm", "--mount", "type=volume,source=#{package_volume},target=/mendix", "--tmpfs", "/mendix/data:exec,size=2g", "-p", "#{Integer(http_port)}:8080", "-p", "#{Integer(admin_port)}:8090", "-e", "M2EE_ADMIN_PASS=mxrb-functional-test", @plan.runtime_image, "./bin/start", "etc/Default" ] end |