container-superposition 0.1.6 → 0.1.8
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.
- package/README.md +24 -15
- package/dist/scripts/init.js +1 -1534
- package/dist/scripts/init.js.map +1 -1
- package/dist/tool/cli/args.d.ts +20 -0
- package/dist/tool/cli/args.d.ts.map +1 -0
- package/dist/tool/cli/args.js +325 -0
- package/dist/tool/cli/args.js.map +1 -0
- package/dist/tool/cli/run.d.ts +2 -0
- package/dist/tool/cli/run.d.ts.map +1 -0
- package/dist/tool/cli/run.js +318 -0
- package/dist/tool/cli/run.js.map +1 -0
- package/dist/tool/commands/adopt.d.ts.map +1 -1
- package/dist/tool/commands/adopt.js +1 -27
- package/dist/tool/commands/adopt.js.map +1 -1
- package/dist/tool/commands/doctor.d.ts +3 -0
- package/dist/tool/commands/doctor.d.ts.map +1 -1
- package/dist/tool/commands/doctor.js +1068 -70
- package/dist/tool/commands/doctor.js.map +1 -1
- package/dist/tool/commands/explain.d.ts.map +1 -1
- package/dist/tool/commands/explain.js +18 -0
- package/dist/tool/commands/explain.js.map +1 -1
- package/dist/tool/commands/migrate.d.ts +7 -0
- package/dist/tool/commands/migrate.d.ts.map +1 -0
- package/dist/tool/commands/migrate.js +52 -0
- package/dist/tool/commands/migrate.js.map +1 -0
- package/dist/tool/questionnaire/answers.d.ts +16 -0
- package/dist/tool/questionnaire/answers.d.ts.map +1 -0
- package/dist/tool/questionnaire/answers.js +102 -0
- package/dist/tool/questionnaire/answers.js.map +1 -0
- package/dist/tool/questionnaire/composer.d.ts +3 -3
- package/dist/tool/questionnaire/composer.d.ts.map +1 -1
- package/dist/tool/questionnaire/composer.js +902 -37
- package/dist/tool/questionnaire/composer.js.map +1 -1
- package/dist/tool/questionnaire/presets.d.ts +60 -0
- package/dist/tool/questionnaire/presets.d.ts.map +1 -0
- package/dist/tool/questionnaire/presets.js +164 -0
- package/dist/tool/questionnaire/presets.js.map +1 -0
- package/dist/tool/questionnaire/questionnaire.d.ts +10 -0
- package/dist/tool/questionnaire/questionnaire.d.ts.map +1 -0
- package/dist/tool/questionnaire/questionnaire.js +580 -0
- package/dist/tool/questionnaire/questionnaire.js.map +1 -0
- package/dist/tool/schema/manifest-migrations.d.ts +5 -0
- package/dist/tool/schema/manifest-migrations.d.ts.map +1 -1
- package/dist/tool/schema/manifest-migrations.js +45 -0
- package/dist/tool/schema/manifest-migrations.js.map +1 -1
- package/dist/tool/schema/overlay-loader.d.ts.map +1 -1
- package/dist/tool/schema/overlay-loader.js +25 -0
- package/dist/tool/schema/overlay-loader.js.map +1 -1
- package/dist/tool/schema/project-config.d.ts +14 -2
- package/dist/tool/schema/project-config.d.ts.map +1 -1
- package/dist/tool/schema/project-config.js +277 -34
- package/dist/tool/schema/project-config.js.map +1 -1
- package/dist/tool/schema/target-rules.d.ts +78 -0
- package/dist/tool/schema/target-rules.d.ts.map +1 -0
- package/dist/tool/schema/target-rules.js +367 -0
- package/dist/tool/schema/target-rules.js.map +1 -0
- package/dist/tool/schema/types.d.ts +123 -12
- package/dist/tool/schema/types.d.ts.map +1 -1
- package/dist/tool/utils/merge.d.ts.map +1 -1
- package/dist/tool/utils/merge.js +9 -0
- package/dist/tool/utils/merge.js.map +1 -1
- package/dist/tool/utils/parameters.d.ts +76 -0
- package/dist/tool/utils/parameters.d.ts.map +1 -0
- package/dist/tool/utils/parameters.js +125 -0
- package/dist/tool/utils/parameters.js.map +1 -0
- package/dist/tool/utils/paths.d.ts +2 -0
- package/dist/tool/utils/paths.d.ts.map +1 -0
- package/dist/tool/utils/paths.js +31 -0
- package/dist/tool/utils/paths.js.map +1 -0
- package/docs/creating-overlays.md +151 -2
- package/docs/deployment-targets.md +88 -56
- package/docs/examples.md +20 -17
- package/docs/filesystem-contract.md +5 -0
- package/docs/minimal-and-editor.md +65 -5
- package/docs/overlay-imports.md +202 -101
- package/docs/overlays.md +162 -34
- package/docs/quick-reference.md +99 -0
- package/docs/specs/003-mkdocs2-overlay/spec.md +114 -0
- package/docs/specs/004-doctor-fix/spec.md +70 -0
- package/docs/specs/005-cuda-overlay/spec.md +101 -0
- package/docs/specs/006-rocm-overlay/spec.md +109 -0
- package/docs/specs/007-init-project-file/spec.md +66 -0
- package/docs/specs/007-target-aware-generation/spec.md +126 -0
- package/docs/specs/008-project-file-canonical/spec.md +83 -0
- package/docs/specs/009-project-env/spec.md +147 -0
- package/docs/specs/010-compose-env-materialization/spec.md +130 -0
- package/docs/specs/011-overlay-parameters/spec.md +235 -0
- package/overlays/.shared/README.md +105 -21
- package/overlays/.shared/compose/common-healthchecks.md +60 -0
- package/overlays/.shared/compose/nvidia-gpu-devcontainer.yml +22 -0
- package/overlays/.shared/vscode/recommended-extensions.json +15 -11
- package/overlays/alertmanager/setup.sh +4 -19
- package/overlays/alertmanager/verify.sh +8 -9
- package/overlays/all/README.md +43 -0
- package/overlays/all/devcontainer.patch.json +6 -0
- package/overlays/all/overlay.yml +14 -0
- package/overlays/amp/setup.sh +5 -0
- package/overlays/bun/setup.sh +10 -1
- package/overlays/bun/verify.sh +6 -1
- package/overlays/claude-code/setup.sh +5 -0
- package/overlays/cloudflared/setup.sh +9 -12
- package/overlays/codex/README.md +9 -6
- package/overlays/codex/devcontainer.patch.json +7 -1
- package/overlays/codex/setup.sh +5 -0
- package/overlays/codex/verify.sh +8 -0
- package/overlays/comfyui/.env.example +34 -0
- package/overlays/comfyui/README.md +342 -0
- package/overlays/comfyui/devcontainer.patch.json +15 -0
- package/overlays/comfyui/docker-compose.yml +39 -0
- package/overlays/comfyui/overlay.yml +20 -0
- package/overlays/comfyui/setup.sh +36 -0
- package/overlays/comfyui/verify.sh +103 -0
- package/overlays/commitlint/setup.sh +5 -0
- package/overlays/cuda/README.md +179 -0
- package/overlays/cuda/devcontainer.patch.json +7 -0
- package/overlays/cuda/overlay.yml +17 -0
- package/overlays/cuda/setup.sh +32 -0
- package/overlays/cuda/verify.sh +38 -0
- package/overlays/devcontainer-cli/README.md +50 -0
- package/overlays/devcontainer-cli/devcontainer.patch.json +13 -0
- package/overlays/devcontainer-cli/overlay.yml +16 -0
- package/overlays/devcontainer-cli/setup.sh +14 -0
- package/overlays/direnv/devcontainer.patch.json +6 -0
- package/overlays/direnv/setup.sh +7 -6
- package/overlays/dotnet/setup.sh +14 -7
- package/overlays/duckdb/devcontainer.patch.json +1 -2
- package/overlays/gcloud/devcontainer.patch.json +0 -6
- package/overlays/gcloud/setup.sh +51 -0
- package/overlays/gemini-cli/setup.sh +5 -0
- package/overlays/git-helpers/devcontainer.patch.json +2 -1
- package/overlays/go/setup.sh +15 -14
- package/overlays/jaeger/overlay.yml +2 -0
- package/overlays/just/setup.sh +5 -17
- package/overlays/k3d/README.md +201 -0
- package/overlays/k3d/devcontainer.patch.json +9 -0
- package/overlays/k3d/overlay.yml +19 -0
- package/overlays/k3d/setup.sh +34 -0
- package/overlays/k3d/verify.sh +38 -0
- package/overlays/keycloak/docker-compose.yml +6 -4
- package/overlays/keycloak/verify.sh +4 -3
- package/overlays/kind/devcontainer.patch.json +1 -2
- package/overlays/kind/setup.sh +8 -17
- package/overlays/minio/setup.sh +10 -18
- package/overlays/mkdocs/overlay.yml +2 -1
- package/overlays/mkdocs2/README.md +135 -0
- package/overlays/mkdocs2/devcontainer.patch.json +19 -0
- package/overlays/mkdocs2/overlay.yml +17 -0
- package/overlays/mkdocs2/setup.sh +67 -0
- package/overlays/mkdocs2/verify.sh +35 -0
- package/overlays/modern-cli-tools/devcontainer.patch.json +7 -1
- package/overlays/modern-cli-tools/setup.sh +21 -71
- package/overlays/mongodb/devcontainer.patch.json +0 -6
- package/overlays/mongodb/setup.sh +59 -0
- package/overlays/mysql/verify.sh +4 -3
- package/overlays/nats/.env.example +1 -1
- package/overlays/nats/README.md +1 -1
- package/overlays/nats/docker-compose.yml +1 -1
- package/overlays/ngrok/setup.sh +9 -6
- package/overlays/nodejs/setup.sh +5 -0
- package/overlays/ollama/.env.example +14 -0
- package/overlays/ollama/README.md +325 -0
- package/overlays/ollama/devcontainer.patch.json +14 -0
- package/overlays/ollama/docker-compose.yml +24 -0
- package/overlays/ollama/overlay.yml +22 -0
- package/overlays/ollama/setup.sh +106 -0
- package/overlays/ollama/verify.sh +99 -0
- package/overlays/open-webui/.env.example +5 -0
- package/overlays/open-webui/README.md +162 -0
- package/overlays/open-webui/devcontainer.patch.json +14 -0
- package/overlays/open-webui/docker-compose.yml +23 -0
- package/overlays/open-webui/overlay.yml +38 -0
- package/overlays/openapi-tools/devcontainer.patch.json +1 -2
- package/overlays/openapi-tools/setup.sh +9 -8
- package/overlays/opencode/setup.sh +5 -0
- package/overlays/otel-collector/overlay.yml +2 -0
- package/overlays/otel-collector/setup.sh +3 -16
- package/overlays/otel-demo-nodejs/verify.sh +8 -9
- package/overlays/otel-demo-python/verify.sh +16 -10
- package/overlays/pandoc/README.md +22 -15
- package/overlays/pandoc/devcontainer.patch.json +6 -2
- package/overlays/pandoc/setup.sh +217 -18
- package/overlays/pandoc/verify.sh +16 -4
- package/overlays/pgvector/.env.example +6 -0
- package/overlays/pgvector/README.md +215 -0
- package/overlays/pgvector/devcontainer.patch.json +23 -0
- package/overlays/pgvector/docker-compose.yml +32 -0
- package/overlays/pgvector/overlay.yml +44 -0
- package/overlays/playwright/devcontainer.patch.json +3 -1
- package/overlays/playwright/setup.sh +37 -0
- package/overlays/postgres/.env.example +5 -5
- package/overlays/postgres/devcontainer.patch.json +4 -4
- package/overlays/postgres/docker-compose.yml +15 -5
- package/overlays/postgres/overlay.yml +19 -1
- package/overlays/powershell/setup.sh +49 -13
- package/overlays/pre-commit/setup.sh +12 -3
- package/overlays/prometheus/overlay.yml +2 -0
- package/overlays/promtail/verify.sh +16 -10
- package/overlays/pulumi/devcontainer.patch.json +1 -1
- package/overlays/python/setup.sh +28 -9
- package/overlays/python/verify.sh +4 -2
- package/overlays/qdrant/.env.example +4 -0
- package/overlays/qdrant/README.md +216 -0
- package/overlays/qdrant/devcontainer.patch.json +20 -0
- package/overlays/qdrant/docker-compose.yml +25 -0
- package/overlays/qdrant/overlay.yml +40 -0
- package/overlays/redpanda/docker-compose.yml +3 -5
- package/overlays/rocm/README.md +227 -0
- package/overlays/rocm/devcontainer.patch.json +4 -0
- package/overlays/rocm/overlay.yml +17 -0
- package/overlays/rocm/setup.sh +45 -0
- package/overlays/rocm/verify.sh +47 -0
- package/overlays/rust/setup.sh +11 -18
- package/overlays/skaffold/README.md +256 -0
- package/overlays/skaffold/devcontainer.patch.json +9 -0
- package/overlays/skaffold/overlay.yml +20 -0
- package/overlays/skaffold/setup.sh +33 -0
- package/overlays/skaffold/verify.sh +24 -0
- package/overlays/spec-kit/setup.sh +7 -3
- package/overlays/sqlite/setup.sh +14 -14
- package/overlays/sqlserver/docker-compose.yml +3 -3
- package/overlays/sqlserver/verify.sh +22 -5
- package/overlays/tempo/verify.sh +16 -10
- package/overlays/tilt/devcontainer.patch.json +1 -2
- package/overlays/tilt/setup.sh +14 -4
- package/overlays/windsurf-cli/setup.sh +27 -4
- package/overlays/windsurf-cli/verify.sh +13 -3
- package/package.json +4 -2
- package/templates/scripts/setup-utils.sh +228 -0
- package/tool/schema/config.schema.json +141 -9
- package/tool/schema/overlay-manifest.schema.json +38 -0
- package/overlays/.shared/compose/common-healthchecks.yml +0 -38
- /package/overlays/otel-demo-nodejs/{Dockerfile-otel-demo-nodejs → Dockerfile} +0 -0
- /package/overlays/otel-demo-nodejs/{package-otel-demo-nodejs.json → package.json} +0 -0
- /package/overlays/otel-demo-nodejs/{server-otel-demo-nodejs.js → server.js} +0 -0
- /package/overlays/otel-demo-nodejs/{tracing-otel-demo-nodejs.js → tracing.js} +0 -0
- /package/overlays/otel-demo-python/{Dockerfile-otel-demo-python → Dockerfile} +0 -0
- /package/overlays/otel-demo-python/{app-otel-demo-python.py → app.py} +0 -0
- /package/overlays/otel-demo-python/{requirements-otel-demo-python.txt → requirements.txt} +0 -0
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
# Deployment Target Support
|
|
2
2
|
|
|
3
|
-
Container Superposition
|
|
3
|
+
Container Superposition generates workspace artifacts and setup guidance tailored to the
|
|
4
|
+
selected deployment environment using the `--target` flag.
|
|
4
5
|
|
|
5
6
|
## Quick Start
|
|
6
7
|
|
|
7
8
|
```bash
|
|
8
|
-
#
|
|
9
|
+
# Default — local development (no additional files)
|
|
10
|
+
npx container-superposition init --stack compose --language nodejs
|
|
11
|
+
|
|
12
|
+
# GitHub Codespaces (adds hostRequirements + CODESPACES.md)
|
|
9
13
|
npx container-superposition init --target codespaces
|
|
14
|
+
|
|
15
|
+
# Gitpod (adds .gitpod.yml + GITPOD.md)
|
|
10
16
|
npx container-superposition init --target gitpod
|
|
11
|
-
npx container-superposition init --target local # default
|
|
12
17
|
|
|
13
|
-
#
|
|
18
|
+
# DevPod (adds devpod.yaml + DEVPOD.md)
|
|
19
|
+
npx container-superposition init --target devpod
|
|
20
|
+
|
|
21
|
+
# Full example for Codespaces
|
|
14
22
|
npx container-superposition init \
|
|
15
23
|
--stack compose \
|
|
16
24
|
--language nodejs \
|
|
@@ -21,24 +29,52 @@ npx container-superposition init \
|
|
|
21
29
|
|
|
22
30
|
## Supported Deployment Targets
|
|
23
31
|
|
|
24
|
-
| Target | Description | Docker Support | Auto Port Forward |
|
|
25
|
-
| -------------- | --------------------------------- | -------------- | ----------------- |
|
|
26
|
-
| **local** | Local machine with Docker Desktop | ✅ Host Docker | No |
|
|
27
|
-
| **codespaces** | GitHub Codespaces (cloud IDE) | ⚠️ DinD only | Yes |
|
|
28
|
-
| **gitpod** | Gitpod workspaces | ⚠️ DinD only | Yes |
|
|
29
|
-
| **devpod** | DevPod client-only environments | ✅ Host Docker | No |
|
|
32
|
+
| Target | Description | Docker Support | Auto Port Forward | Extra Artifacts |
|
|
33
|
+
| -------------- | --------------------------------- | -------------- | ----------------- | -------------------------------------------------------- |
|
|
34
|
+
| **local** | Local machine with Docker Desktop | ✅ Host Docker | No | None (current behavior) |
|
|
35
|
+
| **codespaces** | GitHub Codespaces (cloud IDE) | ⚠️ DinD only | Yes | `hostRequirements` in devcontainer.json; `CODESPACES.md` |
|
|
36
|
+
| **gitpod** | Gitpod workspaces | ⚠️ DinD only | Yes | `.gitpod.yml` at project root; `GITPOD.md` |
|
|
37
|
+
| **devpod** | DevPod client-only environments | ✅ Host Docker | No | `devpod.yaml` at project root; `DEVPOD.md` |
|
|
30
38
|
|
|
31
|
-
##
|
|
39
|
+
## Target-Specific Artifact Inventory
|
|
32
40
|
|
|
33
|
-
###
|
|
41
|
+
### `--target codespaces`
|
|
42
|
+
|
|
43
|
+
| File | Location | Purpose |
|
|
44
|
+
| ------------------- | ---------------- | --------------------------------------------------------------------------------- |
|
|
45
|
+
| `devcontainer.json` | `.devcontainer/` | Extended with `hostRequirements` (cpu/memory/storage recommendation) |
|
|
46
|
+
| `CODESPACES.md` | `.devcontainer/` | How to open the repo in a Codespace; machine-type guidance; port forwarding notes |
|
|
47
|
+
|
|
48
|
+
**Machine size recommendation** is determined automatically from the overlays selected:
|
|
49
|
+
|
|
50
|
+
- 0–1 service overlays → 2-core (default)
|
|
51
|
+
- 2–3 service overlays → 4-core recommended
|
|
52
|
+
- 4+ service overlays → 8-core recommended
|
|
53
|
+
|
|
54
|
+
### `--target gitpod`
|
|
55
|
+
|
|
56
|
+
| File | Location | Purpose |
|
|
57
|
+
| ------------- | ---------------- | ----------------------------------------------------------------------------------- |
|
|
58
|
+
| `.gitpod.yml` | **Project root** | Gitpod workspace config; references devcontainer; declares tasks and port exposures |
|
|
59
|
+
| `GITPOD.md` | `.devcontainer/` | One-click open badge; Gitpod-specific usage notes |
|
|
34
60
|
|
|
35
|
-
|
|
61
|
+
### `--target devpod`
|
|
36
62
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
63
|
+
| File | Location | Purpose |
|
|
64
|
+
| ------------- | ---------------- | ---------------------------------------------------- |
|
|
65
|
+
| `devpod.yaml` | **Project root** | DevPod workspace descriptor; references devcontainer |
|
|
66
|
+
| `DEVPOD.md` | `.devcontainer/` | `devpod up` instructions; provider examples |
|
|
40
67
|
|
|
41
|
-
|
|
68
|
+
### `--target local` / no `--target`
|
|
69
|
+
|
|
70
|
+
No additional files are written. Output is identical to the current local-first workflow.
|
|
71
|
+
|
|
72
|
+
## How It Works
|
|
73
|
+
|
|
74
|
+
### Interactive Mode
|
|
75
|
+
|
|
76
|
+
If you select overlays that may not work in a cloud environment (e.g. `docker-sock`), the tool
|
|
77
|
+
prompts you to choose a target so it can warn about incompatibilities:
|
|
42
78
|
|
|
43
79
|
```
|
|
44
80
|
⚠️ Deployment Target Compatibility Check:
|
|
@@ -56,76 +92,70 @@ Which environment are you targeting?
|
|
|
56
92
|
📦 DevPod
|
|
57
93
|
```
|
|
58
94
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
The target validates your selection and generates the configuration:
|
|
62
|
-
|
|
63
|
-
- Incompatibilities are allowed (you know what you're doing)
|
|
64
|
-
- Generated documentation notes any compatibility issues
|
|
95
|
+
After you confirm the target, the generator produces the appropriate workspace artifacts
|
|
96
|
+
alongside the standard `.devcontainer/` output.
|
|
65
97
|
|
|
66
|
-
|
|
98
|
+
### CLI Mode
|
|
67
99
|
|
|
68
|
-
|
|
100
|
+
Pass `--target` directly — the target is applied without interactive prompts:
|
|
69
101
|
|
|
70
102
|
```bash
|
|
71
103
|
npx container-superposition init \
|
|
72
104
|
--stack compose \
|
|
73
105
|
--language nodejs \
|
|
74
|
-
--database postgres \
|
|
75
106
|
--dev-tools docker-in-docker \
|
|
76
|
-
--target
|
|
107
|
+
--target gitpod
|
|
77
108
|
```
|
|
78
109
|
|
|
79
|
-
###
|
|
110
|
+
### Regeneration
|
|
111
|
+
|
|
112
|
+
The selected target is saved in `superposition.json` as the `target` field. Regeneration
|
|
113
|
+
re-produces the correct artifacts automatically without re-prompting:
|
|
80
114
|
|
|
81
115
|
```bash
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
116
|
+
# superposition.json contains "target": "gitpod"
|
|
117
|
+
npx container-superposition regen # → .gitpod.yml and GITPOD.md reproduced
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
To switch target on regeneration, pass `--target` explicitly:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
npx container-superposition regen --target codespaces
|
|
88
124
|
```
|
|
89
125
|
|
|
126
|
+
Stale artifacts from the previous target (e.g. `.gitpod.yml`) are **removed automatically**
|
|
127
|
+
before the new target's artifacts are written.
|
|
128
|
+
|
|
90
129
|
## Key Compatibility Rules
|
|
91
130
|
|
|
92
131
|
- ⚠️ **docker-sock** requires host Docker → Use in `local` or `devpod` only
|
|
93
132
|
- ✅ **docker-in-docker** works everywhere → Recommended for `codespaces` and `gitpod`
|
|
94
|
-
- 🔄 Cloud targets auto-forward ports → No manual forwarding needed
|
|
133
|
+
- 🔄 Cloud targets auto-forward ports → No manual port forwarding needed
|
|
95
134
|
|
|
96
135
|
## Environment Differences
|
|
97
136
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
### Codespaces/Gitpod
|
|
137
|
+
### Codespaces / Gitpod
|
|
101
138
|
|
|
102
|
-
- **No access to host Docker daemon**
|
|
103
|
-
- **Auto-forward ports**
|
|
104
|
-
- **Cloud-based**
|
|
139
|
+
- **No access to host Docker daemon** — Must use docker-in-docker
|
|
140
|
+
- **Auto-forward ports** — Ports declared in devcontainer.json are automatically accessible
|
|
141
|
+
- **Cloud-based** — Resources may be constrained; machine size matters
|
|
105
142
|
|
|
106
143
|
### Local
|
|
107
144
|
|
|
108
|
-
- **Full access to host Docker**
|
|
109
|
-
- **Faster builds**
|
|
110
|
-
- **Manual port forwarding**
|
|
145
|
+
- **Full access to host Docker** — Can use docker-sock for better performance
|
|
146
|
+
- **Faster builds** — Shared cache with host
|
|
147
|
+
- **Manual port forwarding** — Expose ports explicitly when needed
|
|
111
148
|
|
|
112
149
|
### DevPod
|
|
113
150
|
|
|
114
|
-
- **Client-managed**
|
|
115
|
-
- **Can access host Docker**
|
|
116
|
-
- **Flexible**
|
|
117
|
-
|
|
118
|
-
## Why Deployment Targets?
|
|
119
|
-
|
|
120
|
-
The target system ensures you get warnings about incompatibilities before deploying. This prevents:
|
|
121
|
-
|
|
122
|
-
- Wasted time debugging environment-specific issues
|
|
123
|
-
- Confusion about why overlays don't work in cloud IDEs
|
|
124
|
-
- Having to manually research compatibility
|
|
151
|
+
- **Client-managed** — Runs on your infrastructure (local Docker, cloud VM, etc.)
|
|
152
|
+
- **Can access host Docker** — Depending on provider configuration
|
|
153
|
+
- **Flexible** — Provider chosen at `devpod up` time, not at generation time
|
|
125
154
|
|
|
126
155
|
## Configuration
|
|
127
156
|
|
|
128
|
-
|
|
157
|
+
Deployment target configurations (compatibility rules, port forwarding defaults) are stored in
|
|
158
|
+
`overlays/.registry/deployment-targets.yml`. To add a new target entry:
|
|
129
159
|
|
|
130
160
|
```yaml
|
|
131
161
|
- id: new-target
|
|
@@ -144,6 +174,8 @@ Target configurations are stored in `overlays/.registry/deployment-targets.yml`.
|
|
|
144
174
|
supportsPrivileged: true
|
|
145
175
|
```
|
|
146
176
|
|
|
177
|
+
Target-specific file generation rules are implemented in `tool/schema/target-rules.ts`.
|
|
178
|
+
|
|
147
179
|
## See Also
|
|
148
180
|
|
|
149
181
|
- [Discovery Commands](discovery-commands.md) - Explore overlays before generating
|
package/docs/examples.md
CHANGED
|
@@ -19,9 +19,11 @@ language:
|
|
|
19
19
|
database:
|
|
20
20
|
- postgres
|
|
21
21
|
outputPath: ./.devcontainer
|
|
22
|
+
env:
|
|
23
|
+
APP_ENV: development
|
|
22
24
|
customizations:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
envTemplate:
|
|
26
|
+
POSTGRES_PASSWORD: postgres
|
|
25
27
|
devcontainerPatch:
|
|
26
28
|
features:
|
|
27
29
|
ghcr.io/devcontainers-extra/features/apt-get-packages:1:
|
|
@@ -171,24 +173,25 @@ All examples produce:
|
|
|
171
173
|
|
|
172
174
|
## Customization After Generation
|
|
173
175
|
|
|
174
|
-
|
|
176
|
+
Prefer editing `superposition.yml` and regenerating:
|
|
175
177
|
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
"MY_VAR": "value", // Add environment variables
|
|
187
|
-
},
|
|
188
|
-
}
|
|
178
|
+
```yaml
|
|
179
|
+
# superposition.yml
|
|
180
|
+
containerName: My Custom Name
|
|
181
|
+
env:
|
|
182
|
+
MY_VAR: value
|
|
183
|
+
customizations:
|
|
184
|
+
devcontainerPatch:
|
|
185
|
+
forwardPorts:
|
|
186
|
+
- 3000
|
|
187
|
+
- 8080
|
|
189
188
|
```
|
|
190
189
|
|
|
191
|
-
|
|
190
|
+
Then regenerate:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
npx container-superposition regen
|
|
194
|
+
```
|
|
192
195
|
|
|
193
196
|
## Help and Documentation
|
|
194
197
|
|
|
@@ -11,6 +11,9 @@ your-project/
|
|
|
11
11
|
│ ├── docker-compose.yml # Services (compose stack only)
|
|
12
12
|
│ ├── .env.example # Environment variable templates
|
|
13
13
|
│ ├── ports.json # Port documentation and connection strings
|
|
14
|
+
│ ├── CODESPACES.md # Codespaces setup guidance (--target codespaces only)
|
|
15
|
+
│ ├── GITPOD.md # Gitpod setup guidance (--target gitpod only)
|
|
16
|
+
│ ├── DEVPOD.md # DevPod setup guidance (--target devpod only)
|
|
14
17
|
│ ├── scripts/ # Setup and verification scripts
|
|
15
18
|
│ │ ├── post-create.sh # Runs once when container is created
|
|
16
19
|
│ │ └── post-start.sh # Runs every time container starts
|
|
@@ -18,6 +21,8 @@ your-project/
|
|
|
18
21
|
│ ├── devcontainer.patch.json
|
|
19
22
|
│ └── docker-compose.patch.yml
|
|
20
23
|
├── superposition.json # Manifest file (enables regeneration)
|
|
24
|
+
├── .gitpod.yml # Gitpod workspace config (--target gitpod only)
|
|
25
|
+
├── devpod.yaml # DevPod workspace descriptor (--target devpod only)
|
|
21
26
|
└── .devcontainer.backup-*/ # Automatic backups (gitignored)
|
|
22
27
|
```
|
|
23
28
|
|
|
@@ -86,7 +86,7 @@ container-superposition init --editor vscode
|
|
|
86
86
|
# None - CLI-only, no editor customizations
|
|
87
87
|
container-superposition init --editor none
|
|
88
88
|
|
|
89
|
-
# JetBrains -
|
|
89
|
+
# JetBrains - Generate .idea/ project settings and run configurations
|
|
90
90
|
container-superposition init --editor jetbrains
|
|
91
91
|
```
|
|
92
92
|
|
|
@@ -126,15 +126,61 @@ Removes all editor customizations. Useful for:
|
|
|
126
126
|
|
|
127
127
|
#### jetbrains
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
Generates JetBrains IDE project artifacts and sets the appropriate IDE backend in
|
|
130
|
+
`devcontainer.json`. VS Code customizations are removed.
|
|
130
131
|
|
|
131
132
|
```json
|
|
132
133
|
{
|
|
133
|
-
|
|
134
|
-
|
|
134
|
+
"customizations": {
|
|
135
|
+
"jetbrains": {
|
|
136
|
+
"backend": "WebStorm"
|
|
137
|
+
}
|
|
138
|
+
}
|
|
135
139
|
}
|
|
136
140
|
```
|
|
137
141
|
|
|
142
|
+
The `backend` value is automatically selected based on the primary language overlay:
|
|
143
|
+
|
|
144
|
+
| Language overlay | JetBrains IDE |
|
|
145
|
+
| ------------------------- | --------------------------------- |
|
|
146
|
+
| `nodejs` / `bun` | `WebStorm` |
|
|
147
|
+
| `python` / `mkdocs` | `PyCharm` |
|
|
148
|
+
| `go` | `GoLand` |
|
|
149
|
+
| `dotnet` | `Rider` |
|
|
150
|
+
| `java` | `IntelliJIdea` |
|
|
151
|
+
| `rust` | `RustRover` |
|
|
152
|
+
| none / multiple / unknown | `IntelliJIdea` (generic fallback) |
|
|
153
|
+
|
|
154
|
+
##### Generated artifacts
|
|
155
|
+
|
|
156
|
+
In addition to the `devcontainer.json` update, enabling JetBrains support generates the
|
|
157
|
+
following files in the **project root** (the parent of `.devcontainer/`):
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
.idea/
|
|
161
|
+
.gitignore # shared workspace entries committed to VCS
|
|
162
|
+
runConfigurations/
|
|
163
|
+
npm_dev.xml # Node.js — npm run dev
|
|
164
|
+
python_main.xml # Python — python main.py
|
|
165
|
+
go_run.xml # Go — go run ./...
|
|
166
|
+
dotnet_run.xml # .NET — dotnet run
|
|
167
|
+
java_run.xml # Java — Application run
|
|
168
|
+
rust_run.xml # Rust — cargo run
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Only run configuration files matching the selected language overlays are created.
|
|
172
|
+
|
|
173
|
+
##### Existing `.idea/` directory
|
|
174
|
+
|
|
175
|
+
If `.idea/` already exists (e.g., from a previous generation or user customisation),
|
|
176
|
+
existing files are **never overwritten**. Only files that are missing are written.
|
|
177
|
+
|
|
178
|
+
##### Regenerating with a different editor profile
|
|
179
|
+
|
|
180
|
+
If you later regenerate with `--editor vscode` after a JetBrains generation, the `.idea/`
|
|
181
|
+
directory is **not removed** — it may contain user-created configurations. Switch back
|
|
182
|
+
to `--editor jetbrains` if you want to add new run configurations.
|
|
183
|
+
|
|
138
184
|
### When to Use Editor Profiles
|
|
139
185
|
|
|
140
186
|
**Terminal Workflows:**
|
|
@@ -187,7 +233,7 @@ container-superposition regen --minimal
|
|
|
187
233
|
|
|
188
234
|
# Step 3: Or regenerate for a different editor
|
|
189
235
|
container-superposition regen --editor jetbrains
|
|
190
|
-
#
|
|
236
|
+
# Adds JetBrains customizations and generates .idea/ artifacts
|
|
191
237
|
|
|
192
238
|
# Step 4: Or both together
|
|
193
239
|
container-superposition regen --minimal --editor none
|
|
@@ -237,6 +283,20 @@ container-superposition init \
|
|
|
237
283
|
|
|
238
284
|
**Result:** Lean Codespaces environment with essential tools and VS Code extensions.
|
|
239
285
|
|
|
286
|
+
### JetBrains IDE Setup
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
container-superposition init \
|
|
290
|
+
--editor jetbrains \
|
|
291
|
+
--stack compose \
|
|
292
|
+
--language nodejs \
|
|
293
|
+
--database postgres
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
**Result:** Node.js + PostgreSQL workspace with `.idea/` project settings, a `WebStorm`
|
|
297
|
+
backend in `devcontainer.json`, and an `npm run dev` run configuration ready to use. No
|
|
298
|
+
VS Code extensions included.
|
|
299
|
+
|
|
240
300
|
## Manifest Support
|
|
241
301
|
|
|
242
302
|
Both settings are stored in `superposition.json`:
|