expose public URI routes in ui

This commit is contained in:
41666 2020-12-06 07:24:46 -05:00
parent 9ba1334e2b
commit 4ef4badec3
3 changed files with 16 additions and 1 deletions

View file

@ -1,3 +1,7 @@
module.exports = { module.exports = {
// target: 'serverless', // target: 'serverless',
publicRuntimeConfig: {
apiPublicURI: process.env.API_PUBLIC_URI,
uiPublicURI: process.env.UI_PUBLIC_URI,
},
}; };

View file

@ -1,6 +1,9 @@
import getConfig from 'next/config';
import * as React from 'react'; import * as React from 'react';
import { AuthLogin } from 'roleypoly/design-system/templates/auth-login'; import { AuthLogin } from 'roleypoly/design-system/templates/auth-login';
const { publicRuntimeConfig } = getConfig();
const loginPage = () => { const loginPage = () => {
const onSendSecretCode = (code: string) => { const onSendSecretCode = (code: string) => {
console.log(code); console.log(code);
@ -8,7 +11,7 @@ const loginPage = () => {
return ( return (
<AuthLogin <AuthLogin
onSendSecretCode={onSendSecretCode} onSendSecretCode={onSendSecretCode}
discordOAuthLink="http://localhost:6600/login-bounce" discordOAuthLink={`${publicRuntimeConfig.apiPublicURI}/login-bounce`}
/> />
); );
}; };

View file

@ -28,8 +28,16 @@ resource "google_cloud_run_service" "web" {
} }
} }
} }
metadata {
annotations = {
"autoscaling.knative.dev/maxScale" = "10"
}
}
} }
traffic { traffic {
percent = 100 percent = 100
latest_revision = true latest_revision = true