11import warnings
22from collections import OrderedDict
33
4- from typing import List
5-
4+ from configcrunch import ConfigcrunchError
5+ from configcrunch import variable_helper
66from dotenv import dotenv_values
77from schema import Schema , Optional , Or
88
9- from configcrunch import YamlConfigDocument , ConfigcrunchError
10- from configcrunch import variable_helper
119from riptide .config .document .common_service_command import ContainerDefinitionYamlConfigDocument
1210from riptide .config .errors import RiptideDeprecationWarning
1311from riptide .config .files import CONTAINER_SRC_PATH
1412from riptide .config .service .config_files import *
1513from riptide .config .service .logging import *
16-
1714# todo: validate actual schema values -> better schema | ALL documents
1815from riptide .config .service .ports import get_additional_port
1916from riptide .config .service .volumes import process_additional_volumes
@@ -262,7 +259,6 @@ def schema(cls) -> Schema:
262259 or image default. Default is 'auto' which means the value of `run_as_current_user`
263260 will be used.
264261
265-
266262 [allow_full_memlock]: bool
267263 Whether to set memlock ulimit to -1:-1 (soft:hard).
268264 This is required for some database services, such as Elasticsearch.
@@ -274,6 +270,13 @@ def schema(cls) -> Schema:
274270 If enabled, read the environment variables in the env-files defined in the project (``env_files``).
275271 Default: True
276272
273+ [ignore_original_entrypoint]: bool
274+ If true, Riptide will not run the original entrypoint of the OCI image, but instead run the
275+ command directly, as if no entrypoint was defined in the image.
276+ Note that engines might ignore this setting, if they don't support it.
277+
278+ Default: False
279+
277280 **Example Document:**
278281
279282 .. code-block:: yaml
@@ -344,7 +347,8 @@ def schema(cls) -> Schema:
344347 Optional ('config' ): {
345348 str : {
346349 'from' : str ,
347- '$source' : str , # Path to the document that "from" references. Is added durinng loading of service
350+ '$source' : str ,
351+ # Path to the document that "from" references. Is added durinng loading of service
348352 'to' : str ,
349353 Optional ('force_recreate' ): bool
350354 }
@@ -383,7 +387,8 @@ def schema(cls) -> Schema:
383387 'name' : str ,
384388 'config' : any # defined by driver
385389 },
386- Optional ('read_env_file' ): bool
390+ Optional ('read_env_file' ): bool ,
391+ Optional ('ignore_original_entrypoint' ): bool
387392 }
388393 )
389394
@@ -427,6 +432,9 @@ def _initialize_data_after_merge(self, data):
427432 if "read_env_file" not in data :
428433 data ["read_env_file" ] = True
429434
435+ if "ignore_original_entrypoint" not in data :
436+ data ["ignore_original_entrypoint" ] = False
437+
430438 if "additional_subdomains" not in data :
431439 data ["additional_subdomains" ] = []
432440
@@ -736,8 +744,10 @@ def domain(self) -> str:
736744 something: 'https://project--service.riptide.local'
737745 """
738746 if "main" in self .internal_get ("roles" ):
739- return self .get_project ().internal_get ("name" ) + "." + self .parent_doc .parent_doc .parent_doc .internal_get ("proxy" )["url" ]
740- return self .get_project ().internal_get ("name" ) + DOMAIN_PROJECT_SERVICE_SEP + self .internal_get ("$name" ) + "." + self .parent_doc .parent_doc .parent_doc .internal_get ("proxy" )["url" ]
747+ return self .get_project ().internal_get ("name" ) + "." + \
748+ self .parent_doc .parent_doc .parent_doc .internal_get ("proxy" )["url" ]
749+ return self .get_project ().internal_get ("name" ) + DOMAIN_PROJECT_SERVICE_SEP + self .internal_get ("$name" ) + "." + \
750+ self .parent_doc .parent_doc .parent_doc .internal_get ("proxy" )["url" ]
741751
742752 @variable_helper
743753 def additional_domains (self ) -> Dict [str , str ]:
@@ -760,7 +770,9 @@ def additional_domains(self) -> Dict[str, str]:
760770 second: 'https://seccond.project--service.riptide.local'
761771 """
762772 if "main" in self .internal_get ("roles" ):
763- return {subdomain : f'{ subdomain } .{ self .get_project ().internal_get ("name" )} .{ self .parent_doc .parent_doc .parent_doc .internal_get ("proxy" )["url" ]} '
764- for subdomain in self .internal_get ("additional_subdomains" )}
765- return {subdomain : f'{ subdomain } .{ self .get_project ().internal_get ("name" )} { DOMAIN_PROJECT_SERVICE_SEP } { self .internal_get ("$name" )} .{ self .parent_doc .parent_doc .parent_doc .internal_get ("proxy" )["url" ]} '
773+ return {
774+ subdomain : f'{ subdomain } .{ self .get_project ().internal_get ("name" )} .{ self .parent_doc .parent_doc .parent_doc .internal_get ("proxy" )["url" ]} '
766775 for subdomain in self .internal_get ("additional_subdomains" )}
776+ return {
777+ subdomain : f'{ subdomain } .{ self .get_project ().internal_get ("name" )} { DOMAIN_PROJECT_SERVICE_SEP } { self .internal_get ("$name" )} .{ self .parent_doc .parent_doc .parent_doc .internal_get ("proxy" )["url" ]} '
778+ for subdomain in self .internal_get ("additional_subdomains" )}
0 commit comments