Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try updated env file name for vite #4683

Merged
merged 5 commits into from
May 22, 2024
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
2 changes: 1 addition & 1 deletion .github/actions/build-npm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ runs:
shell: bash
run: |
touch dashboard/.env
echo '${{ inputs.env_vars }}' > dashboard/.env
echo '${{ inputs.env_vars }}' > dashboard/.env.production
- name: Run NPM Build
shell: bash
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DS_Store
.env
.env.local
docker/.env
docker/github_app_private_key.pem
app
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ export const ProjectComplianceProvider: React.FC<
return;
}

const cidrAllowList = import.meta.env.PORTER_CIDRS
? import.meta.env.PORTER_CIDRS.split(",")
const cidrAllowList = import.meta.env.VITE_PORTER_CIDRS
? import.meta.env.VITE_PORTER_CIDRS.split(",")
: [];

const updatedKindValues = match(latestContractProto.cluster.kindValues)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ export const ProjectComplianceProvider: React.FC<
return;
}

const cidrAllowList = import.meta.env.PORTER_CIDRS
? import.meta.env.PORTER_CIDRS.split(",")
const cidrAllowList = import.meta.env.VITE_PORTER_CIDRS
? import.meta.env.VITE_PORTER_CIDRS.split(",")
: [];

const updatedKindValues = match(latestContractProto.cluster.kindValues)
Expand Down
3 changes: 1 addition & 2 deletions dashboard/src/shared/auth/ory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import { Configuration, FrontendApi } from "@ory/client";
import { type AxiosError } from "axios";
import { useHistory } from "react-router-dom";

export const basePath =
import.meta.env.REACT_APP_ORY_URL || "http://localhost:4000";
export const basePath = import.meta.env.VITE_ORY_URL || "http://localhost:4000";

export const ory = new FrontendApi(
new Configuration({
Expand Down
3 changes: 3 additions & 0 deletions dashboard/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ export default defineConfig(({ mode }) => ({
build: {
outDir: "build",
},
...(mode === "development" && {
envDir: "../zarf/helm",
}),
server: {
port: 8081,
proxy: {
Expand Down
4 changes: 2 additions & 2 deletions zarf/helm/.dashboardenv → zarf/helm/.envlocal
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ API_SERVER=http://localhost:8080

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

# PORTER_CIDRS are a comma-separated list of CIDRs mapping to Porter infra. Used for restricting access to a customer's control plane endpoint
# 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
# below example is for the office IP
PORTER_CIDRS="135.84.167.61/32"
VITE_PORTER_CIDRS="135.84.167.61/32"

Loading