Skip to content

Commit

Permalink
Merge pull request #2070 from cprussin/fix-xc-admin-frontend-build
Browse files Browse the repository at this point in the history
Fix xc-admin-frontend build
  • Loading branch information
cprussin authored Oct 26, 2024
2 parents 2bd159c + 9b0d113 commit ba27ebf
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 23 deletions.
3 changes: 2 additions & 1 deletion Dockerfile.node
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ USER pyth

FROM builder-base AS builder
ARG package
RUN CI=true pnpm turbo build --filter $package
ENV CI true
RUN pnpm turbo build --filter $package
RUN pnpm deploy --filter $package --prod /srv/$package


Expand Down
11 changes: 1 addition & 10 deletions apps/api-reference/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,4 @@ const tailwindConfig = fileURLToPath(
import.meta.resolve(`./tailwind.config.ts`),
);

export default [
...nextjs,
...tailwind(tailwindConfig),
...storybook,
{
rules: {
"turbo/no-undeclared-env-vars": "off",
},
},
];
export default [...nextjs, ...tailwind(tailwindConfig), ...storybook];
5 changes: 5 additions & 0 deletions apps/api-reference/src/server-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
// and load all env variables.
/* eslint-disable n/no-process-env */

// Disable the following rule because variables in this file are only loaded at
// runtime and do not influence the build outputs, thus they need not be
// declared to turbo for it to be able to cache build outputs correctly.
/* eslint-disable turbo/no-undeclared-env-vars */

import "server-only";

/**
Expand Down
11 changes: 1 addition & 10 deletions apps/staking/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,4 @@ const tailwindConfig = fileURLToPath(
import.meta.resolve(`./tailwind.config.ts`),
);

export default [
...nextjs,
...tailwind(tailwindConfig),
...storybook,
{
rules: {
"turbo/no-undeclared-env-vars": "off",
},
},
];
export default [...nextjs, ...tailwind(tailwindConfig), ...storybook];
5 changes: 5 additions & 0 deletions apps/staking/src/config/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
// and load all env variables.
/* eslint-disable n/no-process-env */

// Disable the following rule because variables in this file are only loaded at
// runtime and do not influence the build outputs, thus they need not be
// declared to turbo for it to be able to cache build outputs correctly.
/* eslint-disable turbo/no-undeclared-env-vars */

import "server-only";

/**
Expand Down
3 changes: 2 additions & 1 deletion governance/xc_admin/packages/xc_admin_frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ ARG NEXT_PUBLIC_RPC_POOL_TOKEN
ENV NEXT_TELEMETRY_DISABLED 1
ENV BUILD_STANDALONE true
ENV NEXT_PUBLIC_RPC_POOL_TOKEN $NEXT_PUBLIC_RPC_POOL_TOKEN
RUN CI=true pnpm turbo build --filter @pythnetwork/xc-admin-frontend
ENV CI true
RUN pnpm turbo build --filter @pythnetwork/xc-admin-frontend


# See https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile
Expand Down
3 changes: 2 additions & 1 deletion governance/xc_admin/packages/xc_admin_frontend/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"tasks": {
"build": {
"dependsOn": ["pull:env", "^build"],
"outputs": [".next/**", "!.next/cache/**"]
"outputs": [".next/**", "!.next/cache/**"],
"env": ["BUILD_STANDALONE"]
},
"pull:env": {
"outputs": [".env.local"],
Expand Down
1 change: 1 addition & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"cache": false
},
"fix:lint": {
"dependsOn": ["^build"],
"cache": false
},
"test": {
Expand Down

0 comments on commit ba27ebf

Please sign in to comment.