Skip to content

Commit ba27ebf

Browse files
authored
Merge pull request #2070 from cprussin/fix-xc-admin-frontend-build
Fix xc-admin-frontend build
2 parents 2bd159c + 9b0d113 commit ba27ebf

File tree

8 files changed

+19
-23
lines changed

8 files changed

+19
-23
lines changed

Dockerfile.node

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ USER pyth
1616

1717
FROM builder-base AS builder
1818
ARG package
19-
RUN CI=true pnpm turbo build --filter $package
19+
ENV CI true
20+
RUN pnpm turbo build --filter $package
2021
RUN pnpm deploy --filter $package --prod /srv/$package
2122

2223

apps/api-reference/eslint.config.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,4 @@ const tailwindConfig = fileURLToPath(
66
import.meta.resolve(`./tailwind.config.ts`),
77
);
88

9-
export default [
10-
...nextjs,
11-
...tailwind(tailwindConfig),
12-
...storybook,
13-
{
14-
rules: {
15-
"turbo/no-undeclared-env-vars": "off",
16-
},
17-
},
18-
];
9+
export default [...nextjs, ...tailwind(tailwindConfig), ...storybook];

apps/api-reference/src/server-config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
// and load all env variables.
33
/* eslint-disable n/no-process-env */
44

5+
// Disable the following rule because variables in this file are only loaded at
6+
// runtime and do not influence the build outputs, thus they need not be
7+
// declared to turbo for it to be able to cache build outputs correctly.
8+
/* eslint-disable turbo/no-undeclared-env-vars */
9+
510
import "server-only";
611

712
/**

apps/staking/eslint.config.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,4 @@ const tailwindConfig = fileURLToPath(
66
import.meta.resolve(`./tailwind.config.ts`),
77
);
88

9-
export default [
10-
...nextjs,
11-
...tailwind(tailwindConfig),
12-
...storybook,
13-
{
14-
rules: {
15-
"turbo/no-undeclared-env-vars": "off",
16-
},
17-
},
18-
];
9+
export default [...nextjs, ...tailwind(tailwindConfig), ...storybook];

apps/staking/src/config/server.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
// and load all env variables.
33
/* eslint-disable n/no-process-env */
44

5+
// Disable the following rule because variables in this file are only loaded at
6+
// runtime and do not influence the build outputs, thus they need not be
7+
// declared to turbo for it to be able to cache build outputs correctly.
8+
/* eslint-disable turbo/no-undeclared-env-vars */
9+
510
import "server-only";
611

712
/**

governance/xc_admin/packages/xc_admin_frontend/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ ARG NEXT_PUBLIC_RPC_POOL_TOKEN
44
ENV NEXT_TELEMETRY_DISABLED 1
55
ENV BUILD_STANDALONE true
66
ENV NEXT_PUBLIC_RPC_POOL_TOKEN $NEXT_PUBLIC_RPC_POOL_TOKEN
7-
RUN CI=true pnpm turbo build --filter @pythnetwork/xc-admin-frontend
7+
ENV CI true
8+
RUN pnpm turbo build --filter @pythnetwork/xc-admin-frontend
89

910

1011
# See https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile

governance/xc_admin/packages/xc_admin_frontend/turbo.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"tasks": {
55
"build": {
66
"dependsOn": ["pull:env", "^build"],
7-
"outputs": [".next/**", "!.next/cache/**"]
7+
"outputs": [".next/**", "!.next/cache/**"],
8+
"env": ["BUILD_STANDALONE"]
89
},
910
"pull:env": {
1011
"outputs": [".env.local"],

turbo.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"cache": false
2626
},
2727
"fix:lint": {
28+
"dependsOn": ["^build"],
2829
"cache": false
2930
},
3031
"test": {

0 commit comments

Comments
 (0)