container-superposition 0.1.1
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 +843 -0
- package/dist/scripts/init.d.ts +3 -0
- package/dist/scripts/init.d.ts.map +1 -0
- package/dist/scripts/init.js +1190 -0
- package/dist/scripts/init.js.map +1 -0
- package/dist/scripts/migrate-to-manifests.d.ts +12 -0
- package/dist/scripts/migrate-to-manifests.d.ts.map +1 -0
- package/dist/scripts/migrate-to-manifests.js +230 -0
- package/dist/scripts/migrate-to-manifests.js.map +1 -0
- package/dist/tool/questionnaire/composer.d.ts +6 -0
- package/dist/tool/questionnaire/composer.d.ts.map +1 -0
- package/dist/tool/questionnaire/composer.js +1232 -0
- package/dist/tool/questionnaire/composer.js.map +1 -0
- package/dist/tool/readme/markdown-parser.d.ts +30 -0
- package/dist/tool/readme/markdown-parser.d.ts.map +1 -0
- package/dist/tool/readme/markdown-parser.js +139 -0
- package/dist/tool/readme/markdown-parser.js.map +1 -0
- package/dist/tool/readme/readme-generator.d.ts +9 -0
- package/dist/tool/readme/readme-generator.d.ts.map +1 -0
- package/dist/tool/readme/readme-generator.js +422 -0
- package/dist/tool/readme/readme-generator.js.map +1 -0
- package/dist/tool/schema/custom-loader.d.ts +17 -0
- package/dist/tool/schema/custom-loader.d.ts.map +1 -0
- package/dist/tool/schema/custom-loader.js +149 -0
- package/dist/tool/schema/custom-loader.js.map +1 -0
- package/dist/tool/schema/overlay-loader.d.ts +47 -0
- package/dist/tool/schema/overlay-loader.d.ts.map +1 -0
- package/dist/tool/schema/overlay-loader.js +252 -0
- package/dist/tool/schema/overlay-loader.js.map +1 -0
- package/dist/tool/schema/types.d.ts +212 -0
- package/dist/tool/schema/types.d.ts.map +1 -0
- package/dist/tool/schema/types.js +5 -0
- package/dist/tool/schema/types.js.map +1 -0
- package/docs/README.md +308 -0
- package/docs/architecture.md +233 -0
- package/docs/creating-overlays.md +549 -0
- package/docs/custom-patches.md +540 -0
- package/docs/dependencies.md +279 -0
- package/docs/examples/custom-patches-example.md +85 -0
- package/docs/examples.md +576 -0
- package/docs/messaging-comparison.md +265 -0
- package/docs/messaging-quick-start.md +385 -0
- package/docs/observability-workflow.md +537 -0
- package/docs/overlay-manifest-refactoring.md +214 -0
- package/docs/overlay-metadata-archive.md +54 -0
- package/docs/overlays.md +523 -0
- package/docs/presets-architecture.md +498 -0
- package/docs/presets.md +366 -0
- package/docs/publishing.md +476 -0
- package/docs/quick-reference.md +326 -0
- package/docs/ux.md +170 -0
- package/features/README.md +85 -0
- package/features/cross-distro-packages/README.md +146 -0
- package/features/cross-distro-packages/devcontainer-feature.json +20 -0
- package/features/cross-distro-packages/install.sh +58 -0
- package/features/local-secrets-manager/devcontainer-feature.json +18 -0
- package/features/local-secrets-manager/install.sh +127 -0
- package/features/project-scaffolder/devcontainer-feature.json +24 -0
- package/features/project-scaffolder/install.sh +100 -0
- package/features/team-conventions/devcontainer-feature.json +24 -0
- package/features/team-conventions/install.sh +93 -0
- package/overlays/.registry/README.md +14 -0
- package/overlays/.registry/base-images.yml +26 -0
- package/overlays/.registry/base-templates.yml +7 -0
- package/overlays/README.md +155 -0
- package/overlays/alertmanager/.env.example +5 -0
- package/overlays/alertmanager/README.md +465 -0
- package/overlays/alertmanager/alert-rules.yml +56 -0
- package/overlays/alertmanager/alertmanager.yml +42 -0
- package/overlays/alertmanager/devcontainer.patch.json +12 -0
- package/overlays/alertmanager/docker-compose.yml +20 -0
- package/overlays/alertmanager/overlay.yml +17 -0
- package/overlays/alertmanager/setup.sh +53 -0
- package/overlays/alertmanager/verify.sh +31 -0
- package/overlays/aws-cli/README.md +473 -0
- package/overlays/aws-cli/devcontainer.patch.json +13 -0
- package/overlays/aws-cli/overlay.yml +13 -0
- package/overlays/azure-cli/README.md +551 -0
- package/overlays/azure-cli/devcontainer.patch.json +8 -0
- package/overlays/azure-cli/overlay.yml +13 -0
- package/overlays/bun/README.md +312 -0
- package/overlays/bun/devcontainer.patch.json +41 -0
- package/overlays/bun/overlay.yml +16 -0
- package/overlays/bun/setup.sh +79 -0
- package/overlays/bun/verify.sh +30 -0
- package/overlays/codex/README.md +128 -0
- package/overlays/codex/devcontainer.patch.json +3 -0
- package/overlays/codex/overlay.yml +14 -0
- package/overlays/codex/setup.sh +24 -0
- package/overlays/codex/verify.sh +30 -0
- package/overlays/commitlint/README.md +333 -0
- package/overlays/commitlint/devcontainer.patch.json +8 -0
- package/overlays/commitlint/overlay.yml +16 -0
- package/overlays/commitlint/setup.sh +234 -0
- package/overlays/direnv/README.md +504 -0
- package/overlays/direnv/devcontainer.patch.json +6 -0
- package/overlays/direnv/overlay.yml +13 -0
- package/overlays/direnv/setup.sh +139 -0
- package/overlays/docker-in-docker/README.md +534 -0
- package/overlays/docker-in-docker/devcontainer.patch.json +10 -0
- package/overlays/docker-in-docker/overlay.yml +13 -0
- package/overlays/docker-sock/README.md +256 -0
- package/overlays/docker-sock/devcontainer.patch.json +9 -0
- package/overlays/docker-sock/docker-compose.yml +8 -0
- package/overlays/docker-sock/overlay.yml +13 -0
- package/overlays/dotnet/README.md +147 -0
- package/overlays/dotnet/devcontainer.patch.json +51 -0
- package/overlays/dotnet/global-tools.txt +24 -0
- package/overlays/dotnet/overlay.yml +13 -0
- package/overlays/dotnet/setup.sh +51 -0
- package/overlays/dotnet/verify.sh +26 -0
- package/overlays/gcloud/README.md +269 -0
- package/overlays/gcloud/devcontainer.patch.json +14 -0
- package/overlays/gcloud/overlay.yml +14 -0
- package/overlays/gcloud/verify.sh +52 -0
- package/overlays/git-helpers/README.md +168 -0
- package/overlays/git-helpers/devcontainer.patch.json +33 -0
- package/overlays/git-helpers/overlay.yml +15 -0
- package/overlays/git-helpers/setup.sh +91 -0
- package/overlays/go/README.md +293 -0
- package/overlays/go/devcontainer.patch.json +43 -0
- package/overlays/go/overlay.yml +15 -0
- package/overlays/go/setup.sh +33 -0
- package/overlays/go/verify.sh +40 -0
- package/overlays/grafana/.env.example +9 -0
- package/overlays/grafana/README.md +462 -0
- package/overlays/grafana/dashboard-provider.yml +11 -0
- package/overlays/grafana/dashboards/observability-overview.json +263 -0
- package/overlays/grafana/devcontainer.patch.json +12 -0
- package/overlays/grafana/docker-compose.yml +27 -0
- package/overlays/grafana/grafana-datasources.yml +57 -0
- package/overlays/grafana/overlay.yml +21 -0
- package/overlays/grafana/verify.sh +34 -0
- package/overlays/jaeger/.env.example +7 -0
- package/overlays/jaeger/README.md +867 -0
- package/overlays/jaeger/devcontainer.patch.json +12 -0
- package/overlays/jaeger/docker-compose.yml +17 -0
- package/overlays/jaeger/overlay.yml +19 -0
- package/overlays/java/README.md +267 -0
- package/overlays/java/devcontainer.patch.json +44 -0
- package/overlays/java/overlay.yml +16 -0
- package/overlays/java/setup.sh +41 -0
- package/overlays/java/verify.sh +42 -0
- package/overlays/just/README.md +443 -0
- package/overlays/just/devcontainer.patch.json +3 -0
- package/overlays/just/overlay.yml +13 -0
- package/overlays/just/setup.sh +182 -0
- package/overlays/kubectl-helm/README.md +660 -0
- package/overlays/kubectl-helm/devcontainer.patch.json +10 -0
- package/overlays/kubectl-helm/overlay.yml +13 -0
- package/overlays/loki/.env.example +5 -0
- package/overlays/loki/README.md +1156 -0
- package/overlays/loki/devcontainer.patch.json +12 -0
- package/overlays/loki/docker-compose.yml +18 -0
- package/overlays/loki/loki-config.yaml +45 -0
- package/overlays/loki/overlay.yml +17 -0
- package/overlays/minio/.env.example +9 -0
- package/overlays/minio/README.md +639 -0
- package/overlays/minio/devcontainer.patch.json +30 -0
- package/overlays/minio/docker-compose.yml +28 -0
- package/overlays/minio/overlay.yml +18 -0
- package/overlays/minio/setup.sh +61 -0
- package/overlays/minio/verify.sh +64 -0
- package/overlays/mkdocs/README.md +309 -0
- package/overlays/mkdocs/devcontainer.patch.json +24 -0
- package/overlays/mkdocs/overlay.yml +15 -0
- package/overlays/modern-cli-tools/README.md +556 -0
- package/overlays/modern-cli-tools/devcontainer.patch.json +3 -0
- package/overlays/modern-cli-tools/overlay.yml +13 -0
- package/overlays/modern-cli-tools/setup.sh +153 -0
- package/overlays/mongodb/.env.example +9 -0
- package/overlays/mongodb/README.md +481 -0
- package/overlays/mongodb/devcontainer.patch.json +32 -0
- package/overlays/mongodb/docker-compose.yml +44 -0
- package/overlays/mongodb/overlay.yml +17 -0
- package/overlays/mongodb/verify.sh +48 -0
- package/overlays/mysql/.env.example +11 -0
- package/overlays/mysql/README.md +542 -0
- package/overlays/mysql/devcontainer.patch.json +34 -0
- package/overlays/mysql/docker-compose.yml +55 -0
- package/overlays/mysql/overlay.yml +16 -0
- package/overlays/mysql/verify.sh +48 -0
- package/overlays/nats/.env.example +5 -0
- package/overlays/nats/README.md +762 -0
- package/overlays/nats/devcontainer.patch.json +24 -0
- package/overlays/nats/docker-compose.yml +31 -0
- package/overlays/nats/overlay.yml +18 -0
- package/overlays/nats/verify.sh +50 -0
- package/overlays/ngrok/README.md +503 -0
- package/overlays/ngrok/devcontainer.patch.json +3 -0
- package/overlays/ngrok/overlay.yml +14 -0
- package/overlays/ngrok/setup.sh +125 -0
- package/overlays/nodejs/README.md +192 -0
- package/overlays/nodejs/devcontainer.patch.json +49 -0
- package/overlays/nodejs/global-packages.txt +16 -0
- package/overlays/nodejs/overlay.yml +14 -0
- package/overlays/nodejs/setup.sh +46 -0
- package/overlays/nodejs/verify.sh +32 -0
- package/overlays/otel-collector/.env.example +9 -0
- package/overlays/otel-collector/README.md +1257 -0
- package/overlays/otel-collector/devcontainer.patch.json +28 -0
- package/overlays/otel-collector/docker-compose.yml +22 -0
- package/overlays/otel-collector/otel-collector-config.yaml +68 -0
- package/overlays/otel-collector/overlay.yml +21 -0
- package/overlays/otel-collector/setup.sh +49 -0
- package/overlays/otel-demo-nodejs/.env.example +2 -0
- package/overlays/otel-demo-nodejs/Dockerfile-otel-demo-nodejs +17 -0
- package/overlays/otel-demo-nodejs/README.md +409 -0
- package/overlays/otel-demo-nodejs/devcontainer.patch.json +12 -0
- package/overlays/otel-demo-nodejs/docker-compose.yml +19 -0
- package/overlays/otel-demo-nodejs/overlay.yml +23 -0
- package/overlays/otel-demo-nodejs/package-otel-demo-nodejs.json +20 -0
- package/overlays/otel-demo-nodejs/server-otel-demo-nodejs.js +259 -0
- package/overlays/otel-demo-nodejs/tracing-otel-demo-nodejs.js +57 -0
- package/overlays/otel-demo-nodejs/verify.sh +31 -0
- package/overlays/otel-demo-python/.env.example +2 -0
- package/overlays/otel-demo-python/Dockerfile-otel-demo-python +16 -0
- package/overlays/otel-demo-python/README.md +82 -0
- package/overlays/otel-demo-python/app-otel-demo-python.py +208 -0
- package/overlays/otel-demo-python/devcontainer.patch.json +12 -0
- package/overlays/otel-demo-python/docker-compose.yml +19 -0
- package/overlays/otel-demo-python/overlay.yml +23 -0
- package/overlays/otel-demo-python/requirements-otel-demo-python.txt +4 -0
- package/overlays/otel-demo-python/verify.sh +31 -0
- package/overlays/playwright/README.md +629 -0
- package/overlays/playwright/devcontainer.patch.json +9 -0
- package/overlays/playwright/overlay.yml +13 -0
- package/overlays/postgres/.env.example +6 -0
- package/overlays/postgres/README.md +602 -0
- package/overlays/postgres/devcontainer.patch.json +21 -0
- package/overlays/postgres/docker-compose.yml +22 -0
- package/overlays/postgres/overlay.yml +15 -0
- package/overlays/postgres/verify.sh +45 -0
- package/overlays/powershell/README.md +314 -0
- package/overlays/powershell/devcontainer.patch.json +22 -0
- package/overlays/powershell/overlay.yml +13 -0
- package/overlays/powershell/setup.sh +29 -0
- package/overlays/powershell/verify.sh +38 -0
- package/overlays/pre-commit/README.md +263 -0
- package/overlays/pre-commit/devcontainer.patch.json +9 -0
- package/overlays/pre-commit/overlay.yml +16 -0
- package/overlays/pre-commit/setup.sh +129 -0
- package/overlays/presets/docs-site.yml +118 -0
- package/overlays/presets/fullstack.yml +181 -0
- package/overlays/presets/microservice.yml +118 -0
- package/overlays/presets/web-api.yml +109 -0
- package/overlays/prometheus/.env.example +5 -0
- package/overlays/prometheus/README.md +1246 -0
- package/overlays/prometheus/devcontainer.patch.json +12 -0
- package/overlays/prometheus/docker-compose.yml +22 -0
- package/overlays/prometheus/overlay.yml +17 -0
- package/overlays/prometheus/prometheus.yml +12 -0
- package/overlays/prometheus/verify.sh +34 -0
- package/overlays/promtail/.env.example +2 -0
- package/overlays/promtail/README.md +357 -0
- package/overlays/promtail/devcontainer.patch.json +5 -0
- package/overlays/promtail/docker-compose.yml +16 -0
- package/overlays/promtail/overlay.yml +17 -0
- package/overlays/promtail/promtail-config.yaml +60 -0
- package/overlays/promtail/verify.sh +31 -0
- package/overlays/pulumi/README.md +472 -0
- package/overlays/pulumi/devcontainer.patch.json +13 -0
- package/overlays/pulumi/overlay.yml +14 -0
- package/overlays/pulumi/verify.sh +31 -0
- package/overlays/python/README.md +919 -0
- package/overlays/python/devcontainer.patch.json +41 -0
- package/overlays/python/overlay.yml +12 -0
- package/overlays/python/requirements-overlay.txt +13 -0
- package/overlays/python/setup.sh +47 -0
- package/overlays/python/verify.sh +32 -0
- package/overlays/rabbitmq/.env.example +7 -0
- package/overlays/rabbitmq/README.md +680 -0
- package/overlays/rabbitmq/devcontainer.patch.json +28 -0
- package/overlays/rabbitmq/docker-compose.yml +30 -0
- package/overlays/rabbitmq/overlay.yml +18 -0
- package/overlays/rabbitmq/verify.sh +41 -0
- package/overlays/redis/.env.example +4 -0
- package/overlays/redis/README.md +776 -0
- package/overlays/redis/devcontainer.patch.json +21 -0
- package/overlays/redis/docker-compose.yml +21 -0
- package/overlays/redis/overlay.yml +15 -0
- package/overlays/redis/verify.sh +41 -0
- package/overlays/redpanda/.env.example +10 -0
- package/overlays/redpanda/README.md +703 -0
- package/overlays/redpanda/devcontainer.patch.json +37 -0
- package/overlays/redpanda/docker-compose.yml +67 -0
- package/overlays/redpanda/overlay.yml +21 -0
- package/overlays/redpanda/verify.sh +48 -0
- package/overlays/rust/README.md +299 -0
- package/overlays/rust/devcontainer.patch.json +39 -0
- package/overlays/rust/overlay.yml +15 -0
- package/overlays/rust/setup.sh +36 -0
- package/overlays/rust/verify.sh +51 -0
- package/overlays/sqlite/README.md +584 -0
- package/overlays/sqlite/devcontainer.patch.json +14 -0
- package/overlays/sqlite/overlay.yml +15 -0
- package/overlays/sqlite/setup.sh +27 -0
- package/overlays/sqlite/verify.sh +43 -0
- package/overlays/sqlserver/.env.example +6 -0
- package/overlays/sqlserver/README.md +592 -0
- package/overlays/sqlserver/devcontainer.patch.json +22 -0
- package/overlays/sqlserver/docker-compose.yml +32 -0
- package/overlays/sqlserver/overlay.yml +17 -0
- package/overlays/sqlserver/verify.sh +30 -0
- package/overlays/tempo/.env.example +5 -0
- package/overlays/tempo/README.md +273 -0
- package/overlays/tempo/devcontainer.patch.json +12 -0
- package/overlays/tempo/docker-compose.yml +20 -0
- package/overlays/tempo/overlay.yml +20 -0
- package/overlays/tempo/tempo-config.yaml +32 -0
- package/overlays/tempo/verify.sh +31 -0
- package/overlays/terraform/README.md +389 -0
- package/overlays/terraform/devcontainer.patch.json +15 -0
- package/overlays/terraform/overlay.yml +14 -0
- package/overlays/terraform/verify.sh +63 -0
- package/package.json +74 -0
- package/templates/README.md +285 -0
- package/templates/compose/.devcontainer/devcontainer.json +46 -0
- package/templates/compose/.devcontainer/docker-compose.yml +12 -0
- package/templates/compose/README.md +20 -0
- package/templates/plain/.devcontainer/devcontainer.json +35 -0
- package/templates/plain/README.md +21 -0
- package/tool/README.md +281 -0
- package/tool/schema/base-images.schema.json +43 -0
- package/tool/schema/base-templates.schema.json +34 -0
- package/tool/schema/config.schema.json +71 -0
- package/tool/schema/overlay-manifest.schema.json +86 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Pre-commit framework setup script
|
|
3
|
+
|
|
4
|
+
set -e
|
|
5
|
+
|
|
6
|
+
echo "🔍 Setting up pre-commit framework..."
|
|
7
|
+
|
|
8
|
+
# Install pre-commit using pip
|
|
9
|
+
pip install --user pre-commit
|
|
10
|
+
|
|
11
|
+
# Add to PATH if not already there
|
|
12
|
+
export PATH="$HOME/.local/bin:$PATH"
|
|
13
|
+
|
|
14
|
+
# Verify installation
|
|
15
|
+
if command -v pre-commit &> /dev/null; then
|
|
16
|
+
echo "✓ pre-commit installed: $(pre-commit --version)"
|
|
17
|
+
else
|
|
18
|
+
echo "✗ pre-commit installation failed"
|
|
19
|
+
exit 1
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
# Create sample .pre-commit-config.yaml if no config exists
|
|
23
|
+
if [ ! -f .pre-commit-config.yaml ] && [ ! -f .pre-commit-config.yml ] && [ ! -f .pre-commit-config.json ]; then
|
|
24
|
+
cat > .pre-commit-config.yaml << 'EOF'
|
|
25
|
+
# Pre-commit configuration
|
|
26
|
+
# See https://pre-commit.com for more information
|
|
27
|
+
# Install: pre-commit install
|
|
28
|
+
# Run manually: pre-commit run --all-files
|
|
29
|
+
|
|
30
|
+
repos:
|
|
31
|
+
# General file checks
|
|
32
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
33
|
+
rev: v4.5.0
|
|
34
|
+
hooks:
|
|
35
|
+
- id: trailing-whitespace
|
|
36
|
+
args: [--markdown-linebreak-ext=md]
|
|
37
|
+
- id: end-of-file-fixer
|
|
38
|
+
- id: check-yaml
|
|
39
|
+
args: [--safe]
|
|
40
|
+
- id: check-json
|
|
41
|
+
- id: check-toml
|
|
42
|
+
- id: check-added-large-files
|
|
43
|
+
args: [--maxkb=1000]
|
|
44
|
+
- id: check-case-conflict
|
|
45
|
+
- id: check-merge-conflict
|
|
46
|
+
- id: detect-private-key
|
|
47
|
+
- id: mixed-line-ending
|
|
48
|
+
args: [--fix=lf]
|
|
49
|
+
- id: check-executables-have-shebangs
|
|
50
|
+
- id: check-shebang-scripts-are-executable
|
|
51
|
+
|
|
52
|
+
# Markdown checks
|
|
53
|
+
- repo: https://github.com/igorshubovych/markdownlint-cli
|
|
54
|
+
rev: v0.39.0
|
|
55
|
+
hooks:
|
|
56
|
+
- id: markdownlint
|
|
57
|
+
args: [--fix]
|
|
58
|
+
|
|
59
|
+
# Language-specific hooks (uncomment as needed):
|
|
60
|
+
|
|
61
|
+
# Python
|
|
62
|
+
# - repo: https://github.com/psf/black
|
|
63
|
+
# rev: 24.2.0
|
|
64
|
+
# hooks:
|
|
65
|
+
# - id: black
|
|
66
|
+
#
|
|
67
|
+
# - repo: https://github.com/pycqa/isort
|
|
68
|
+
# rev: 5.13.2
|
|
69
|
+
# hooks:
|
|
70
|
+
# - id: isort
|
|
71
|
+
# args: [--profile, black]
|
|
72
|
+
#
|
|
73
|
+
# - repo: https://github.com/pycqa/flake8
|
|
74
|
+
# rev: 7.0.0
|
|
75
|
+
# hooks:
|
|
76
|
+
# - id: flake8
|
|
77
|
+
|
|
78
|
+
# JavaScript/TypeScript
|
|
79
|
+
# - repo: https://github.com/pre-commit/mirrors-eslint
|
|
80
|
+
# rev: v8.56.0
|
|
81
|
+
# hooks:
|
|
82
|
+
# - id: eslint
|
|
83
|
+
# files: \.[jt]sx?$
|
|
84
|
+
# types: [file]
|
|
85
|
+
# additional_dependencies:
|
|
86
|
+
# - eslint@8.56.0
|
|
87
|
+
# - typescript@5.3.3
|
|
88
|
+
#
|
|
89
|
+
# - repo: https://github.com/pre-commit/mirrors-prettier
|
|
90
|
+
# rev: v3.1.0
|
|
91
|
+
# hooks:
|
|
92
|
+
# - id: prettier
|
|
93
|
+
# types_or: [javascript, jsx, ts, tsx, json, yaml, markdown]
|
|
94
|
+
|
|
95
|
+
# Dockerfile
|
|
96
|
+
# - repo: https://github.com/hadolint/hadolint
|
|
97
|
+
# rev: v2.12.0
|
|
98
|
+
# hooks:
|
|
99
|
+
# - id: hadolint-docker
|
|
100
|
+
|
|
101
|
+
# Shell scripts
|
|
102
|
+
# - repo: https://github.com/shellcheck-py/shellcheck-py
|
|
103
|
+
# rev: v0.9.0.6
|
|
104
|
+
# hooks:
|
|
105
|
+
# - id: shellcheck
|
|
106
|
+
EOF
|
|
107
|
+
echo "✓ Sample .pre-commit-config.yaml created"
|
|
108
|
+
fi
|
|
109
|
+
|
|
110
|
+
# Install pre-commit hooks in git repository
|
|
111
|
+
if [ -d .git ]; then
|
|
112
|
+
pre-commit install
|
|
113
|
+
echo "✓ Pre-commit hooks installed in repository"
|
|
114
|
+
else
|
|
115
|
+
echo "⚠️ Not a git repository - skipping hook installation"
|
|
116
|
+
echo " Run 'pre-commit install' manually after git init"
|
|
117
|
+
fi
|
|
118
|
+
|
|
119
|
+
# Run pre-commit to install hook environments
|
|
120
|
+
pre-commit install-hooks 2>/dev/null || echo "⚠️ Will install hooks on first run"
|
|
121
|
+
|
|
122
|
+
echo "✓ Pre-commit setup complete"
|
|
123
|
+
echo ""
|
|
124
|
+
echo "💡 Usage:"
|
|
125
|
+
echo " - Install hooks in repo: pre-commit install"
|
|
126
|
+
echo " - Run on all files: pre-commit run --all-files"
|
|
127
|
+
echo " - Run on changed files: pre-commit run"
|
|
128
|
+
echo " - Update hooks: pre-commit autoupdate"
|
|
129
|
+
echo " - Skip hooks on commit: git commit --no-verify"
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Documentation Site Preset
|
|
2
|
+
# Development environment for documentation websites
|
|
3
|
+
|
|
4
|
+
id: docs-site
|
|
5
|
+
name: Documentation Site
|
|
6
|
+
description: Documentation website development with MkDocs, quality checks, and deployment tools
|
|
7
|
+
type: meta
|
|
8
|
+
category: preset
|
|
9
|
+
supports: [] # Works with both plain and compose
|
|
10
|
+
tags: [preset, documentation, mkdocs, markdown]
|
|
11
|
+
|
|
12
|
+
# Overlays to select
|
|
13
|
+
selects:
|
|
14
|
+
# Always included
|
|
15
|
+
required:
|
|
16
|
+
- mkdocs
|
|
17
|
+
- pre-commit
|
|
18
|
+
- modern-cli-tools
|
|
19
|
+
|
|
20
|
+
# No user choices for this preset
|
|
21
|
+
userChoice: {}
|
|
22
|
+
|
|
23
|
+
# Glue configuration
|
|
24
|
+
glueConfig:
|
|
25
|
+
# Pre-configured environment variables
|
|
26
|
+
environment:
|
|
27
|
+
# MkDocs configuration
|
|
28
|
+
MKDOCS_PORT: '8000'
|
|
29
|
+
MKDOCS_STRICT: 'true'
|
|
30
|
+
|
|
31
|
+
# Documentation settings
|
|
32
|
+
DOCS_DIR: 'docs'
|
|
33
|
+
SITE_DIR: 'site'
|
|
34
|
+
|
|
35
|
+
# Suggested port mappings
|
|
36
|
+
portMappings:
|
|
37
|
+
mkdocs: 8000
|
|
38
|
+
|
|
39
|
+
# README snippet
|
|
40
|
+
readme: |
|
|
41
|
+
## Documentation Site Stack
|
|
42
|
+
|
|
43
|
+
This devcontainer is configured for documentation development:
|
|
44
|
+
|
|
45
|
+
### Tools
|
|
46
|
+
|
|
47
|
+
- **MkDocs**: Python-based static site generator (port 8000)
|
|
48
|
+
- **Pre-commit**: Git hooks for quality checks
|
|
49
|
+
- **Modern CLI Tools**: bat, fd, ripgrep, fzf for productivity
|
|
50
|
+
|
|
51
|
+
### Quick Start
|
|
52
|
+
|
|
53
|
+
1. Initialize MkDocs (if not already done):
|
|
54
|
+
```bash
|
|
55
|
+
mkdocs new .
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
2. Start development server:
|
|
59
|
+
```bash
|
|
60
|
+
mkdocs serve
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
3. Access your docs at http://localhost:8000
|
|
64
|
+
|
|
65
|
+
### Pre-commit Hooks
|
|
66
|
+
|
|
67
|
+
This preset includes pre-commit hooks for documentation quality:
|
|
68
|
+
|
|
69
|
+
- Markdown linting
|
|
70
|
+
- Trailing whitespace removal
|
|
71
|
+
- YAML validation
|
|
72
|
+
- Link checking (optional)
|
|
73
|
+
|
|
74
|
+
Install hooks:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
pre-commit install
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### MkDocs Configuration
|
|
81
|
+
|
|
82
|
+
Edit `mkdocs.yml` to configure:
|
|
83
|
+
|
|
84
|
+
- Theme (Material for MkDocs recommended)
|
|
85
|
+
- Navigation structure
|
|
86
|
+
- Plugins (search, tags, etc.)
|
|
87
|
+
- Markdown extensions
|
|
88
|
+
|
|
89
|
+
Example `mkdocs.yml`:
|
|
90
|
+
|
|
91
|
+
```yaml
|
|
92
|
+
site_name: My Documentation
|
|
93
|
+
theme:
|
|
94
|
+
name: material
|
|
95
|
+
palette:
|
|
96
|
+
primary: indigo
|
|
97
|
+
nav:
|
|
98
|
+
- Home: index.md
|
|
99
|
+
- Getting Started: getting-started.md
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### GitHub Pages Deployment
|
|
103
|
+
|
|
104
|
+
Deploy to GitHub Pages:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
mkdocs gh-deploy
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
This builds your site and pushes to the `gh-pages` branch.
|
|
111
|
+
|
|
112
|
+
### Next Steps
|
|
113
|
+
|
|
114
|
+
- Choose a MkDocs theme (Material is popular)
|
|
115
|
+
- Add markdown files to `docs/` directory
|
|
116
|
+
- Configure navigation in `mkdocs.yml`
|
|
117
|
+
- Set up CI/CD for automatic deployments
|
|
118
|
+
- Add link checking to pre-commit hooks
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# Full-Stack Application Preset
|
|
2
|
+
# Complete development environment for full-stack applications
|
|
3
|
+
|
|
4
|
+
id: fullstack
|
|
5
|
+
name: Full-Stack Application
|
|
6
|
+
description: Complete full-stack development with frontend, backend, databases, and observability
|
|
7
|
+
type: meta
|
|
8
|
+
category: preset
|
|
9
|
+
supports: [compose] # Requires Docker Compose for services
|
|
10
|
+
tags: [preset, fullstack, frontend, backend, monorepo]
|
|
11
|
+
|
|
12
|
+
# Overlays to select
|
|
13
|
+
selects:
|
|
14
|
+
# Always included
|
|
15
|
+
required:
|
|
16
|
+
- nodejs # Frontend (React/Vue/Angular)
|
|
17
|
+
- postgres
|
|
18
|
+
- redis
|
|
19
|
+
- minio # File uploads/storage
|
|
20
|
+
- otel-collector
|
|
21
|
+
- prometheus
|
|
22
|
+
- grafana
|
|
23
|
+
- loki
|
|
24
|
+
|
|
25
|
+
# User makes choices
|
|
26
|
+
userChoice:
|
|
27
|
+
backend:
|
|
28
|
+
id: backend
|
|
29
|
+
prompt: Select backend language/framework
|
|
30
|
+
options: [dotnet, python, go, java]
|
|
31
|
+
defaultOption: dotnet
|
|
32
|
+
|
|
33
|
+
# Glue configuration
|
|
34
|
+
glueConfig:
|
|
35
|
+
# Pre-configured environment variables
|
|
36
|
+
environment:
|
|
37
|
+
# Database
|
|
38
|
+
DATABASE_URL: 'postgresql://postgres:postgres@postgres:5432/myapp'
|
|
39
|
+
POSTGRES_HOST: 'postgres'
|
|
40
|
+
POSTGRES_PORT: '5432'
|
|
41
|
+
POSTGRES_DB: 'myapp'
|
|
42
|
+
|
|
43
|
+
# Redis
|
|
44
|
+
REDIS_URL: 'redis://redis:6379'
|
|
45
|
+
REDIS_HOST: 'redis'
|
|
46
|
+
|
|
47
|
+
# MinIO (S3-compatible storage)
|
|
48
|
+
MINIO_ENDPOINT: 'minio:9000'
|
|
49
|
+
MINIO_ACCESS_KEY: 'minioadmin'
|
|
50
|
+
MINIO_SECRET_KEY: 'minioadmin'
|
|
51
|
+
MINIO_BUCKET: 'uploads'
|
|
52
|
+
MINIO_USE_SSL: 'false'
|
|
53
|
+
|
|
54
|
+
# OpenTelemetry
|
|
55
|
+
OTEL_EXPORTER_OTLP_ENDPOINT: 'http://otel-collector:4317'
|
|
56
|
+
OTEL_SERVICE_NAME: 'fullstack-app'
|
|
57
|
+
|
|
58
|
+
# Application
|
|
59
|
+
FRONTEND_PORT: '3000'
|
|
60
|
+
BACKEND_PORT: '8000'
|
|
61
|
+
API_URL: 'http://localhost:8000'
|
|
62
|
+
GRAFANA_PORT: '3001'
|
|
63
|
+
|
|
64
|
+
# Suggested port mappings
|
|
65
|
+
portMappings:
|
|
66
|
+
frontend: 3000
|
|
67
|
+
backend: 8000
|
|
68
|
+
grafana: 3001
|
|
69
|
+
minio: 9000
|
|
70
|
+
minio-console: 9001
|
|
71
|
+
|
|
72
|
+
# README snippet
|
|
73
|
+
readme: |
|
|
74
|
+
## Full-Stack Application Stack
|
|
75
|
+
|
|
76
|
+
This devcontainer provides a complete full-stack development environment:
|
|
77
|
+
|
|
78
|
+
### Architecture
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
Frontend (Node.js) ──→ Backend ──→ PostgreSQL
|
|
82
|
+
│ │
|
|
83
|
+
└────────────────────┴──→ Redis (session/cache)
|
|
84
|
+
│
|
|
85
|
+
└──→ MinIO (file storage)
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Services
|
|
89
|
+
|
|
90
|
+
- **Node.js**: Frontend development (React/Vue/Angular) on port 3000
|
|
91
|
+
- **Backend**: Your chosen language/framework on port 8000
|
|
92
|
+
- **PostgreSQL**: Primary database (port 5432)
|
|
93
|
+
- **Redis**: Cache and session store (port 6379)
|
|
94
|
+
- **MinIO**: S3-compatible object storage (ports 9000, 9001)
|
|
95
|
+
- **OpenTelemetry Collector**: Telemetry aggregation
|
|
96
|
+
- **Prometheus**: Metrics (port 9090)
|
|
97
|
+
- **Grafana**: Dashboards (port 3001)
|
|
98
|
+
- **Loki**: Log aggregation (port 3100)
|
|
99
|
+
|
|
100
|
+
### Connection Strings
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# PostgreSQL
|
|
104
|
+
DATABASE_URL="postgresql://postgres:postgres@postgres:5432/myapp"
|
|
105
|
+
|
|
106
|
+
# Redis
|
|
107
|
+
REDIS_URL="redis://redis:6379"
|
|
108
|
+
|
|
109
|
+
# MinIO (S3-compatible)
|
|
110
|
+
MINIO_ENDPOINT="minio:9000"
|
|
111
|
+
MINIO_ACCESS_KEY="minioadmin"
|
|
112
|
+
MINIO_SECRET_KEY="minioadmin"
|
|
113
|
+
|
|
114
|
+
# Backend API (from frontend)
|
|
115
|
+
API_URL="http://localhost:8000"
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Quick Start
|
|
119
|
+
|
|
120
|
+
#### Frontend Setup
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
cd frontend/
|
|
124
|
+
npm install
|
|
125
|
+
npm run dev # Runs on port 3000
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
#### Backend Setup
|
|
129
|
+
|
|
130
|
+
Start your backend on port 8000 (varies by language).
|
|
131
|
+
|
|
132
|
+
#### MinIO Setup
|
|
133
|
+
|
|
134
|
+
1. Access MinIO Console at http://localhost:9001
|
|
135
|
+
2. Login with minioadmin/minioadmin
|
|
136
|
+
3. Create bucket named "uploads"
|
|
137
|
+
4. Configure your app to use MinIO endpoint
|
|
138
|
+
|
|
139
|
+
### Monorepo Structure (Recommended)
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
project/
|
|
143
|
+
├── frontend/ # React/Vue/Angular app
|
|
144
|
+
├── backend/ # API server
|
|
145
|
+
├── shared/ # Shared types/models
|
|
146
|
+
├── .devcontainer/ # This devcontainer
|
|
147
|
+
└── docker-compose.yml
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### File Upload Example
|
|
151
|
+
|
|
152
|
+
Your backend can upload files to MinIO:
|
|
153
|
+
|
|
154
|
+
```javascript
|
|
155
|
+
// Node.js example
|
|
156
|
+
const Minio = require('minio');
|
|
157
|
+
const minioClient = new Minio.Client({
|
|
158
|
+
endPoint: 'minio',
|
|
159
|
+
port: 9000,
|
|
160
|
+
useSSL: false,
|
|
161
|
+
accessKey: 'minioadmin',
|
|
162
|
+
secretKey: 'minioadmin'
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
await minioClient.putObject('uploads', 'file.jpg', stream);
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Observability
|
|
169
|
+
|
|
170
|
+
- **Metrics**: Grafana at http://localhost:3001
|
|
171
|
+
- **Traces**: Add OTEL SDK to frontend and backend
|
|
172
|
+
- **Logs**: Forwarded to Loki, viewable in Grafana
|
|
173
|
+
|
|
174
|
+
### Next Steps
|
|
175
|
+
|
|
176
|
+
- Set up frontend build pipeline
|
|
177
|
+
- Implement API endpoints in backend
|
|
178
|
+
- Configure database migrations
|
|
179
|
+
- Add authentication/authorization
|
|
180
|
+
- Set up shared TypeScript types between frontend and backend
|
|
181
|
+
- Create custom Grafana dashboards
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Microservice Stack Preset
|
|
2
|
+
# Development environment for microservices architecture
|
|
3
|
+
|
|
4
|
+
id: microservice
|
|
5
|
+
name: Microservice Stack
|
|
6
|
+
description: Microservices development with messaging, distributed tracing, and monitoring
|
|
7
|
+
type: meta
|
|
8
|
+
category: preset
|
|
9
|
+
supports: [compose] # Requires Docker Compose for services
|
|
10
|
+
tags: [preset, microservice, messaging, distributed, tracing]
|
|
11
|
+
|
|
12
|
+
# Overlays to select
|
|
13
|
+
selects:
|
|
14
|
+
# Always included
|
|
15
|
+
required:
|
|
16
|
+
- otel-collector
|
|
17
|
+
- jaeger
|
|
18
|
+
- prometheus
|
|
19
|
+
- grafana
|
|
20
|
+
|
|
21
|
+
# User makes choices
|
|
22
|
+
userChoice:
|
|
23
|
+
language:
|
|
24
|
+
id: language
|
|
25
|
+
prompt: Select service language/framework
|
|
26
|
+
options: [dotnet, nodejs, python, go, java]
|
|
27
|
+
defaultOption: nodejs
|
|
28
|
+
|
|
29
|
+
messaging:
|
|
30
|
+
id: messaging
|
|
31
|
+
prompt: Select message broker
|
|
32
|
+
options: [rabbitmq, redpanda, nats]
|
|
33
|
+
defaultOption: rabbitmq
|
|
34
|
+
|
|
35
|
+
# Glue configuration - integration helpers
|
|
36
|
+
glueConfig:
|
|
37
|
+
# Pre-configured environment variables
|
|
38
|
+
environment:
|
|
39
|
+
# OpenTelemetry configuration
|
|
40
|
+
OTEL_EXPORTER_OTLP_ENDPOINT: 'http://otel-collector:4317'
|
|
41
|
+
OTEL_SERVICE_NAME: 'microservice'
|
|
42
|
+
OTEL_METRICS_EXPORTER: 'otlp'
|
|
43
|
+
OTEL_TRACES_EXPORTER: 'otlp'
|
|
44
|
+
OTEL_LOGS_EXPORTER: 'otlp'
|
|
45
|
+
|
|
46
|
+
# Jaeger configuration
|
|
47
|
+
JAEGER_ENDPOINT: 'http://jaeger:14268/api/traces'
|
|
48
|
+
|
|
49
|
+
# Messaging URLs (will vary based on choice)
|
|
50
|
+
# RabbitMQ: amqp://rabbitmq:5672
|
|
51
|
+
# Redpanda: kafka://redpanda:9092
|
|
52
|
+
# NATS: nats://nats:4222
|
|
53
|
+
|
|
54
|
+
# Suggested port mappings
|
|
55
|
+
portMappings:
|
|
56
|
+
service: 8080
|
|
57
|
+
grafana: 3000
|
|
58
|
+
prometheus: 9090
|
|
59
|
+
jaeger: 16686
|
|
60
|
+
|
|
61
|
+
# README snippet
|
|
62
|
+
readme: |
|
|
63
|
+
## Microservice Stack
|
|
64
|
+
|
|
65
|
+
This devcontainer is configured for microservices development:
|
|
66
|
+
|
|
67
|
+
### Services
|
|
68
|
+
|
|
69
|
+
- **Message Broker**: Async communication between services
|
|
70
|
+
- **OpenTelemetry Collector**: Distributed tracing collection (ports 4317, 4318)
|
|
71
|
+
- **Jaeger**: Distributed tracing UI (port 16686)
|
|
72
|
+
- **Prometheus**: Metrics storage (port 9090)
|
|
73
|
+
- **Grafana**: Unified observability dashboard (port 3000)
|
|
74
|
+
|
|
75
|
+
### Connection Strings
|
|
76
|
+
|
|
77
|
+
Depending on your message broker choice:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# RabbitMQ
|
|
81
|
+
RABBITMQ_URL="amqp://rabbitmq:5672"
|
|
82
|
+
|
|
83
|
+
# Redpanda (Kafka-compatible)
|
|
84
|
+
KAFKA_BROKERS="redpanda:9092"
|
|
85
|
+
|
|
86
|
+
# NATS
|
|
87
|
+
NATS_URL="nats://nats:4222"
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
OpenTelemetry:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
OTEL_EXPORTER_OTLP_ENDPOINT="http://otel-collector:4317"
|
|
94
|
+
JAEGER_ENDPOINT="http://jaeger:14268/api/traces"
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Quick Start
|
|
98
|
+
|
|
99
|
+
1. Develop your microservice on port 8080
|
|
100
|
+
2. Publish/subscribe to messages via your chosen broker
|
|
101
|
+
3. View distributed traces in Jaeger at http://localhost:16686
|
|
102
|
+
4. Monitor metrics in Grafana at http://localhost:3000
|
|
103
|
+
|
|
104
|
+
### Distributed Tracing
|
|
105
|
+
|
|
106
|
+
This stack is pre-configured for distributed tracing:
|
|
107
|
+
|
|
108
|
+
- Add OpenTelemetry SDK to your service
|
|
109
|
+
- Traces automatically flow: Service → OTEL Collector → Jaeger
|
|
110
|
+
- View service dependencies and latencies in Jaeger UI
|
|
111
|
+
|
|
112
|
+
### Next Steps
|
|
113
|
+
|
|
114
|
+
- Implement health check endpoints
|
|
115
|
+
- Add OpenTelemetry instrumentation
|
|
116
|
+
- Configure circuit breakers and retries
|
|
117
|
+
- Set up service discovery (if needed)
|
|
118
|
+
- Create service-specific Grafana dashboards
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Web API Stack Preset
|
|
2
|
+
# Complete environment for REST/GraphQL API development
|
|
3
|
+
|
|
4
|
+
id: web-api
|
|
5
|
+
name: Web API Stack
|
|
6
|
+
description: Complete REST/GraphQL API development environment with database, cache, and observability
|
|
7
|
+
type: meta
|
|
8
|
+
category: preset
|
|
9
|
+
supports: [compose] # Requires Docker Compose for services
|
|
10
|
+
tags: [preset, api, web, backend, observability]
|
|
11
|
+
|
|
12
|
+
# Overlays to select
|
|
13
|
+
selects:
|
|
14
|
+
# Always included
|
|
15
|
+
required:
|
|
16
|
+
- postgres
|
|
17
|
+
- redis
|
|
18
|
+
- otel-collector
|
|
19
|
+
- prometheus
|
|
20
|
+
- grafana
|
|
21
|
+
- loki
|
|
22
|
+
|
|
23
|
+
# User makes choices
|
|
24
|
+
userChoice:
|
|
25
|
+
language:
|
|
26
|
+
id: language
|
|
27
|
+
prompt: Select API language/framework
|
|
28
|
+
options: [dotnet, nodejs, python, go, java]
|
|
29
|
+
defaultOption: nodejs
|
|
30
|
+
|
|
31
|
+
# Glue configuration - integration helpers
|
|
32
|
+
glueConfig:
|
|
33
|
+
# Pre-configured environment variables
|
|
34
|
+
environment:
|
|
35
|
+
# Database connection
|
|
36
|
+
DATABASE_URL: 'postgresql://postgres:postgres@postgres:5432/myapp'
|
|
37
|
+
POSTGRES_HOST: 'postgres'
|
|
38
|
+
POSTGRES_PORT: '5432'
|
|
39
|
+
POSTGRES_DB: 'myapp'
|
|
40
|
+
POSTGRES_USER: 'postgres'
|
|
41
|
+
POSTGRES_PASSWORD: 'postgres'
|
|
42
|
+
|
|
43
|
+
# Redis connection
|
|
44
|
+
REDIS_URL: 'redis://redis:6379'
|
|
45
|
+
REDIS_HOST: 'redis'
|
|
46
|
+
REDIS_PORT: '6379'
|
|
47
|
+
|
|
48
|
+
# OpenTelemetry configuration
|
|
49
|
+
OTEL_EXPORTER_OTLP_ENDPOINT: 'http://otel-collector:4317'
|
|
50
|
+
OTEL_SERVICE_NAME: 'api-service'
|
|
51
|
+
OTEL_METRICS_EXPORTER: 'otlp'
|
|
52
|
+
OTEL_TRACES_EXPORTER: 'otlp'
|
|
53
|
+
OTEL_LOGS_EXPORTER: 'otlp'
|
|
54
|
+
|
|
55
|
+
# Suggested port mappings
|
|
56
|
+
portMappings:
|
|
57
|
+
api: 8000
|
|
58
|
+
grafana: 3000
|
|
59
|
+
prometheus: 9090
|
|
60
|
+
|
|
61
|
+
# README snippet to add to generated devcontainer
|
|
62
|
+
readme: |
|
|
63
|
+
## Web API Stack
|
|
64
|
+
|
|
65
|
+
This devcontainer is configured with a complete API development stack:
|
|
66
|
+
|
|
67
|
+
### Services
|
|
68
|
+
|
|
69
|
+
- **PostgreSQL**: Primary database (port 5432)
|
|
70
|
+
- **Redis**: Cache and session store (port 6379)
|
|
71
|
+
- **OpenTelemetry Collector**: Telemetry aggregation (ports 4317, 4318)
|
|
72
|
+
- **Prometheus**: Metrics storage (port 9090)
|
|
73
|
+
- **Grafana**: Observability dashboard (port 3000)
|
|
74
|
+
- **Loki**: Log aggregation (port 3100)
|
|
75
|
+
|
|
76
|
+
### Connection Strings
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# PostgreSQL
|
|
80
|
+
DATABASE_URL="postgresql://postgres:postgres@postgres:5432/myapp"
|
|
81
|
+
|
|
82
|
+
# Redis
|
|
83
|
+
REDIS_URL="redis://redis:6379"
|
|
84
|
+
|
|
85
|
+
# OpenTelemetry
|
|
86
|
+
OTEL_EXPORTER_OTLP_ENDPOINT="http://otel-collector:4317"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Quick Start
|
|
90
|
+
|
|
91
|
+
1. Start your API on port 8000 (configured in this preset)
|
|
92
|
+
2. Access Grafana at http://localhost:3000 (admin/admin)
|
|
93
|
+
3. View metrics in Prometheus at http://localhost:9090
|
|
94
|
+
4. Check logs in Loki via Grafana
|
|
95
|
+
|
|
96
|
+
### Health Checks
|
|
97
|
+
|
|
98
|
+
All services include health checks. Verify with:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
docker-compose ps
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Next Steps
|
|
105
|
+
|
|
106
|
+
- Configure your API to use the DATABASE_URL and REDIS_URL
|
|
107
|
+
- Add OpenTelemetry SDK to your application
|
|
108
|
+
- Create custom Grafana dashboards for your API metrics
|
|
109
|
+
- Set up log forwarding to Loki
|