You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .cursor/skills/argocd-gitops-push/SKILL.md
+17-14Lines changed: 17 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,33 +9,36 @@ description: When adding or changing files under infra/k8s/ or sync targets for
9
9
10
10
When adding or changing files under:
11
11
12
-
-`infra/k8s/` (local, base, or app-of-apps manifests and referenced resources),
13
-
- Or any path that is part of an Argo CD Application source (e.g. `infra/k8s/local/apps`, `infra/k8s/local/stack`, `infra/k8s/base/stack`, source under base, and files referenced by those via Kustomize),
14
-
- Or **canonical linear migration SQL** under `infra/k8s/base/ops/source/database/linear-migrations/{app,management}/` (versioned chain applied by the linear migration runner),
15
-
- Or **ops** manifests under `infra/k8s/base/ops/` (Kustomize bundles: migration CronJob SQL, scripts mounted into jobs, and related `kustomization.yaml` entries that must stay in sync with on-disk files).
12
+
-**`infra/k8s/base/`** – reusable Kustomize bases per component (referenced by alpha overlays and/or your GitOps repo),
13
+
-**`infra/k8s/alpha/`** – in-repo alpha app-of-apps and child overlays,
- Any path that is part of an **Argo CD Application** source in **your GitOps repository** (paths vary by installation),
16
+
-**Canonical linear migration SQL** under `infra/k8s/base/ops/source/database/linear-migrations/{app,management}/`,
17
+
-**Ops** manifests under `infra/k8s/base/ops/` (migration CronJobs, mounted scripts, `kustomization.yaml` entries).
16
18
17
19
## What Argo CD syncs
18
20
19
-
-The local app points at repo path `infra/k8s/local/apps` (see `infra/k8s/local-application.yaml`), which references `infra/k8s/local/stack` and the base stack.
20
-
-The alpha app-of-apps root points at repo path `infra/k8s/alpha/apps`(see `infra/k8s/alpha-application.yaml`), which references `infra/k8s/alpha/<component>/` overlays.
21
-
- Only the **remote** Git repo at the configured revision (e.g. `develop`) is used; the agent does not push. The user must push for Argo CD to see changes.
21
+
-**Alpha:** Root **`infra/k8s/alpha-application.yaml`** (when applied) points at **`infra/k8s/alpha/apps`**, which references **`infra/k8s/alpha/<component>/`** overlays.
22
+
-**Remote environments:** Application CRs usually live in your **GitOps repo** and reference paths/branches you configure (see [docs/development/k8s/REMOTE-K8S-GITOPS.md](../../../docs/development/k8s/REMOTE-K8S-GITOPS.md)).
23
+
- Only the **remote** Git revision Argo CD tracks is authoritative; the agent does not push.
22
24
23
25
## When a push is required
24
26
25
-
Any change to files under those paths (or to canonical sources that get copied into them) means the cluster will not reflect the change until the user pushes to the branch Argo CD tracks.
27
+
Any change to synced paths (or canonical sources copied into them) is invisible to the cluster until those commits are on the branch Argo CD watches (**often `develop` / `main` on the GitOps repo**).
26
28
27
29
## Response requirement
28
30
29
-
When your file-modifying work touches any of these paths, add a short **Push to Git** note in the response (e.g. before or after the verification block):
31
+
When file-modifying work touches **`infra/k8s/`** or migration SQL under **`infra/k8s/base/ops/`**, add a short **Push to Git** note:
30
32
31
-
**Push to Git:** This change affects Argo CD–synced manifests. Push to the branch Argo CD tracks (e.g. `develop`) for the cluster to sync.
33
+
**Push to Git:** This change affects Argo CD–synced manifests. Push to the branch Argo CD tracks so the cluster can sync.
32
34
33
35
## Version updates (GitOps)
34
36
35
-
-**Manifest changes** (image tags, env, resources, new deployments): Updating the manifest is the change; push is required for Argo CD (covered by the response reminder above).
36
-
-**npm/package versions:** Follow the existing AGENTS.md Dependencies section; no separate version rule for GitOps.
37
+
-**Manifest changes** (image tags, env, resources): push so Argo CD picks them up.
38
+
-**npm/package versions:** Follow AGENTS.md Dependencies; no separate GitOps-only rule.
37
39
38
40
## See also
39
41
40
-
-[infra/k8s/INFRA-K8S.md](infra/k8s/INFRA-K8S.md) – k8s layout and local app-of-apps.
41
-
-[docs/development/k8s/K3D-ARGOCD-LOCAL.md](docs/development/k8s/K3D-ARGOCD-LOCAL.md) – Local k3d + Argo CD setup.
42
+
-[infra/k8s/INFRA-K8S.md](../../../infra/k8s/INFRA-K8S.md) – layout and consumption.
-**Credentials:****app** migrations use `DB_APP_MIGRATOR_USER`, `DB_APP_MIGRATOR_PASSWORD`, `DB_APP_NAME`, `DB_HOST`, and `DB_PORT`. **Management** migrations use `DB_MANAGEMENT_MIGRATOR_USER`, `DB_MANAGEMENT_MIGRATOR_PASSWORD`, `DB_MANAGEMENT_NAME`, `DB_HOST`, and `DB_PORT`. Optional: `infra/config/local/db.env` when keys are unset before sourcing.
27
+
- K8s wrapper: `bash scripts/database/run-linear-migrations-k8s.sh` (`--database` required); validates the same keys from Secrets.
27
28
- Validate: `bash scripts/database/validate-linear-migrations.sh` (and `--check-db` to compare on-disk checksums to `linear_migration_history` when a DB is available).
- The migration runner **creates** the `linear_migration_history` table if missing; do not rely on a dedicated SQL file for that.
@@ -39,13 +39,13 @@ version: 1.0.0
39
39
40
40
## Environment keys (admin vs image)
41
41
42
-
-**Authoritative in secrets and generated env:**`DB_APP_ADMIN_USER` / `DB_APP_ADMIN_PASSWORD`, `DB_MANAGEMENT_ADMIN_USER` / `DB_MANAGEMENT_ADMIN_PASSWORD`, plus read-only and read-write keys and `DB_APP_NAME` / `DB_MANAGEMENT_NAME` (see `infra/config/env-templates/db.env.example` and local `infra/config/local/db.env` after `scripts/local-env/setup.sh`).
43
-
- The **postgres** container image still reads `POSTGRES_USER` / `POSTGRES_PASSWORD` / `POSTGRES_DB` at runtime—**map** those from the `DB_*_ADMIN_*` and `DB_APP_NAME` keys in Compose or Deployment `env`, not the reverse.
42
+
-**Authoritative in secrets and generated env:**owner keys (`DB_APP_OWNER_*`, `DB_MANAGEMENT_OWNER_*`) for bootstrap, migrator keys (`DB_APP_MIGRATOR_*`, `DB_MANAGEMENT_MIGRATOR_*`) for linear migrations, plus read-write and read keys and `DB_APP_NAME` / `DB_MANAGEMENT_NAME` (see `infra/config/env-templates/db.env.example` and local `infra/config/local/db.env` after `scripts/local-env/setup.sh`).
43
+
- The **postgres** container image still reads `POSTGRES_USER` / `POSTGRES_PASSWORD` / `POSTGRES_DB` at runtime—**map** those from `DB_APP_OWNER_USER` / `DB_APP_OWNER_PASSWORD` and `DB_APP_NAME` in Compose or Deployment `env`, not the reverse.
44
44
45
45
## Cross-repo invariants
46
46
47
47
- Canonical forward-only trees under `infra/k8s/base/ops/source/database/linear-migrations/`.
48
-
- Generated bootstrap baseline artifacts `0003` and `0004` are machine-derived and committed.
48
+
- Generated bootstrap baseline artifacts `0003a` and `0003b` are machine-derived and committed.
49
49
- Same npm script naming model in root `package.json` (`db:migrate:linear:*`, `db:validate:linear`, etc.). Product-specific naming differences are expected.
description: When adding or changing preconditions, cleanup steps, or env usage for local Docker Compose, keep behavior aligned with shared infra/config/local/*.env and documented teardown flows.
4
+
---
5
+
6
+
# Local Docker Compose env alignment
7
+
8
+
## When to use
9
+
10
+
When you:
11
+
12
+
- Add or change **`make`** targets that touch **`infra/config/local/*.env`** or local containers (`metaboost_local_*`),
13
+
- Add guards to **`local_env_clean`** / **`local_clean`**, or
14
+
- Document local env setup / teardown.
15
+
16
+
Metaboost does **not** ship an in-repo local Kubernetes (k3d) path; cluster validation is **remote GitOps**.
17
+
18
+
## Do
19
+
20
+
- Keep **`local_env_clean`** blocked while **Docker Compose** Metaboost local containers are running (`make local_down` first).
21
+
- Keep **`local_clean`** as full teardown: **`local_down`**, **`local_down_volumes`**, **`test_clean`** (and any other documented test/E2E containers).
22
+
- Document that **`make local_env_setup`** and Compose share **`infra/config/local/*.env`** where applicable.
23
+
24
+
## Don't
25
+
26
+
- Reference k3d or `make local_k3d_*` (removed).
27
+
28
+
## Reference targets
29
+
30
+
-**`local_env_clean`**: Aborts if `metaboost_local_*` containers are running.
31
+
-**`local_clean`**: Docker + volumes + test stack teardown.
Copy file name to clipboardExpand all lines: .cursor/skills/web/SKILL.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,8 +12,9 @@ version: 1.0.0
12
12
## Runtime config (sidecar)
13
13
14
14
- The Next.js app can load runtime config from a sidecar server when `RUNTIME_CONFIG_URL` is set.
15
-
- Sidecar runs on a separate port (e.g. 3001) and serves GET `/runtime-config` with env-derived JSON.
15
+
- Sidecar runs on a separate port (e.g. 4001) and serves GET `/runtime-config` with env-derived JSON.
16
16
-`instrumentation.ts` runs once at server start and fetches config; it is stored in a global/store and used in layout and components.
17
+
- Root layout only calls the sidecar when `RUNTIME_CONFIG_URL` is set; on failure it falls back to `getRuntimeConfig()` (`process.env` in dev). Kubernetes bases put `RUNTIME_CONFIG_URL` in `infra/k8s/base/web/source/web.env` (ConfigMap `metaboost-web-config`), not only as a Deployment literal.
17
18
18
19
## Structure
19
20
@@ -26,3 +27,4 @@ version: 1.0.0
26
27
-`npm run dev` – Next.js dev server
27
28
-`npm run dev:sidecar` – Run sidecar (after building it)
28
29
- From root: `npm run dev:web-sidecar` – Build sidecar then run web with sidecar
30
+
-`npm run validate-env -w @metaboost/web` (and `-w @metaboost/management-web`) – optional pre-build check that `RUNTIME_CONFIG_URL` is a valid http(s) URL (loads `.env.local` / `.env` like Podverse `validate-env`).
0 commit comments