python-ship 0.3.0__py3-none-any.whl → 0.4.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.
- python_ship/__init__.py +1 -1
- python_ship/cli.py +13 -12
- python_ship/config.py +1 -1
- python_ship/environment.py +1 -1
- python_ship/production.py +1 -1
- python_ship/schema/service-environment.json +2 -0
- python_ship/schema/ship.schema.json +7 -1
- python_ship/service_setup.py +1 -0
- python_ship/services.py +42 -2
- python_ship/terminal.py +5 -7
- {python_ship-0.3.0.dist-info → python_ship-0.4.0.dist-info}/METADATA +22 -6
- {python_ship-0.3.0.dist-info → python_ship-0.4.0.dist-info}/RECORD +16 -16
- {python_ship-0.3.0.dist-info → python_ship-0.4.0.dist-info}/WHEEL +0 -0
- {python_ship-0.3.0.dist-info → python_ship-0.4.0.dist-info}/entry_points.txt +0 -0
- {python_ship-0.3.0.dist-info → python_ship-0.4.0.dist-info}/licenses/LICENSE.md +0 -0
- {python_ship-0.3.0.dist-info → python_ship-0.4.0.dist-info}/top_level.txt +0 -0
python_ship/__init__.py
CHANGED
python_ship/cli.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""The `ship` command line, built on Typer.
|
|
2
2
|
|
|
3
3
|
The command set mirrors PHP Ship: init, up, down, exec, shell, logs, db,
|
|
4
|
-
|
|
4
|
+
check, build and release, plus proxies (npm, uv, and each framework
|
|
5
5
|
adapter's console commands such as Django's `manage`).
|
|
6
6
|
"""
|
|
7
7
|
|
|
@@ -79,7 +79,7 @@ class ShipHelpGroup(TyperGroup):
|
|
|
79
79
|
continue
|
|
80
80
|
group = getattr(command, "rich_help_panel", None) or "Other commands"
|
|
81
81
|
summary = command.get_short_help_str(max(20, formatter.width - 24))
|
|
82
|
-
groups.setdefault(group, []).append((
|
|
82
|
+
groups.setdefault(group, []).append((name, summary))
|
|
83
83
|
for group, rows in groups.items():
|
|
84
84
|
if rows:
|
|
85
85
|
with formatter.section(group):
|
|
@@ -272,7 +272,7 @@ def read_config(project: Path) -> ShipConfig:
|
|
|
272
272
|
return ShipConfig.read(project)
|
|
273
273
|
|
|
274
274
|
|
|
275
|
-
# Checks shared by
|
|
275
|
+
# Checks shared by check, doctor, up, build and release -------------------------------------------
|
|
276
276
|
|
|
277
277
|
def config_problems(project: Path, *, production: bool = True) -> list[str]:
|
|
278
278
|
"""Every independent problem with ship.json, Docker files and both Compose models, in one pass.
|
|
@@ -361,7 +361,7 @@ def create_app(adapter_commands: dict[str, list[str]] | None = None) -> typer.Ty
|
|
|
361
361
|
help="Docker development environments and portable releases for Python web apps.",
|
|
362
362
|
no_args_is_help=True,
|
|
363
363
|
add_completion=True,
|
|
364
|
-
rich_markup_mode=None,
|
|
364
|
+
rich_markup_mode="rich" if terminal.use_color() else None,
|
|
365
365
|
pretty_exceptions_enable=False,
|
|
366
366
|
)
|
|
367
367
|
|
|
@@ -499,10 +499,9 @@ def create_app(adapter_commands: dict[str, list[str]] | None = None) -> typer.Ty
|
|
|
499
499
|
"""Open a database's interactive client, using credentials from its own container."""
|
|
500
500
|
return execute(lambda: database_shell(instance))
|
|
501
501
|
|
|
502
|
-
@app.command("
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
"""Validate settings and Compose models without Docker (alias: config:test)."""
|
|
502
|
+
@app.command("check", rich_help_panel="Troubleshooting", short_help="Validate settings without Docker.")
|
|
503
|
+
def check_command() -> int:
|
|
504
|
+
"""Validate settings and both Compose models without Docker."""
|
|
506
505
|
def action() -> int:
|
|
507
506
|
terminal.heading("Ship configuration check")
|
|
508
507
|
project = root()
|
|
@@ -515,7 +514,7 @@ def create_app(adapter_commands: dict[str, list[str]] | None = None) -> typer.Ty
|
|
|
515
514
|
warning = stub_version_warning(project)
|
|
516
515
|
if warning:
|
|
517
516
|
warnings.append(warning)
|
|
518
|
-
terminal.diagnostics("Warnings", warnings, color=typer.colors.
|
|
517
|
+
terminal.diagnostics("Warnings", warnings, color=typer.colors.BRIGHT_YELLOW)
|
|
519
518
|
terminal.success("ship.json, Docker files and both Compose models are valid.")
|
|
520
519
|
return 0
|
|
521
520
|
return execute(action)
|
|
@@ -641,14 +640,16 @@ def create_app(adapter_commands: dict[str, list[str]] | None = None) -> typer.Ty
|
|
|
641
640
|
"""List all commands or show help for one command."""
|
|
642
641
|
parent = ctx.find_root()
|
|
643
642
|
if command is None:
|
|
644
|
-
|
|
643
|
+
if text := parent.get_help():
|
|
644
|
+
typer.echo(text)
|
|
645
645
|
return 0
|
|
646
646
|
selected = cast(TyperGroup, parent.command).get_command(parent, command)
|
|
647
647
|
if selected is None:
|
|
648
648
|
terminal.error(f"No such command {command!r}.")
|
|
649
649
|
return 2
|
|
650
650
|
with selected.make_context(command, [], parent=parent, resilient_parsing=True) as child:
|
|
651
|
-
|
|
651
|
+
if text := selected.get_help(child):
|
|
652
|
+
typer.echo(text)
|
|
652
653
|
return 0
|
|
653
654
|
|
|
654
655
|
for name, command_prefix in (adapter_commands or {}).items():
|
|
@@ -841,7 +842,7 @@ def discover_adapter_commands(project: Path) -> dict[str, list[str]]:
|
|
|
841
842
|
"""The selected adapter's console commands, registered like PHP Ship's artisan/console.
|
|
842
843
|
|
|
843
844
|
A project whose ship.json can't be read yet simply gets no extra commands;
|
|
844
|
-
`ship
|
|
845
|
+
`ship check` reports why.
|
|
845
846
|
"""
|
|
846
847
|
if not (project / "ship.json").is_file():
|
|
847
848
|
return {}
|
python_ship/config.py
CHANGED
|
@@ -42,7 +42,7 @@ SILO_IMAGES = ("standard", "distroless")
|
|
|
42
42
|
GROUPS_SUPPORTING_ADDITIONAL_INSTANCES = ("database", "cache", "storage", "search", "mail")
|
|
43
43
|
# Ship's own commands; a process or a framework console command can't take these names.
|
|
44
44
|
RESERVED_COMMANDS = frozenset({
|
|
45
|
-
"init", "up", "down", "ps", "run", "exec", "shell", "logs", "db", "check", "
|
|
45
|
+
"init", "up", "down", "ps", "run", "exec", "shell", "logs", "db", "check", "build", "release", "help",
|
|
46
46
|
"npm", "pnpm", "yarn", "package-manager", "test", "uv", "doctor",
|
|
47
47
|
})
|
|
48
48
|
|
python_ship/environment.py
CHANGED
|
@@ -27,7 +27,7 @@ _DEVELOPMENT_TOOLS = frozenset({
|
|
|
27
27
|
})
|
|
28
28
|
_SECTIONS = {
|
|
29
29
|
"Application": ("APP_", "DJANGO_", "FLASK_", "DEBUG", "FORWARDED_ALLOW_IPS"),
|
|
30
|
-
"Database": ("DB_", "MONGODB_"), "Cache": ("REDIS_", "MEMCACHED_", "VALKEY_"),
|
|
30
|
+
"Database": ("DB_", "MONGODB_", "CLICKHOUSE_"), "Cache": ("REDIS_", "MEMCACHED_", "VALKEY_"),
|
|
31
31
|
"Object storage": ("AWS_", "GARAGE_", "RUSTFS_", "SEAWEEDFS_", "SILO_"),
|
|
32
32
|
"Search": ("MEILISEARCH_", "ELASTICSEARCH_", "TYPESENSE_"), "Mail": ("MAIL_", "MAILPIT_"),
|
|
33
33
|
"Messaging and events": ("AMQP_", "RABBITMQ_", "CELERY_", "CENTRIFUGO_", "MERCURE_"),
|
python_ship/production.py
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"centrifugo": ["CENTRIFUGO_API_KEY", "CENTRIFUGO_TOKEN_SECRET", "CENTRIFUGO_URL"],
|
|
3
|
+
"clickhouse": ["CLICKHOUSE_DB", "CLICKHOUSE_HOST", "CLICKHOUSE_HTTP_URL", "CLICKHOUSE_PASSWORD", "CLICKHOUSE_PORT", "CLICKHOUSE_USER"],
|
|
3
4
|
"elasticsearch": ["ELASTICSEARCH_HOST", "ELASTICSEARCH_PASSWORD", "ELASTICSEARCH_USERNAME"],
|
|
4
5
|
"garage": ["AWS_ACCESS_KEY_ID", "AWS_BUCKET", "AWS_DEFAULT_REGION", "AWS_ENDPOINT", "AWS_SECRET_ACCESS_KEY", "AWS_USE_PATH_STYLE_ENDPOINT"],
|
|
5
6
|
"mailpit": ["MAIL_HOST", "MAIL_PORT"],
|
|
6
7
|
"mariadb": ["DB_DATABASE", "DB_HOST", "DB_PASSWORD", "DB_PORT", "DB_USERNAME"],
|
|
7
8
|
"meilisearch": ["MEILISEARCH_HOST", "MEILISEARCH_KEY"],
|
|
8
9
|
"memcached": ["MEMCACHED_HOST", "MEMCACHED_PORT"],
|
|
10
|
+
"mercure": ["MERCURE_JWT_ISSUER", "MERCURE_JWT_SECRET", "MERCURE_PUBLIC_URL", "MERCURE_URL"],
|
|
9
11
|
"mongodb": ["MONGODB_DATABASE", "MONGODB_HOST", "MONGODB_PASSWORD", "MONGODB_PORT", "MONGODB_USERNAME"],
|
|
10
12
|
"mysql": ["DB_DATABASE", "DB_HOST", "DB_PASSWORD", "DB_PORT", "DB_USERNAME"],
|
|
11
13
|
"playwright": ["PLAYWRIGHT_BASE_URL", "PW_TEST_CONNECT_WS_ENDPOINT"],
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
},
|
|
103
103
|
"portPublishing": {
|
|
104
104
|
"type": "object",
|
|
105
|
-
"description": "
|
|
105
|
+
"description": "Explicitly select the generated ports to publish per environment. Takes precedence over publishPorts. Development binds to localhost; production can bind to all host interfaces. Empty lists publish no ports in that environment.",
|
|
106
106
|
"additionalProperties": false,
|
|
107
107
|
"required": ["development", "production"],
|
|
108
108
|
"properties": {
|
|
@@ -318,6 +318,12 @@
|
|
|
318
318
|
],
|
|
319
319
|
"description": "JavaScript: Runtime strategy. Supported modes depend on the framework adapter."
|
|
320
320
|
},
|
|
321
|
+
"javascriptRuntime": {
|
|
322
|
+
"type": "string",
|
|
323
|
+
"enum": ["node", "bun"],
|
|
324
|
+
"default": "node",
|
|
325
|
+
"description": "JavaScript: Runtime for server package scripts. Bun availability depends on the selected framework and deployment mode."
|
|
326
|
+
},
|
|
321
327
|
"serverEntry": {
|
|
322
328
|
"anyOf": [
|
|
323
329
|
{
|
python_ship/service_setup.py
CHANGED
|
@@ -15,6 +15,7 @@ _CLIENTS = {
|
|
|
15
15
|
"mariadb": (("PyMySQL", "mariadb", "mysqlclient", "aiomysql", "asyncmy"),),
|
|
16
16
|
"mongodb": (("pymongo", "motor"),),
|
|
17
17
|
"sqlserver": (("pyodbc", "pymssql"),),
|
|
18
|
+
"clickhouse": (("clickhouse-connect", "clickhouse-driver"),),
|
|
18
19
|
"redis": (("redis", "valkey"),), "valkey": (("redis", "valkey"),),
|
|
19
20
|
"memcached": (("pymemcache", "pylibmc", "python-memcached"),),
|
|
20
21
|
"meilisearch": (("meilisearch", "meilisearch-python-sdk", "httpx", "requests"),),
|
python_ship/services.py
CHANGED
|
@@ -112,6 +112,43 @@ class MySqlService:
|
|
|
112
112
|
return ["sh", "-c", 'exec mysql -u"$MYSQL_USER" -p"$MYSQL_PASSWORD" "$MYSQL_DATABASE"']
|
|
113
113
|
|
|
114
114
|
|
|
115
|
+
class ClickHouseService:
|
|
116
|
+
key = "clickhouse"
|
|
117
|
+
group = "database"
|
|
118
|
+
label = "ClickHouse"
|
|
119
|
+
CLIENT = ('exec clickhouse-client --host 127.0.0.1 --database "$CLICKHOUSE_DB" '
|
|
120
|
+
'--user "$CLICKHOUSE_USER" --password "$CLICKHOUSE_PASSWORD"')
|
|
121
|
+
|
|
122
|
+
def compose_fragment(self, context: ServiceContext) -> dict[str, dict[str, Any]]:
|
|
123
|
+
connection = self.app_environment(context)
|
|
124
|
+
prefix = context.env_prefix
|
|
125
|
+
return {context.service_name: {
|
|
126
|
+
"image": "clickhouse/clickhouse-server:26.8",
|
|
127
|
+
"expose": [8123, 9000],
|
|
128
|
+
"environment": {key: connection[prefix + key] for key in ("CLICKHOUSE_DB", "CLICKHOUSE_USER", "CLICKHOUSE_PASSWORD")},
|
|
129
|
+
"volumes": [f"{context.resource_name}_data:/var/lib/clickhouse"],
|
|
130
|
+
"ulimits": {"nofile": {"soft": 262144, "hard": 262144}},
|
|
131
|
+
"healthcheck": _healthcheck(
|
|
132
|
+
["CMD-SHELL", self.CLIENT.replace("$", "$$") + " --query 'SELECT 1'"],
|
|
133
|
+
timeout="5s", retries=20, start_period="20s",
|
|
134
|
+
),
|
|
135
|
+
}}
|
|
136
|
+
|
|
137
|
+
def app_environment(self, context: ServiceContext) -> dict[str, str]:
|
|
138
|
+
prefix = context.env_prefix
|
|
139
|
+
return {
|
|
140
|
+
f"{prefix}CLICKHOUSE_DB": context.setting("CLICKHOUSE_DB", "analytics"),
|
|
141
|
+
f"{prefix}CLICKHOUSE_HOST": context.service_name,
|
|
142
|
+
f"{prefix}CLICKHOUSE_PORT": "9000",
|
|
143
|
+
f"{prefix}CLICKHOUSE_HTTP_URL": f"http://{context.service_name}:8123",
|
|
144
|
+
f"{prefix}CLICKHOUSE_USER": context.setting("CLICKHOUSE_USER", "ship"),
|
|
145
|
+
f"{prefix}CLICKHOUSE_PASSWORD": context.credential("CLICKHOUSE_PASSWORD", "ship"),
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
def database_shell(self, context: ServiceContext) -> list[str]:
|
|
149
|
+
return ["sh", "-c", self.CLIENT]
|
|
150
|
+
|
|
151
|
+
|
|
115
152
|
class RedisService:
|
|
116
153
|
key = "redis"
|
|
117
154
|
group = "cache"
|
|
@@ -192,7 +229,10 @@ class RabbitMQService:
|
|
|
192
229
|
"environment": {
|
|
193
230
|
"RABBITMQ_DEFAULT_USER": context.setting("RABBITMQ_USER", "app"),
|
|
194
231
|
"RABBITMQ_DEFAULT_PASS": context.credential("RABBITMQ_PASSWORD", "ship"),
|
|
195
|
-
"RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS":
|
|
232
|
+
"RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS": (
|
|
233
|
+
"-rabbitmq_management_agent disable_metrics_collector true"
|
|
234
|
+
" -rabbitmq_management disable_stats true enable_queue_totals true"
|
|
235
|
+
),
|
|
196
236
|
},
|
|
197
237
|
"volumes": [f"{context.resource_name}_data:/var/lib/rabbitmq"],
|
|
198
238
|
"healthcheck": _healthcheck(["CMD", "rabbitmq-diagnostics", "-q", "ping"],
|
|
@@ -428,7 +468,7 @@ class NodeService:
|
|
|
428
468
|
|
|
429
469
|
|
|
430
470
|
_BUILTINS: list[ServiceDefinition] = [
|
|
431
|
-
PostgresService(), MySqlService(), RedisService(), RabbitMQService(), CeleryService(), MailpitService(),
|
|
471
|
+
PostgresService(), MySqlService(), ClickHouseService(), RedisService(), RabbitMQService(), CeleryService(), MailpitService(),
|
|
432
472
|
MeilisearchService(), MercureService(), SeleniumService(), PlaywrightService(), NodeService(), *BUILTIN_STORAGE, *BUILTIN_PORTABLE,
|
|
433
473
|
]
|
|
434
474
|
BUILTIN_SERVICES: dict[str, ServiceDefinition] = {service.key: service for service in _BUILTINS}
|
python_ship/terminal.py
CHANGED
|
@@ -23,10 +23,6 @@ def use_color(*, err: bool = False) -> bool:
|
|
|
23
23
|
return stream.isatty() and os.environ.get("TERM") != "dumb" and "NO_COLOR" not in os.environ
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
def command_name(name: str) -> str:
|
|
27
|
-
return typer.style(name, fg=typer.colors.CYAN, bold=True) if use_color() else name
|
|
28
|
-
|
|
29
|
-
|
|
30
26
|
def heading(title: str) -> None:
|
|
31
27
|
typer.secho(f"\n{title}", fg=typer.colors.CYAN, bold=True, color=use_color())
|
|
32
28
|
|
|
@@ -47,11 +43,13 @@ def success(message: str) -> None:
|
|
|
47
43
|
typer.secho(f"[OK] {message}", fg=typer.colors.GREEN, bold=True, color=use_color())
|
|
48
44
|
|
|
49
45
|
|
|
50
|
-
def diagnostics(title: str, messages: Sequence[str], *, color: str = typer.colors.
|
|
46
|
+
def diagnostics(title: str, messages: Sequence[str], *, color: str = typer.colors.BRIGHT_RED) -> None:
|
|
51
47
|
if messages:
|
|
52
|
-
|
|
48
|
+
colored = use_color(err=True)
|
|
49
|
+
typer.secho(f"\n{title}", fg=color, bold=True, err=True, color=colored)
|
|
50
|
+
bullet = typer.style("-", fg=color) if colored else "-"
|
|
53
51
|
for message in messages:
|
|
54
|
-
typer.echo(f"
|
|
52
|
+
typer.echo(f" {bullet} {message}", err=True, color=colored)
|
|
55
53
|
|
|
56
54
|
|
|
57
55
|
def table(title: str, headers: tuple[str, ...], rows: Sequence[tuple[str, ...]]) -> None:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-ship
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Framework-agnostic, cross-platform Docker development environment and portable releases for Python web apps.
|
|
5
5
|
Author: python-ship
|
|
6
6
|
License-Expression: MIT
|
|
@@ -212,7 +212,7 @@ options and examples.
|
|
|
212
212
|
| `ship shell [service]` | Opens a shell (`sh`) in a service; defaults to the app. |
|
|
213
213
|
| `ship logs [service] [-f]` | Shows logs for one service, or all of them. `-f`/`--follow` streams. |
|
|
214
214
|
| `ship db [instance]` | Opens the database's client (`psql`/`mysql`/`mariadb`/`mongosh`/`sqlcmd`) with credentials from its own container. Name one of `additionalServices`' databases to open that instance instead. |
|
|
215
|
-
| `ship check` | Validates `ship.json`, published files, both Compose models, and required production settings without Docker. Groups errors and warnings.
|
|
215
|
+
| `ship check` | Validates `ship.json`, published files, both Compose models, and required production settings without Docker. Groups errors and warnings. |
|
|
216
216
|
| `ship doctor` | Shows project and runtime versions, published templates, and a color-coded table of development service states, health, images, and ports. Lists problems with recovery commands. |
|
|
217
217
|
| `ship uv <args...>` | Runs uv dependency commands (`add`, `remove`, `lock`, `tree`, ...) in a temporary container with the project's Python. See [Dependencies](#dependencies-and-ship-uv). |
|
|
218
218
|
| `ship npm/pnpm/yarn <args...>` | Runs the selected, exactly pinned tool in the Node frontend service. The manifest and lockfile remain authoritative. |
|
|
@@ -284,6 +284,22 @@ client dependencies and connects using those settings.
|
|
|
284
284
|
| MariaDB (`mariadb`) | The `DB_*` settings, a separate root credential, and `ship db` | A MySQL/MariaDB driver |
|
|
285
285
|
| MongoDB (`mongodb`) | Separate app and admin users, `MONGODB_DATABASE`, and an encoded `MONGODB_URI` at app startup | A client such as `pymongo` and your framework's MongoDB backend, if needed |
|
|
286
286
|
| SQL Server (`sqlserver`) | An application database and login, `DB_*` settings, and `ship db`. The image uses linux/amd64 and defaults to Developer edition. | A driver such as `pymssql` or `pyodbc` with its native driver. Set `MSSQL_PID` in `.env.production` to select the edition for deployment. |
|
|
287
|
+
| ClickHouse (`clickhouse`) | `CLICKHOUSE_*` settings, an authenticated `ship db` console, and a persistent volume | A driver such as `clickhouse-connect` over HTTP or `clickhouse-driver` for the native protocol. Set `CLICKHOUSE_PASSWORD` in `.env.production` |
|
|
288
|
+
|
|
289
|
+
ClickHouse uses HTTP on `CLICKHOUSE_HTTP_URL` (8123) and the native protocol
|
|
290
|
+
on `CLICKHOUSE_HOST` and `CLICKHOUSE_PORT` (9000). Pass `CLICKHOUSE_DB`,
|
|
291
|
+
`CLICKHOUSE_USER`, and `CLICKHOUSE_PASSWORD` to the client. Add a named
|
|
292
|
+
instance to keep another primary database. [ClickHouse Python integration](https://clickhouse.com/integrations/python)
|
|
293
|
+
|
|
294
|
+
```sh
|
|
295
|
+
ship init --no-interaction --database postgres --additional-service database=clickhouse:warehouse
|
|
296
|
+
ship up
|
|
297
|
+
ship db warehouse
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
The named instance uses `WAREHOUSE_CLICKHOUSE_*` variables, including the
|
|
301
|
+
required `WAREHOUSE_CLICKHOUSE_PASSWORD` in `.env.production`. Select the
|
|
302
|
+
HTTP or native port in port publishing when a host client needs access.
|
|
287
303
|
|
|
288
304
|
For example, Django can configure PostgreSQL and Redis from the container's
|
|
289
305
|
environment in `settings.py`.
|
|
@@ -623,7 +639,7 @@ manifest for the services you selected.
|
|
|
623
639
|
Re-running `ship init` keeps your `docker/ship/Dockerfile`. Use `ship init --force`
|
|
624
640
|
to replace it with the version matching the installed package. Ship records the
|
|
625
641
|
version that published the Dockerfile in `docker/ship/.ship-version`, and `ship up`,
|
|
626
|
-
`ship init` and `ship
|
|
642
|
+
`ship init` and `ship check` warn when it differs from what's installed.
|
|
627
643
|
|
|
628
644
|
### Multiple instances of a service
|
|
629
645
|
|
|
@@ -790,7 +806,7 @@ Ship enforces the following minimum Python versions for application images.
|
|
|
790
806
|
|
|
791
807
|
It is enforced at three points:
|
|
792
808
|
|
|
793
|
-
- **`ship init`, `ship
|
|
809
|
+
- **`ship init`, `ship check` and every command that generates a
|
|
794
810
|
Compose file** reject an end-of-life `python` branch, or a pinned patch
|
|
795
811
|
release below the floor (`"3.13.4"`).
|
|
796
812
|
- **The Dockerfile's `base` stage** runs `docker/ship/check-python-security-floor.py`
|
|
@@ -808,7 +824,7 @@ ships a security release.
|
|
|
808
824
|
`ship init` appends required production setting names to `.env.production`
|
|
809
825
|
with empty values, preserving existing values and comments. Fill them before
|
|
810
826
|
building. It also merges development settings into `.env.example` and `.env`.
|
|
811
|
-
`ship
|
|
827
|
+
`ship check`, `build` and `release` reject missing required credentials
|
|
812
828
|
and known development defaults. The release copies the file privately unless
|
|
813
829
|
`--no-env` is requested. With no required settings, an absent file is allowed.
|
|
814
830
|
|
|
@@ -816,7 +832,7 @@ Selected services' secrets (`DB_PASSWORD`, `DB_ROOT_PASSWORD`,
|
|
|
816
832
|
`MEILISEARCH_KEY`, `AWS_SECRET_ACCESS_KEY`, `GARAGE_RPC_SECRET`,
|
|
817
833
|
`GARAGE_ADMIN_TOKEN`, each with its instance prefix where one applies) are
|
|
818
834
|
*required* in production: Compose itself refuses to start without them, and
|
|
819
|
-
`ship
|
|
835
|
+
`ship check`/`ship build`/`ship release` check before Docker is invoked
|
|
820
836
|
— reporting a missing value, or one still set to a development default such
|
|
821
837
|
as `ship`. Non-secret settings (`DB_DATABASE`, `DB_USERNAME`, `AWS_BUCKET`, ...) keep
|
|
822
838
|
their defaults unless you set them.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
python_ship/__init__.py,sha256=
|
|
1
|
+
python_ship/__init__.py,sha256=xr1IpihDzN7m271cJgwQ-2hV3rgaJrAxy6A_0m10BxQ,104
|
|
2
2
|
python_ship/__main__.py,sha256=k1ocEWawweo1qCJWNFAAvyxz3tcY13dzvCenHszij30,48
|
|
3
3
|
python_ship/adapters.py,sha256=mIakAXGetcrfZixu_Htl2Zh-lV9yaUCeuT8RN4nBv6c,15764
|
|
4
4
|
python_ship/build_environment.py,sha256=uM2egp6hPo4UcRmVv7u6UcEMzD17b8-L-b27Ax91Yrg,3413
|
|
5
5
|
python_ship/capabilities.py,sha256=XCqpRIkjXgJDCTiZmxzG2SI62emBsDHxazoeteTRFL4,3320
|
|
6
|
-
python_ship/cli.py,sha256=
|
|
6
|
+
python_ship/cli.py,sha256=D5nPtIh3uCRqtRLPDSQqJY82WbbHdF8WxQt8p8XfH3Y,45267
|
|
7
7
|
python_ship/compose.py,sha256=NW3u0G-7pe5d_yYC8WYb5khwFuQuqru_t_tAgOB3_fQ,26412
|
|
8
|
-
python_ship/config.py,sha256=
|
|
8
|
+
python_ship/config.py,sha256=Rz2eQ0czi_vD6BdbjpVw1HohSuHb6NlDGE6mqJamPzU,20541
|
|
9
9
|
python_ship/contracts.py,sha256=kjXxI5TNAOpdgmosOMUNXXjwjtNEuOQwFDaFu9ay3AM,9799
|
|
10
|
-
python_ship/environment.py,sha256=
|
|
10
|
+
python_ship/environment.py,sha256=yutuJ72ZGth-kXaqkOo9tHiOkOmr7H9iDgCcUqfYNWo,13845
|
|
11
11
|
python_ship/image_build.py,sha256=oi9CwCurGDMi1JBzj4qi6GQN1jvSt313Mn0xP_zO_Ug,5661
|
|
12
12
|
python_ship/init.py,sha256=nEitf3NCXW_WJkUq0LVnpGRHHEGeStOCEPRCn1tBoIs,34628
|
|
13
13
|
python_ship/layout.py,sha256=q8QK_sy7AXF5mAHJAO3hmnwB1a5rI-SkA18U2bxhnKM,1718
|
|
@@ -17,31 +17,31 @@ python_ship/plugins.py,sha256=rXB8PAh7GcIUthA3ymTZ-AzDtc8BaUAJnVByS7_t8tY,8849
|
|
|
17
17
|
python_ship/portable.py,sha256=331hzOj6X7AmXFX6g3ZoCqOby7CKsRoW0iHZeDRjCWo,6479
|
|
18
18
|
python_ship/portable_data.py,sha256=yYn3AwSuowQ0S2UnMwqwZSeIFY1BxWU6Ay4qrhETRbk,48938
|
|
19
19
|
python_ship/ports.py,sha256=AE2DQuOmLRsJJtM6jYhCYMacMbTPagsGIQffOQ93xzM,4631
|
|
20
|
-
python_ship/production.py,sha256=
|
|
20
|
+
python_ship/production.py,sha256=_iBj3gJD43JLAuJe54nA1Q4LEEKpMzBE9L0D5SLps5Q,2822
|
|
21
21
|
python_ship/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
22
|
python_ship/release.py,sha256=zfbKannhflXoqbASYt5mwbhYQpEGcRcehmD3QG25VPo,16096
|
|
23
23
|
python_ship/runtime.py,sha256=2wB5XVg21ZssuDZBeh6MWAoqU4f5hRe-M4Jor2Uw2x0,3873
|
|
24
24
|
python_ship/security.py,sha256=wBo2jekewTzVNoftWnvrCOijYkB2eUz5DxVRKKCo8UA,2629
|
|
25
25
|
python_ship/servers.py,sha256=rIaaMbTB4_t_DhkvsXab0fmO2nvEtb5cYLx3ybZZaeM,3368
|
|
26
|
-
python_ship/service_setup.py,sha256=
|
|
27
|
-
python_ship/services.py,sha256=
|
|
26
|
+
python_ship/service_setup.py,sha256=FsUphBKG0TjapbKueUdpGTHyuucLJNDIqMSui9bcgRw,3934
|
|
27
|
+
python_ship/services.py,sha256=AQ3fLb2_xjjKhl9b1tTuTW6HvagjV_SZGT0ijDOXuS4,21752
|
|
28
28
|
python_ship/storage.py,sha256=Ll7yigosLbZqJbnh5Ntd2Bf0EZHYiRRKxIlZfEJUGlY,7339
|
|
29
29
|
python_ship/stubs.py,sha256=PJDgbtg_k44tx8teF6HmUGmHeo_OIvS63buGuOyNyjs,8433
|
|
30
|
-
python_ship/terminal.py,sha256=
|
|
30
|
+
python_ship/terminal.py,sha256=oXHyrXv6QujCAaJ4M2F_U-TyDi-aAUiUtdb28ASXSCU,2899
|
|
31
31
|
python_ship/uv.py,sha256=_NELn6a4PYdq7K4LGyKRb0kyRsFpYqVjULirDpPVBbg,3376
|
|
32
32
|
python_ship/wizard.py,sha256=g8njZ9VJmvBtjFDRyBljT7W4XBSDr-kluH58NVir5M8,5677
|
|
33
|
-
python_ship/schema/service-environment.json,sha256=
|
|
33
|
+
python_ship/schema/service-environment.json,sha256=4HecfHCiqiaamkAkNAP_-r1UTH6zF7GvTeaOtWyGRIQ,2000
|
|
34
34
|
python_ship/schema/ship-release.schema.json,sha256=BJxmNkuD9jNL0kBWbYchSdFC3dgEDhAuVi5HWv3Qsy0,8273
|
|
35
|
-
python_ship/schema/ship.schema.json,sha256=
|
|
35
|
+
python_ship/schema/ship.schema.json,sha256=zBU5dv_D4Ay4-8VdUci__mceCGrYyN0a4lzaNLo9YWQ,16274
|
|
36
36
|
python_ship/templates/Dockerfile,sha256=qsu1sXr5uzbRy0RYAo475MZ80534TIgwAwfS8XTeCQ0,3185
|
|
37
37
|
python_ship/templates/app-entrypoint.py,sha256=-HL-DjzHBZZaCUotDHViYYObUyDgLMnrVCn9EbuPbPY,1994
|
|
38
38
|
python_ship/templates/check-python-security-floor.py,sha256=8UvBGh7XX_qoEe1NeoxB-DsrQ2gfwcGXc-pPwTj3IAc,1832
|
|
39
39
|
python_ship/templates/launcher,sha256=TcoumKFQtWyKWbFKLjEsZe4YmPpNVegHavPxvJbj3tM,1581
|
|
40
40
|
python_ship/templates/garage/Dockerfile,sha256=bulpfvK5xjQFDhOmJolbGOdLOpu0TBXsMK6xOcQz_6Y,256
|
|
41
41
|
python_ship/templates/garage/garage.toml,sha256=SV8CYLYDaou99VMVI4N-2G834MF3slJBQ2mmHCHfmOk,295
|
|
42
|
-
python_ship-0.
|
|
43
|
-
python_ship-0.
|
|
44
|
-
python_ship-0.
|
|
45
|
-
python_ship-0.
|
|
46
|
-
python_ship-0.
|
|
47
|
-
python_ship-0.
|
|
42
|
+
python_ship-0.4.0.dist-info/licenses/LICENSE.md,sha256=82tuTayuI7C-K_-jxlNgcAOass1QQt7lebfTvJqIIts,1068
|
|
43
|
+
python_ship-0.4.0.dist-info/METADATA,sha256=q_ciTeYzsEeGYEpQfE79NAMM837-yvQTuNYvkaV8RJc,58868
|
|
44
|
+
python_ship-0.4.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
45
|
+
python_ship-0.4.0.dist-info/entry_points.txt,sha256=LqIW1kxhNk9CCKCJIXX3CBAC_45Bqs19LrQDvcoQR1o,46
|
|
46
|
+
python_ship-0.4.0.dist-info/top_level.txt,sha256=ENnxUiHxEFOtRd1s0XrcozD1nQBIJPZEb_H0p6oU3qw,12
|
|
47
|
+
python_ship-0.4.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|