Skip to content

Commit ed607ee

Browse files
authored
try updated env file name for vite (#4683)
1 parent f9b8183 commit ed607ee

File tree

7 files changed

+12
-9
lines changed

7 files changed

+12
-9
lines changed

.github/actions/build-npm/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ runs:
2222
shell: bash
2323
run: |
2424
touch dashboard/.env
25-
echo '${{ inputs.env_vars }}' > dashboard/.env
25+
echo '${{ inputs.env_vars }}' > dashboard/.env.production
2626
- name: Run NPM Build
2727
shell: bash
2828
run: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.DS_Store
22
.env
3+
.env.local
34
docker/.env
45
docker/github_app_private_key.pem
56
app

dashboard/src/legacy/main/home/compliance-dashboard/ComplianceContext.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ export const ProjectComplianceProvider: React.FC<
121121
return;
122122
}
123123

124-
const cidrAllowList = import.meta.env.PORTER_CIDRS
125-
? import.meta.env.PORTER_CIDRS.split(",")
124+
const cidrAllowList = import.meta.env.VITE_PORTER_CIDRS
125+
? import.meta.env.VITE_PORTER_CIDRS.split(",")
126126
: [];
127127

128128
const updatedKindValues = match(latestContractProto.cluster.kindValues)

dashboard/src/main/home/compliance-dashboard/ComplianceContext.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ export const ProjectComplianceProvider: React.FC<
123123
return;
124124
}
125125

126-
const cidrAllowList = import.meta.env.PORTER_CIDRS
127-
? import.meta.env.PORTER_CIDRS.split(",")
126+
const cidrAllowList = import.meta.env.VITE_PORTER_CIDRS
127+
? import.meta.env.VITE_PORTER_CIDRS.split(",")
128128
: [];
129129

130130
const updatedKindValues = match(latestContractProto.cluster.kindValues)

dashboard/src/shared/auth/ory.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import { Configuration, FrontendApi } from "@ory/client";
44
import { type AxiosError } from "axios";
55
import { useHistory } from "react-router-dom";
66

7-
export const basePath =
8-
import.meta.env.REACT_APP_ORY_URL || "http://localhost:4000";
7+
export const basePath = import.meta.env.VITE_ORY_URL || "http://localhost:4000";
98

109
export const ory = new FrontendApi(
1110
new Configuration({

dashboard/vite.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ export default defineConfig(({ mode }) => ({
1818
build: {
1919
outDir: "build",
2020
},
21+
...(mode === "development" && {
22+
envDir: "../zarf/helm",
23+
}),
2124
server: {
2225
port: 8081,
2326
proxy: {

zarf/helm/.dashboardenv renamed to zarf/helm/.envlocal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ API_SERVER=http://localhost:8080
2020

2121
TRUST_ARN=arn:aws:iam::MY_AWS_DEV_ACCOUNT_ID:role/CAPIManagement
2222

23-
# PORTER_CIDRS are a comma-separated list of CIDRs mapping to Porter infra. Used for restricting access to a customer's control plane endpoint
23+
# VITE_PORTER_CIDRS are a comma-separated list of CIDRs mapping to Porter infra. Used for restricting access to a customer's control plane endpoint
2424
# below example is for the office IP
25-
PORTER_CIDRS="135.84.167.61/32"
25+
VITE_PORTER_CIDRS="135.84.167.61/32"
2626

0 commit comments

Comments
 (0)