fix: cms sync
All checks were successful
Monorepo Pipeline / 🧪 Quality Assurance (push) Successful in 2m43s
Monorepo Pipeline / 🚀 Release (push) Has been skipped
Monorepo Pipeline / 🐳 Build Directus (Base) (push) Has been skipped
Monorepo Pipeline / 🐳 Build Build-Base (push) Has been skipped
Monorepo Pipeline / 🐳 Build Gatekeeper (Product) (push) Has been skipped
Monorepo Pipeline / 🐳 Build Production Runtime (push) Has been skipped
All checks were successful
Monorepo Pipeline / 🧪 Quality Assurance (push) Successful in 2m43s
Monorepo Pipeline / 🚀 Release (push) Has been skipped
Monorepo Pipeline / 🐳 Build Directus (Base) (push) Has been skipped
Monorepo Pipeline / 🐳 Build Build-Base (push) Has been skipped
Monorepo Pipeline / 🐳 Build Gatekeeper (Product) (push) Has been skipped
Monorepo Pipeline / 🐳 Build Production Runtime (push) Has been skipped
This commit is contained in:
@@ -1,3 +0,0 @@
|
|||||||
import { nextConfig } from "@mintel/eslint-config/next";
|
|
||||||
|
|
||||||
export default nextConfig;
|
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
"dev:local": "mintel dev --local",
|
"dev:local": "mintel dev --local",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "next lint .",
|
"lint": "eslint src/",
|
||||||
"typecheck": "tsc --noEmit",
|
"typecheck": "tsc --noEmit",
|
||||||
"test": "vitest run --passWithNoTests",
|
"test": "vitest run --passWithNoTests",
|
||||||
"cms:pull:prod": "mintel directus sync pull production",
|
"cms:pull:prod": "mintel directus sync pull production",
|
||||||
|
|||||||
0
packages/cms-infra/database/RELOAD_TEST
Normal file
0
packages/cms-infra/database/RELOAD_TEST
Normal file
1203
packages/cms-infra/schema/snapshot.yaml
Normal file
1203
packages/cms-infra/schema/snapshot.yaml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,15 +1,28 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
PROJECT="directus"
|
||||||
|
SCHEMA_PATH="./directus/schema/snapshot.yaml"
|
||||||
|
CMD_PREFIX=""
|
||||||
|
|
||||||
|
if [ "$1" == "infra" ]; then
|
||||||
|
PROJECT="infra-cms"
|
||||||
|
SCHEMA_PATH="./packages/cms-infra/schema/snapshot.yaml"
|
||||||
|
CMD_PREFIX="docker-compose -f packages/cms-infra/docker-compose.yml"
|
||||||
|
else
|
||||||
|
CMD_PREFIX="docker compose"
|
||||||
|
fi
|
||||||
|
|
||||||
# Detect local container
|
# Detect local container
|
||||||
LOCAL_CONTAINER=$(docker compose ps -q directus)
|
LOCAL_CONTAINER=$($CMD_PREFIX ps -q $PROJECT)
|
||||||
|
|
||||||
if [ -z "$LOCAL_CONTAINER" ]; then
|
if [ -z "$LOCAL_CONTAINER" ]; then
|
||||||
echo "❌ Local directus container not found. Is it running?"
|
echo "❌ Local $PROJECT container not found. Is it running?"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "📸 Creating schema snapshot..."
|
echo "📸 Creating schema snapshot for $PROJECT..."
|
||||||
# Note: we save it to the mounted volume path inside the container
|
# Note: we save it to the mounted volume path inside the container
|
||||||
docker exec "$LOCAL_CONTAINER" npx directus schema snapshot /directus/schema/snapshot.yaml
|
docker exec "$LOCAL_CONTAINER" npx directus schema snapshot -y /directus/schema/snapshot.yaml
|
||||||
|
|
||||||
echo "✅ Snapshot saved to ./directus/schema/snapshot.yaml"
|
echo "✅ Snapshot saved to $SCHEMA_PATH"
|
||||||
|
|||||||
Reference in New Issue
Block a user