arkitekt-next 0.15.0__py3-none-any.whl → 0.17.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of arkitekt-next might be problematic. Click here for more details.

Files changed (58) hide show
  1. arkitekt_next/app/fakts.py +27 -1
  2. arkitekt_next/cli/commands/call/local.py +1 -1
  3. arkitekt_next/cli/commands/call/main.py +14 -7
  4. arkitekt_next/cli/templates/filter.py +7 -7
  5. arkitekt_next/cli/templates/simple.py +4 -1
  6. arkitekt_next/py.typed +0 -0
  7. {arkitekt_next-0.15.0.dist-info → arkitekt_next-0.17.0.dist-info}/METADATA +3 -3
  8. {arkitekt_next-0.15.0.dist-info → arkitekt_next-0.17.0.dist-info}/RECORD +11 -57
  9. arkitekt_next/__blok__.py +0 -58
  10. arkitekt_next/bloks/__init__.py +0 -1
  11. arkitekt_next/bloks/admin.py +0 -43
  12. arkitekt_next/bloks/alpaka.py +0 -136
  13. arkitekt_next/bloks/arkitekt.py +0 -55
  14. arkitekt_next/bloks/base.py +0 -215
  15. arkitekt_next/bloks/channel.py +0 -27
  16. arkitekt_next/bloks/config.py +0 -43
  17. arkitekt_next/bloks/elektro.py +0 -42
  18. arkitekt_next/bloks/fluss.py +0 -33
  19. arkitekt_next/bloks/gateway.py +0 -230
  20. arkitekt_next/bloks/internal_docker.py +0 -95
  21. arkitekt_next/bloks/kabinet.py +0 -46
  22. arkitekt_next/bloks/kraph.py +0 -45
  23. arkitekt_next/bloks/l.py +0 -136
  24. arkitekt_next/bloks/livekit.py +0 -89
  25. arkitekt_next/bloks/lok.py +0 -354
  26. arkitekt_next/bloks/lovekit.py +0 -199
  27. arkitekt_next/bloks/mikro.py +0 -42
  28. arkitekt_next/bloks/minio.py +0 -176
  29. arkitekt_next/bloks/mount.py +0 -34
  30. arkitekt_next/bloks/namegen.py +0 -34
  31. arkitekt_next/bloks/ollama.py +0 -94
  32. arkitekt_next/bloks/orkestrator.py +0 -122
  33. arkitekt_next/bloks/postgres.py +0 -136
  34. arkitekt_next/bloks/redis.py +0 -79
  35. arkitekt_next/bloks/rekuest.py +0 -30
  36. arkitekt_next/bloks/secret.py +0 -32
  37. arkitekt_next/bloks/self_signed.py +0 -91
  38. arkitekt_next/bloks/services/__init__.py +0 -27
  39. arkitekt_next/bloks/services/admin.py +0 -21
  40. arkitekt_next/bloks/services/certer.py +0 -14
  41. arkitekt_next/bloks/services/channel.py +0 -12
  42. arkitekt_next/bloks/services/config.py +0 -13
  43. arkitekt_next/bloks/services/db.py +0 -23
  44. arkitekt_next/bloks/services/gateway.py +0 -29
  45. arkitekt_next/bloks/services/livekit.py +0 -20
  46. arkitekt_next/bloks/services/lok.py +0 -20
  47. arkitekt_next/bloks/services/mount.py +0 -9
  48. arkitekt_next/bloks/services/name.py +0 -11
  49. arkitekt_next/bloks/services/ollama.py +0 -21
  50. arkitekt_next/bloks/services/redis.py +0 -19
  51. arkitekt_next/bloks/services/s3.py +0 -21
  52. arkitekt_next/bloks/services/secret.py +0 -16
  53. arkitekt_next/bloks/services/socket.py +0 -13
  54. arkitekt_next/bloks/socket.py +0 -40
  55. arkitekt_next/bloks/tailscale.py +0 -90
  56. {arkitekt_next-0.15.0.dist-info → arkitekt_next-0.17.0.dist-info}/WHEEL +0 -0
  57. {arkitekt_next-0.15.0.dist-info → arkitekt_next-0.17.0.dist-info}/entry_points.txt +0 -0
  58. {arkitekt_next-0.15.0.dist-info → arkitekt_next-0.17.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,215 +0,0 @@
1
- from arkitekt_next.bloks.services.channel import ChannelService
2
- from blok import blok, InitContext, Option
3
- from blok.tree import YamlFile, Repo
4
- from typing import Any, Optional, Protocol
5
- from blok.utils import check_protocol_compliance
6
- from dataclasses import asdict
7
- from arkitekt_next.bloks.services import (
8
- GatewayService,
9
- DBService,
10
- RedisService,
11
- S3Service,
12
- ConfigService,
13
- MountService,
14
- AdminService,
15
- SecretService,
16
- LokService,
17
- )
18
-
19
- from blok.bloks.services.dns import DnsService
20
-
21
-
22
- class DefaultService(Protocol):
23
- dev: bool
24
- repo: str
25
- command: str
26
- service_name: str
27
- host: str
28
- buckets: list[str]
29
- scopes: dict[str, str]
30
- secret_key: str
31
- mount_repo: bool
32
- build_repo: bool
33
-
34
- def get_blok_meta(self) -> str: ...
35
-
36
- def get_builder(self) -> str: ...
37
-
38
-
39
- def create_default_service_dependencies():
40
- return [
41
- DnsService,
42
- GatewayService,
43
- DBService,
44
- RedisService,
45
- S3Service,
46
- ConfigService,
47
- MountService,
48
- AdminService,
49
- SecretService,
50
- LokService,
51
- ]
52
-
53
-
54
- class BaseArkitektService:
55
- def get_additional_config(self):
56
- return {}
57
-
58
- def preflight(
59
- self,
60
- init: InitContext,
61
- lok: LokService,
62
- db: DBService,
63
- redis: RedisService,
64
- s3: S3Service,
65
- config: ConfigService,
66
- mount: MountService,
67
- admin: AdminService,
68
- secret: SecretService,
69
- gateway: GatewayService,
70
- mount_repo: bool = False,
71
- host: str = "",
72
- image: str = "",
73
- secret_key: str = "",
74
- build_repo: bool = False,
75
- command: str = "",
76
- repo: str = "",
77
- disable: bool = False,
78
- dev: bool = False,
79
- ):
80
- deps = init.dependencies
81
-
82
- lok.register_scopes(self.scopes)
83
-
84
- path_name = self.host
85
-
86
- if gateway:
87
- print("Registering gateway access")
88
- gateway_access = gateway.expose(path_name, 80, self.host)
89
-
90
- postgress_access = db.register_db(self.host)
91
- redis_access = redis.register()
92
- lok_access = lok.retrieve_credentials()
93
- admin_access = admin.retrieve()
94
- minio_access = s3.create_buckets(self.buckets)
95
- lok_labels = lok.retrieve_labels(
96
- self.get_blok_meta().service_identifier, self.get_builder()
97
- )
98
-
99
- django_secret = secret.retrieve_secret()
100
-
101
- csrf_trusted_origins = []
102
-
103
- configuration = YamlFile(
104
- **{
105
- "db": asdict(postgress_access),
106
- "django": {
107
- "admin": asdict(admin_access),
108
- "debug": True,
109
- "hosts": ["*"],
110
- "secret_key": django_secret,
111
- },
112
- "redis": asdict(redis_access),
113
- "lok": asdict(lok_access),
114
- "s3": asdict(minio_access),
115
- "scopes": self.scopes,
116
- "force_script_name": path_name,
117
- "csrf_trusted_origins": csrf_trusted_origins,
118
- **self.get_additional_config(),
119
- }
120
- )
121
-
122
- config_mount = init.get_service(ConfigService).register_config(
123
- f"{self.host}.yaml", configuration
124
- )
125
-
126
- depends_on = []
127
-
128
- if redis_access.dependency:
129
- depends_on.append(redis_access.dependency)
130
-
131
- if postgress_access.dependency:
132
- depends_on.append(postgress_access.dependency)
133
-
134
- if minio_access.dependency:
135
- depends_on.append(minio_access.dependency)
136
-
137
- service = {
138
- "labels": lok_labels,
139
- "volumes": [f"{config_mount}:/workspace/config.yaml"],
140
- "depends_on": depends_on,
141
- }
142
-
143
- if mount_repo or dev:
144
- mount = init.get_service(MountService).register_mount(self.host, Repo(repo))
145
- service["volumes"].extend([f"{mount}:/workspace"])
146
-
147
- if build_repo or dev:
148
- mount = init.get_service(MountService).register_mount(self.host, Repo(repo))
149
- service["build"] = mount
150
- else:
151
- service["image"] = image
152
-
153
- service["command"] = command
154
-
155
- self.service = service
156
-
157
- def get_additional_options(self):
158
- return []
159
-
160
- def get_options(self):
161
- return [
162
- Option(
163
- subcommand="dev",
164
- help="Shoud we run the service in development mode (includes withrepo, mountrepo)?",
165
- default=self.dev,
166
- ),
167
- Option(
168
- subcommand="host",
169
- help="The name we should use for the host?",
170
- default=self.host,
171
- ),
172
- Option(
173
- subcommand="disable",
174
- help="Shoud we disable the service?",
175
- default=False,
176
- ),
177
- Option(
178
- subcommand="repo",
179
- help="Which repo should we use when building the service? Only active if build_repo or mount_repo is active",
180
- default=self.repo,
181
- ),
182
- Option(
183
- subcommand="command",
184
- help="Which command should we use when building the service?",
185
- default=self.command,
186
- ),
187
- Option(
188
- subcommand="mount_repo",
189
- help="Should we mount the repo into the container?",
190
- type=bool,
191
- default=self.mount_repo,
192
- ),
193
- Option(
194
- subcommand="build_repo",
195
- help="Should we build the container from the repo?",
196
- type=bool,
197
- default=self.build_repo,
198
- ),
199
- Option(
200
- subcommand="host",
201
- help="How should the service be named inside the docker-compose file?",
202
- default=self.host,
203
- ),
204
- Option(
205
- subcommand="secret_key",
206
- help="The secret key to use for the django service",
207
- default=self.secret_key,
208
- ),
209
- Option(
210
- subcommand="image",
211
- help="The image to use for the service",
212
- default=self.image,
213
- ),
214
- *self.get_additional_options(),
215
- ]
@@ -1,27 +0,0 @@
1
- from pydantic import BaseModel
2
- from typing import Dict, Any
3
- from blok import blok, InitContext, Option
4
- from arkitekt_next.bloks.services.channel import ChannelService
5
-
6
-
7
- @blok(ChannelService, description="The current channel of the application")
8
- class ChannelBlok:
9
- def __init__(self) -> None:
10
- self.name = "default"
11
-
12
- def preflight(self, init: InitContext):
13
- for key, value in init.kwargs.items():
14
- setattr(self, key, value)
15
-
16
- def retrieve(self):
17
- return self.name
18
-
19
- def get_options(self):
20
- with_name = Option(
21
- subcommand="name",
22
- help="Which channel name to use",
23
- default=self.name,
24
- show_default=True,
25
- )
26
-
27
- return [with_name]
@@ -1,43 +0,0 @@
1
- from pydantic import BaseModel
2
- from typing import Dict, Any
3
- from blok import blok, InitContext, Option, ExecutionContext
4
- from blok.tree import YamlFile
5
- from arkitekt_next.bloks.services.config import ConfigService
6
-
7
-
8
- class AdminCredentials(BaseModel):
9
- password: str
10
- username: str
11
- email: str
12
-
13
-
14
- @blok(ConfigService)
15
- class ConfigBlok:
16
- def __init__(self) -> None:
17
- self.config_path = "configs"
18
- self.registered_configs = {}
19
-
20
- def preflight(self, init: InitContext):
21
- for key, value in init.kwargs.items():
22
- setattr(self, key, value)
23
-
24
- def build(self, ex: ExecutionContext):
25
- for name, file in self.registered_configs.items():
26
- ex.file_tree.set_nested(*f"{self.config_path}/{name}".split("/"), file)
27
-
28
- def register_config(self, name: str, file: YamlFile) -> str:
29
- self.registered_configs[name] = file
30
- return f"./{self.config_path}/" + name
31
-
32
- def get_path(self, name: str) -> str:
33
- return f"./{self.config_path}/" + name
34
-
35
- def get_options(self):
36
- config_path = Option(
37
- subcommand="config_path",
38
- help="Which path to use for configs",
39
- default=self.config_path,
40
- show_default=True,
41
- )
42
-
43
- return [config_path]
@@ -1,42 +0,0 @@
1
- import click
2
- from pydantic import BaseModel
3
- from typing import Dict, Any
4
- import yaml
5
- import secrets
6
- from blok import blok, InitContext
7
-
8
- from blok import blok, InitContext, ExecutionContext, Option
9
- from blok.tree import YamlFile, Repo
10
- from arkitekt_next.bloks.base import BaseArkitektService
11
-
12
-
13
- class AccessCredentials(BaseModel):
14
- password: str
15
- username: str
16
- host: str
17
- port: str
18
- db_name: str
19
-
20
-
21
- @blok("live.arkitekt.elektro", description="Mikro is the bio-image database for arkitekt")
22
- class ElektroBlok(BaseArkitektService):
23
- def __init__(self) -> None:
24
- self.dev = False
25
- self.host = "elektro"
26
- self.command = "bash run-debug.sh"
27
- self.repo = "https://github.com/jhnnsrs/elektro-server"
28
- self.scopes = {
29
- "mikro_read": "Read image from the database",
30
- "mikro_write": "Write image to the database",
31
- }
32
- self.image = "jhnnsrs/elektro:nightly"
33
- self.mount_repo = False
34
- self.build_repo = False
35
- self.buckets = ["media", "zarr", "parquet"]
36
- self.secret_key = secrets.token_hex(16)
37
-
38
- def get_builder(self):
39
- return "arkitekt.generic"
40
-
41
- def build(self, context: ExecutionContext):
42
- context.docker_compose.set_nested("services", self.host, self.service)
@@ -1,33 +0,0 @@
1
- import secrets
2
-
3
- from blok import blok, InitContext, ExecutionContext, Option
4
- from blok.tree import YamlFile, Repo
5
- from arkitekt_next.bloks.base import BaseArkitektService
6
- from typing import List
7
-
8
-
9
- DEFAULT_ARKITEKT_URL = "http://localhost:8000"
10
-
11
-
12
- @blok(
13
- "live.arkitekt.fluss", description="A service for managing workflows and their data"
14
- )
15
- class FlussBlok(BaseArkitektService):
16
- def __init__(self) -> None:
17
- self.dev = False
18
- self.host = "fluss"
19
- self.command = "bash run-debug.sh"
20
- self.image = "jhnnsrs/fluss_next:nightly"
21
- self.repo = "https://github.com/jhnnsrs/fluss-server-next"
22
- self.scopes = {"read_image": "Read image from the database"}
23
- self.mount_repo = False
24
- self.build_repo = False
25
- self.buckets = ["media"]
26
- self.secret_key = secrets.token_hex(16)
27
- self.ensured_repos: List[str] = []
28
-
29
- def get_builder(self):
30
- return "arkitekt.generic"
31
-
32
- def build(self, context: ExecutionContext):
33
- context.docker_compose.set_nested("services", self.host, self.service)
@@ -1,230 +0,0 @@
1
- from arkitekt_next.bloks.services.certer import CerterService
2
- from arkitekt_next.bloks.services.name import NameService
3
- from blok import blok, InitContext, ExecutionContext, Option
4
- from blok.tree import YamlFile, Repo
5
- from pydantic import BaseModel
6
- from typing import Dict, Any, Optional
7
-
8
- from blok import blok, InitContext
9
- from blok.bloks.services.dns import DnsService
10
-
11
- DEFAULT_PUBLIC_URLS = ["127.0.0.1"]
12
- DEFAULT_PUBLIC_HOSTS = ["localhost"]
13
-
14
-
15
- class ExposedHost(BaseModel):
16
- host: str
17
- port: int
18
- stip_prefix: bool = True
19
-
20
-
21
- class ExpostedToHost(BaseModel):
22
- port: int
23
- host: str
24
- to: str
25
- tls: bool = False
26
-
27
-
28
- class ExposedPort(BaseModel):
29
- port: int
30
- host: str
31
- tls: bool = False
32
- to: int
33
-
34
-
35
- @blok(
36
- "live.arkitekt.gateway",
37
- description="A gateway for exposing services on the host",
38
- )
39
- class CaddyBlok:
40
- def __init__(self) -> None:
41
- self.exposed_hosts = {}
42
- self.exposed_to_hosts = {}
43
- self.http_expose_default = None
44
- self.exposed_ports = {}
45
- self.with_certer = True
46
- self.with_tailscale = True
47
- self.certer_image = "jhnnsrs/certer:next"
48
- self.http_port = 80
49
- self.https_port = 443
50
- self.public_ips = DEFAULT_PUBLIC_URLS
51
- self.public_hosts = DEFAULT_PUBLIC_HOSTS
52
- self.cert_mount = None
53
- self.depends_on = []
54
-
55
- def get_internal_host(self):
56
- return "caddy"
57
-
58
- def get_https_port(self):
59
- return 443
60
-
61
- def get_http_port(self):
62
- return 80
63
-
64
- def retrieve_gateway_network(self):
65
- return self.gateway_network
66
-
67
- def preflight(
68
- self,
69
- init: InitContext,
70
- name: NameService,
71
- certs: CerterService,
72
- ):
73
- for key, value in init.kwargs.items():
74
- setattr(self, key, value)
75
-
76
- self.cert_mount = certs.retrieve_certs_mount()
77
- self.depends_on = certs.retrieve_depends_on()
78
-
79
- self.gateway_network = name.retrieve_name().replace("-", "_")
80
-
81
- def build(
82
- self,
83
- context: ExecutionContext,
84
- ):
85
- caddyfile = """
86
- {
87
- auto_https off
88
- }
89
- """
90
-
91
- for key, port in self.exposed_ports.items():
92
- if port.tls:
93
- caddyfile += f"""
94
- :{port.port} {{
95
- reverse_proxy {port.host}:{port.to}
96
- }}
97
- """
98
- else:
99
- caddyfile += f"""
100
- :{port.port} {{
101
- reverse_proxy {port.host}:{port.to}
102
- }}
103
- """
104
-
105
- for protocol in ["http", "https"]:
106
- caddyfile += f"""
107
- {protocol}:// {{
108
- """
109
- caddyfile += (
110
- """
111
- """
112
- if protocol == "https" and self.cert_mount
113
- else ""
114
- )
115
- caddyfile += """
116
- header {
117
- -Server
118
- X-Forwarded-Proto {scheme}
119
- X-Forwarded-For {remote}
120
- X-Forwarded-Port {server_port}
121
- X-Forwarded-Host {host}
122
- }
123
- """
124
-
125
- for path_name, exposed_host in self.exposed_hosts.items():
126
- if exposed_host.stip_prefix:
127
- caddyfile += f"""
128
- @{path_name} path /{path_name}*
129
- handle @{path_name} {{
130
- uri strip_prefix /{path_name}
131
- reverse_proxy {exposed_host.host}:{exposed_host.port}
132
- }}
133
- """
134
- else:
135
- caddyfile += f"""
136
- @{path_name} path /{path_name}*
137
- handle @{path_name} {{
138
- reverse_proxy {exposed_host.host}:{exposed_host.port}
139
- }}
140
- """
141
-
142
- for path_name, exposed_to_host in self.exposed_to_hosts.items():
143
- caddyfile += f"""
144
- @{path_name} path /{path_name}*
145
- handle @{path_name} {{
146
- rewrite * /{exposed_to_host.to}{{uri}}
147
- reverse_proxy {exposed_to_host.host}:{exposed_to_host.port}
148
- }}
149
- """
150
-
151
- if self.http_expose_default:
152
- caddyfile += f"""
153
- handle {{
154
- reverse_proxy {self.http_expose_default.host}:{self.http_expose_default.port}
155
- }}
156
- """
157
-
158
- caddyfile += """
159
- }
160
- """
161
-
162
- context.file_tree.set_nested("configs", "Caddyfile", caddyfile)
163
-
164
- caddy_depends_on = self.depends_on
165
-
166
- exposed_ports_strings = [
167
- f"{port.port}:{port.port}" for port in self.exposed_ports.values()
168
- ]
169
-
170
- volumes = ["./configs/Caddyfile:/etc/caddy/Caddyfile"]
171
- if self.cert_mount:
172
- volumes.append(f"{self.cert_mount}:/certs")
173
-
174
- caddy_container = {
175
- "image": "caddy:latest",
176
- "ports": [
177
- f"{self.http_port}:80",
178
- f"{self.https_port}:443",
179
- ]
180
- + exposed_ports_strings,
181
- "volumes": volumes,
182
- "networks": [self.gateway_network, "default"],
183
- }
184
-
185
- context.docker_compose.set_nested("services", "caddy", caddy_container)
186
-
187
- context.docker_compose.set_nested(
188
- "networks",
189
- self.gateway_network,
190
- {"driver": "bridge", "name": self.gateway_network},
191
- )
192
-
193
- def expose(self, path_name: str, port: int, host: str, strip_prefix: bool = False):
194
- self.exposed_hosts[path_name] = ExposedHost(
195
- host=host, port=port, stip_prefix=strip_prefix
196
- )
197
-
198
- def expose_mapped(self, path_name: str, port: int, host: str, to: str):
199
- self.exposed_to_hosts[path_name] = ExpostedToHost(host=host, port=port, to=to)
200
-
201
- def expose_default(self, port: int, host: str):
202
- self.http_expose_default = ExposedHost(host=host, port=port, stip_prefix=False)
203
-
204
- def expose_port(self, port: int, host: str, tls: bool = False):
205
- self.exposed_ports[port] = ExposedPort(port=port, host=host, tls=tls, to=port)
206
-
207
- def expose_port_to(self, port: int, host: str, to_port: int, tls: bool = False):
208
- self.exposed_ports[port] = ExposedPort(
209
- port=port, host=host, tls=tls, to=to_port
210
- )
211
-
212
- def get_options(self):
213
- with_public_urls = Option(
214
- subcommand="public_url",
215
- help="Which public urls to use",
216
- type=str,
217
- multiple=True,
218
- default=DEFAULT_PUBLIC_URLS,
219
- show_default=True,
220
- )
221
- with_public_services = Option(
222
- subcommand="public_hosts",
223
- help="Which public hosts to use",
224
- type=str,
225
- multiple=True,
226
- default=DEFAULT_PUBLIC_HOSTS,
227
- show_default=True,
228
- )
229
-
230
- return [with_public_urls, with_public_services]
@@ -1,95 +0,0 @@
1
- from typing import Dict, Any
2
- import secrets
3
-
4
- from arkitekt_next.bloks.lok import LokBlok
5
- from arkitekt_next.bloks.services.gateway import GatewayService
6
- from arkitekt_next.bloks.socket import DockerSocketBlok
7
- from blok import blok, InitContext, ExecutionContext, Option
8
- from blok.bloks.services.dns import DnsService
9
- from blok.tree import YamlFile, Repo
10
-
11
-
12
- @blok(
13
- "live.arkitekt.internal_engine",
14
- description="An Arkitekt plugin engine running inside a docker container",
15
- )
16
- class InternalDockerBlok:
17
- def __init__(self) -> None:
18
- self.host = "internal_docker"
19
-
20
- self.image = "jhnnsrs/deployer:nightly"
21
- self.instance_id = "INTERNAL_DOCKER"
22
-
23
- def preflight(
24
- self,
25
- init: InitContext,
26
- gateway: GatewayService,
27
- lok: LokBlok,
28
- socket: DockerSocketBlok,
29
- ):
30
- for key, value in init.kwargs.items():
31
- setattr(self, key, value)
32
-
33
- deps = init.dependencies
34
-
35
- if self.skip:
36
- return
37
-
38
- self._socket = socket.register_socket(self.host)
39
- self.gateway_host = gateway.get_internal_host()
40
- self.gateway_port = gateway.get_http_port()
41
-
42
- self.token = lok.retrieve_token()
43
-
44
- self.gateway_network = gateway.retrieve_gateway_network()
45
-
46
- self.command = f"arkitekt-next run prod --redeem-token={self.token} --url http://{self.gateway_host}:{self.gateway_port}"
47
-
48
- self.initialized = True
49
-
50
- def build(self, context: ExecutionContext):
51
- if self.skip:
52
- return
53
- db_service = {
54
- "image": self.image,
55
- "command": self.command,
56
- "volumes": [f"{self._socket}:/var/run/docker.sock"],
57
- "environment": {
58
- "INSTANCE_ID": self.instance_id,
59
- "ARKITEKT_GATEWAY": f"http://{self.gateway_host}:{self.gateway_port}",
60
- "ARKITEKT_NETWORK": self.gateway_network,
61
- },
62
- "deploy": {
63
- "restart_policy": {
64
- "condition": "on-failure",
65
- "delay": "10s",
66
- "max_attempts": 10,
67
- "window": "300s",
68
- },
69
- },
70
- }
71
-
72
- context.docker_compose.set_nested("services", self.host, db_service)
73
-
74
- def get_options(self):
75
- with_host = Option(
76
- subcommand="host",
77
- help="The host of this service",
78
- default=self.host,
79
- )
80
- with_skip = Option(
81
- subcommand="skip",
82
- help="Should we skip creating this service?",
83
- default=False,
84
- type=bool,
85
- )
86
-
87
- return [
88
- with_host,
89
- with_skip,
90
- ]
91
-
92
- def __str__(self) -> str:
93
- return (
94
- f"InterDocker(host={self.host}, command={self.command}, image={self.image})"
95
- )