Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion riptide/config/command/in_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ def convert_in_service_to_normal(app: App, command_name: str) -> Command:
'command': old_cmd['command'],
'additional_volumes': service['additional_volumes'] if 'additional_volumes' in service else {},
'environment': env,
'config_from_roles': [old_cmd['in_service_with_role']]
'config_from_roles': [old_cmd['in_service_with_role']],
'use_host_network': old_cmd['use_host_network'] if 'use_host_network' in old_cmd else False
})
new_cmd.parent_doc = app
new_cmd.freeze()
Expand Down
12 changes: 11 additions & 1 deletion riptide/config/document/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ def schema_normal(cls):
If enabled, read the environment variables in the env-files defined in the project (``env_files``).
Default: True

[use_host_network]: bool
If enabled, the container uses network mode `host`. Overrides network and port settings

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*tries to use network... ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The container will be configured to use network. Maybe he fails but... there is no try ;)

Default: False

**Example Document:**

.. code-block:: yaml
Expand All @@ -121,7 +125,8 @@ def schema_normal(cls):
},
Optional('environment'): {str: str},
Optional('config_from_roles'): [str],
Optional('read_env_file'): bool
Optional('read_env_file'): bool,
Optional('use_host_network'): bool,
})

@classmethod
Expand Down Expand Up @@ -160,6 +165,10 @@ def schema_in_service(cls):
If enabled, read the environment variables in the env-files defined in the project (``env_files``).
Default: True

[use_host_network]: bool
If enabled, the container uses network mode `host`. Overrides network and port settings
Default: False

**Example Document:**

.. code-block:: yaml
Expand All @@ -176,6 +185,7 @@ def schema_in_service(cls):
'command': str,
Optional('environment'): {str: str},
Optional('read_env_file'): bool,
Optional('use_host_network'): bool,
})

@classmethod
Expand Down