Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .env.local
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
EDITION=ce
NEXT_PUBLIC_EDITION=ce

SAGITTARIUS_GRAPHQL_URL=http://localhost:3010/graphql

NEXT_PUBLIC_SCULPTOR_VERSION=0.0.0
NEXT_PUBLIC_PICTOR_VERSION=0.5.0
NEXT_PUBLIC_ALLOWED_REDIRECT_DOMAINS=*.code0.tech,*.codezero.build
NEXT_PUBLIC_ALLOWED_REDIRECT_DOMAINS=*.code0.tech,*.codezero.build

NEXT_PUBLIC_OTEL_SERVICE_NAME="sculptor-client"
NEXT_PUBLIC_OTEL_HEADER="Authorization: Basic <auth-token>"
NEXT_PUBLIC_OTEL_ENVIRONMENT="development"

OTEL_SERVICE_NAME="sculptor-server"
OTEL_HEADER="Authorization: Basic <auth-token>"

NEXT_PUBLIC_OTEL_LOGS_ENDPOINT="http://localhost:4318/v1/logs"
OTEL_LOGS_ENDPOINT="http://localhost:4318/v1/logs"

NEXT_PUBLIC_OTEL_TRACES_ENDPOINT="http://localhost:4318/v1/traces"
OTEL_TRACES_ENDPOINT="http://localhost:4318/v1/traces"

OTEL_METRICS_ENDPOINT="http://localhost:4318/v1/metrics"
3 changes: 2 additions & 1 deletion edition.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ try {

envContent = envContent
.replace(/^NEXT_PUBLIC_SCULPTOR_VERSION=.*$/m, `NEXT_PUBLIC_SCULPTOR_VERSION=${sculptorVersion}`)
.replace(/^NEXT_PUBLIC_PICTOR_VERSION=.*$/m, `NEXT_PUBLIC_PICTOR_VERSION=${pictorVersion}`);
.replace(/^NEXT_PUBLIC_PICTOR_VERSION=.*$/m, `NEXT_PUBLIC_PICTOR_VERSION=${pictorVersion}`)
.replace(/^NEXT_PUBLIC_EDITION=.*$/m, `NEXT_PUBLIC_EDITION=${edition}`);

fs.writeFileSync(envPath, envContent.trim(), 'utf-8');
console.log(`[set-edition] Versions written to .env.local`);
1 change: 1 addition & 0 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const cspHeader = `
form-action 'self';
frame-ancestors 'none';
worker-src 'self' blob: data: *;
connect-src 'self' ${SAGITTARIUS_GRAPHQL_URL} ${process.env.NEXT_PUBLIC_OTEL_LOGS_ENDPOINT} ${process.env.NEXT_PUBLIC_OTEL_TRACES_ENDPOINT};
`

const nextConfig: NextConfig = {
Expand Down
Loading