-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hard-code apiurl for prod, dev, stage and island to make auth work
- Loading branch information
Showing
12 changed files
with
318 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Build stage | ||
FROM node:20.11-alpine3.19 AS build | ||
|
||
RUN apk update && apk add git | ||
|
||
RUN mkdir -p /app | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json . | ||
COPY package-lock.json . | ||
|
||
RUN npm install --legacy-peer-deps | ||
|
||
COPY . . | ||
|
||
RUN npm run build -c configuration_island | ||
|
||
# ----------------- | ||
|
||
FROM nginx:1.17.1-alpine | ||
COPY --from=build /app/dist/login-demo /usr/share/nginx/html | ||
COPY ./nginx-custom.conf /etc/nginx/conf.d/default.conf | ||
EXPOSE 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Build stage | ||
FROM node:20.11-alpine3.19 AS build | ||
|
||
RUN apk update && apk add git | ||
|
||
RUN mkdir -p /app | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json . | ||
COPY package-lock.json . | ||
|
||
RUN npm install --legacy-peer-deps | ||
|
||
COPY . . | ||
|
||
RUN npm run build -c configuration_prod | ||
|
||
# ----------------- | ||
|
||
FROM nginx:1.17.1-alpine | ||
COPY --from=build /app/dist/login-demo /usr/share/nginx/html | ||
COPY ./nginx-custom.conf /etc/nginx/conf.d/default.conf | ||
EXPOSE 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Build stage | ||
FROM node:20.11-alpine3.19 AS build | ||
|
||
RUN apk update && apk add git | ||
|
||
RUN mkdir -p /app | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json . | ||
COPY package-lock.json . | ||
|
||
RUN npm install --legacy-peer-deps | ||
|
||
COPY . . | ||
|
||
RUN npm run build -c configuration_stage | ||
|
||
# ----------------- | ||
|
||
FROM nginx:1.17.1-alpine | ||
COPY --from=build /app/dist/login-demo /usr/share/nginx/html | ||
COPY ./nginx-custom.conf /etc/nginx/conf.d/default.conf | ||
EXPOSE 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import config from '../../auth_config.json'; | ||
|
||
const { domain, clientId, authorizationParams: { audience }, apiUri, errorPath } = config as { | ||
domain: string; | ||
clientId: string; | ||
authorizationParams: { | ||
audience?: string; | ||
}, | ||
apiUri: string; | ||
errorPath: string; | ||
}; | ||
|
||
export const environment = { | ||
production: true, | ||
auth: { | ||
domain, | ||
clientId, | ||
authorizationParams: { | ||
audience: `${audience}`, | ||
redirect_uri: window.location.origin, | ||
}, | ||
errorPath, | ||
}, | ||
apiUri: `${apiUri}`, | ||
httpInterceptor: { | ||
allowedList: [ | ||
{ | ||
// uri: `${config.apiUri}/api/*`, | ||
// uri: `${apiUri}/api/*`, | ||
// uri: '/api/*', | ||
uri: 'https://vcell-dev.cam.uchc.edu/api/*', | ||
|
||
// allowAnonymous: true, | ||
tokenOptions: { | ||
authorizationParams: { | ||
audience: `${audience}`, | ||
scope: 'openid profile email' | ||
} | ||
} | ||
}, | ||
], | ||
|
||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import config from '../../auth_config.json'; | ||
|
||
const { domain, clientId, authorizationParams: { audience }, apiUri, errorPath } = config as { | ||
domain: string; | ||
clientId: string; | ||
authorizationParams: { | ||
audience?: string; | ||
}, | ||
apiUri: string; | ||
errorPath: string; | ||
}; | ||
|
||
export const environment = { | ||
production: true, | ||
auth: { | ||
domain, | ||
clientId, | ||
authorizationParams: { | ||
audience: `${audience}`, | ||
redirect_uri: window.location.origin, | ||
}, | ||
errorPath, | ||
}, | ||
apiUri: `${apiUri}`, | ||
httpInterceptor: { | ||
allowedList: [ | ||
{ | ||
// uri: `${config.apiUri}/api/*`, | ||
// uri: `${apiUri}/api/*`, | ||
// uri: '/api/*', | ||
uri: 'https://minikube-island/api/*', | ||
|
||
// allowAnonymous: true, | ||
tokenOptions: { | ||
authorizationParams: { | ||
audience: `${audience}`, | ||
scope: 'openid profile email' | ||
} | ||
} | ||
}, | ||
], | ||
|
||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import config from '../../auth_config.json'; | ||
|
||
const { domain, clientId, authorizationParams: { audience }, apiUri, errorPath } = config as { | ||
domain: string; | ||
clientId: string; | ||
authorizationParams: { | ||
audience?: string; | ||
}, | ||
apiUri: string; | ||
errorPath: string; | ||
}; | ||
|
||
export const environment = { | ||
production: true, | ||
auth: { | ||
domain, | ||
clientId, | ||
authorizationParams: { | ||
audience: `${audience}`, | ||
redirect_uri: window.location.origin, | ||
}, | ||
errorPath, | ||
}, | ||
apiUri: `${apiUri}`, | ||
httpInterceptor: { | ||
allowedList: [ | ||
{ | ||
// uri: `${config.apiUri}/api/*`, | ||
// uri: `${apiUri}/api/*`, | ||
// uri: '/api/*', | ||
uri: 'https://vcell-stage.cam.uchc.edu/api/*', | ||
|
||
// allowAnonymous: true, | ||
tokenOptions: { | ||
authorizationParams: { | ||
audience: `${audience}`, | ||
scope: 'openid profile email' | ||
} | ||
} | ||
}, | ||
], | ||
|
||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters