local-development-gateway 0.2.3 → 0.2.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c8606a508df46ba2018a8cd768c86e6a41ce38a5ef7caedff7c5832017d34e38
4
- data.tar.gz: ebd5a8310bcb5b235d0c00c717813873b73e6061d6333f89ba188818636b3162
3
+ metadata.gz: 769fae659862a5e04bbb1f4c1d572552afe3f777f4bbbd4ec007fa02860639c6
4
+ data.tar.gz: e704decf7f614cb01a2a74ae1601fa6e925da9c243b3b4015ea9760e8ec45ae0
5
5
  SHA512:
6
- metadata.gz: cb84da27199e8af6e78189f9025240ae090ae84372e3ccbd3f1d25240e18a4710a3eb16f32793b2e1411bc0bb9d9f0535f9a4ff5955815cc1b0eda322680fdd8
7
- data.tar.gz: e0e3a2a24e3f039d516a150496b37527ff98d6549aafaeeb0aca5b36116f68ed24bb5f3948c35ab3555efeca1c40267d334f233d50a46aa7dbf55c50333b62e5
6
+ metadata.gz: 247d626136bee33123253a419d036812041b6e5df6094b14b262f5bc6be7ac629083aea1b717b64f8b29afce69b245b739fff47c0bcebc53c80b496351dbbb50
7
+ data.tar.gz: 6954a6378a4aecf2d6c3d6eef08d8be001abfd2fc5c1758314b37b777d795ea6e7e7f16ec647eb128b0930353128f8c6f7be25539b1444d629f2dddd35e2ec7a
data/README.md CHANGED
@@ -148,6 +148,21 @@ substitutes for private aliases. Database cloning is independent of this
148
148
  hostname correction: it selects source/destination containers explicitly and
149
149
  connects locally.
150
150
 
151
+ ### Private database alias length
152
+
153
+ The complete `${COMPOSE_PROJECT_NAME}-<database-service>` alias is one DNS label. [DNS limits each label to 63 octets](https://www.rfc-editor.org/rfc/rfc1035.html#section-2.3.4); for these ASCII names, that is 63 characters. Budget the project name against the longest database service suffix in the stack: `63 - 1 - <service-name length>`.
154
+
155
+ | Database service | Appended suffix | Maximum project-name length |
156
+ | --- | --- | ---: |
157
+ | `db` | `-db` | 60 |
158
+ | `db_trav_com` | `-db_trav_com` | 51 |
159
+
160
+ A 60-character project name plus `-db` fits exactly; 61 characters produces a 64-character alias. With `-db_trav_com`, the corresponding boundary is 51/52 characters. These are DNS budgets, not a claim that Compose rejects oversized aliases: `docker compose config` can render an alias that exceeds the limit. Configuration rendering alone does not prove DNS resolution or database connectivity.
161
+
162
+ Use the effective project name selected by [Compose's native precedence](https://docs.docker.com/compose/how-tos/project-name/): `-p`, then `COMPOSE_PROJECT_NAME`, top-level `name:`, and the directory-derived default. Inspect the rendered `name`, database aliases, and application/job/test host settings through the consumer's documented wrapper and selected Compose files. Do not implement a separate project-name resolver, truncate/hash names automatically, or change existing short identities.
163
+
164
+ For a new disposable stack, explicitly choose a unique project name within the budget before creating resources. For an existing stack, changing its project name can select different project-scoped volumes and appear to lose its database. Preserve the current project identity and data; any necessary rename requires an explicit consumer-owned data migration, not an automatic gateway correction. Keep qualified aliases private and desktop gateway hostnames unchanged. The gem neither validates nor shortens consumer aliases; upgrading it does not repair an oversized name.
165
+
151
166
  ### Canonical development and test Compose pattern
152
167
 
153
168
  Merge these entries into the project's existing development base and gateway
@@ -309,7 +324,8 @@ retaining cancellation-aware PostgreSQL routing despite Traefik's STARTTLS suppo
309
324
 
310
325
  1. Give each concurrent checkout a distinct Compose project name and desktop
311
326
  route hostname. Qualify every API/job/test database host with
312
- `${COMPOSE_PROJECT_NAME}-<database-service>` using its existing driver setting.
327
+ `${COMPOSE_PROJECT_NAME}-<database-service>` using its existing driver setting,
328
+ within the [suffix-specific DNS budget](#private-database-alias-length).
313
329
  2. Advertise each qualified alias only on its private `default` network;
314
330
  preserve it through mapping-form network merges in base-only and gateway modes.
315
331
  3. Remove fixed database publications from development/test stacks; retain
@@ -434,6 +450,10 @@ It mounts the Docker socket so it can discover labelled containers. A read-only
434
450
  | A project uses normal ports unexpectedly | Confirm the gateway container is running and has `local-gateway=true`. |
435
451
  | Authentication rejects the callback | Confirm the generated hostname matches the allowed wildcard callback pattern. |
436
452
 
453
+ ## Release 0.2.4
454
+
455
+ - Document suffix-specific DNS length budgets for private database aliases and data-safe project-name handling. No alias validation, shortening, routing, or lifecycle behavior changes.
456
+
437
457
  ## Release 0.2.3
438
458
 
439
459
  - Status and healthy CLI reuse distinguish the installed gem version from each active shared service, reporting mismatches and unknown legacy provenance without restarting services.
@@ -44,6 +44,8 @@ preserves `default.aliases`. Configure all application/job/test contexts with
44
44
  their appropriate aliases, existing credentials, and intended database names;
45
45
  test contexts still select their own test database.
46
46
 
47
+ The README's [private-alias length contract](../../README.md#private-database-alias-length) defines the DNS budget for each service suffix. Native Compose project selection and existing data identities remain authoritative; the gateway does not shorten or rename consumer projects.
48
+
47
49
  Gateway-mode development and test stacks publish no database host ports.
48
50
  Container consumers work with the base alone. Desktop access without the
49
51
  gateway is an explicit project-local port-publishing overlay, not an inherited
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LocalDevelopmentGateway
4
- VERSION = "0.2.3"
4
+ VERSION = "0.2.4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: local-development-gateway
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marlen Brunner