Compare commits
4 Commits
v1.3.5
...
bb0debe29d
| Author | SHA1 | Date | |
|---|---|---|---|
| bb0debe29d | |||
| f2e855fff9 | |||
| b603490683 | |||
| 68075edb77 |
@@ -74,6 +74,7 @@ AUTH_COOKIE_NAME=mintel_gatekeeper_session
|
|||||||
|
|
||||||
# Sentry / Glitchtip (Error Tracking)
|
# Sentry / Glitchtip (Error Tracking)
|
||||||
SENTRY_DSN=
|
SENTRY_DSN=
|
||||||
|
NEXT_PUBLIC_SENTRY_DSN=
|
||||||
|
|
||||||
# Gotify (In-App Notifications)
|
# Gotify (In-App Notifications)
|
||||||
# GOTIFY_URL=
|
# GOTIFY_URL=
|
||||||
|
|||||||
@@ -281,6 +281,7 @@ jobs:
|
|||||||
NEXT_PUBLIC_BASE_URL=$NEXT_PUBLIC_BASE_URL
|
NEXT_PUBLIC_BASE_URL=$NEXT_PUBLIC_BASE_URL
|
||||||
GATEKEEPER_ORIGIN=$GATEKEEPER_ORIGIN
|
GATEKEEPER_ORIGIN=$GATEKEEPER_ORIGIN
|
||||||
SENTRY_DSN=$SENTRY_DSN
|
SENTRY_DSN=$SENTRY_DSN
|
||||||
|
NEXT_PUBLIC_SENTRY_DSN=$SENTRY_DSN
|
||||||
PROJECT_COLOR=$PROJECT_COLOR
|
PROJECT_COLOR=$PROJECT_COLOR
|
||||||
LOG_LEVEL=$LOG_LEVEL
|
LOG_LEVEL=$LOG_LEVEL
|
||||||
|
|
||||||
@@ -341,11 +342,24 @@ jobs:
|
|||||||
|
|
||||||
# Apply Payload Migrations using the target app container's programmatic endpoint
|
# Apply Payload Migrations using the target app container's programmatic endpoint
|
||||||
ssh root@alpha.mintel.me "cd $SITE_DIR && echo '→ Waiting for DB and Running Payload Migrations...' && \
|
ssh root@alpha.mintel.me "cd $SITE_DIR && echo '→ Waiting for DB and Running Payload Migrations...' && \
|
||||||
for i in {1..5}; do \
|
for i in {1..15}; do \
|
||||||
echo \"Attempt \$i...\"; \
|
echo \"Attempt \$i...\"; \
|
||||||
docker compose -p '${{ needs.prepare.outputs.project_name }}' --env-file '$ENV_FILE' exec -T mb-grid-app sh -c 'curl -s -f -X POST -H \"Authorization: Bearer \$PAYLOAD_SECRET\" http://localhost:3000/api/payload/migrate \
|
docker compose -p '${{ needs.prepare.outputs.project_name }}' --env-file '$ENV_FILE' exec -T mb-grid-app sh -c 'curl -s -i -X POST -H \"Authorization: Bearer \$PAYLOAD_SECRET\" http://localhost:3000/api/payload/migrate' > /tmp/migrate_res 2>&1; \
|
||||||
|| { echo \"HTTP error or DB not ready.\"; exit 1; }' && { echo '✅ Migrations successful!'; break; } \
|
if grep -q \"200 OK\" /tmp/migrate_res; then \
|
||||||
|| { if [ \$i -eq 5 ]; then echo '❌ Migration failed after 5 attempts!'; exit 1; else echo '⏳ Retrying in 5s...'; sleep 5; fi; }; \
|
echo \"✅ Migrations successful!\"; \
|
||||||
|
cat /tmp/migrate_res; \
|
||||||
|
break; \
|
||||||
|
else \
|
||||||
|
echo \"❌ Attempt \$i failed. Response:\"; \
|
||||||
|
cat /tmp/migrate_res; \
|
||||||
|
if [ \$i -eq 15 ]; then \
|
||||||
|
echo \"❌ Migration failed after 15 attempts! Dumping app logs...\"; \
|
||||||
|
docker compose -p '${{ needs.prepare.outputs.project_name }}' --env-file '$ENV_FILE' logs --tail 100 mb-grid-app; \
|
||||||
|
exit 1; \
|
||||||
|
fi; \
|
||||||
|
echo \"⏳ Retrying in 5s...\"; \
|
||||||
|
sleep 5; \
|
||||||
|
fi; \
|
||||||
done"
|
done"
|
||||||
|
|
||||||
ssh root@alpha.mintel.me "docker system prune -f --filter 'until=24h'"
|
ssh root@alpha.mintel.me "docker system prune -f --filter 'until=24h'"
|
||||||
|
|||||||
10
instrumentation.ts
Normal file
10
instrumentation.ts
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
export async function register() {
|
||||||
|
if (process.env.NEXT_RUNTIME === 'nodejs') {
|
||||||
|
await import('./sentry.server.config');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (process.env.NEXT_RUNTIME === 'edge') {
|
||||||
|
await import('./sentry.edge.config');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -36,14 +36,12 @@ function createConfig() {
|
|||||||
},
|
},
|
||||||
|
|
||||||
errors: {
|
errors: {
|
||||||
glitchtip: {
|
// Use NEXT_PUBLIC_SENTRY_DSN if available (required for browser-side SDK)
|
||||||
// Use SENTRY_DSN for both server and client (proxied)
|
dsn: env.NEXT_PUBLIC_SENTRY_DSN || (env as any).SENTRY_DSN,
|
||||||
dsn: env.SENTRY_DSN,
|
|
||||||
// The proxied origin used in the frontend
|
// The proxied origin used in the frontend
|
||||||
proxyPath: "/errors",
|
proxyPath: "/errors",
|
||||||
enabled: Boolean(env.SENTRY_DSN),
|
enabled: Boolean(env.SENTRY_DSN),
|
||||||
},
|
},
|
||||||
},
|
|
||||||
|
|
||||||
cache: {
|
cache: {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import {
|
|||||||
const envExtension = {
|
const envExtension = {
|
||||||
// Project specific overrides or additions
|
// Project specific overrides or additions
|
||||||
AUTH_COOKIE_NAME: z.string().default("mb_gatekeeper_session"),
|
AUTH_COOKIE_NAME: z.string().default("mb_gatekeeper_session"),
|
||||||
|
NEXT_PUBLIC_SENTRY_DSN: z.string().optional(),
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user