creamy-iron-5034
03/11/2021, 4:22 PMNEXTAUTH_URL
which should be the URL used on deployed instance, however, for my staging environment this is dynamic and not known e.g.
const app = new gcp.cloudrun.Service(`app`, {
location,
template: {
spec: {
containers: [
{
// Use pushed image from CI (assume local if not)
image: pulumi.interpolate`<http://gcr.io/${gcp.config.project}/app:${prNumber}|gcr.io/${gcp.config.project}/app:${prNumber}>`,
ports: [{ containerPort: 3000 }],
resources: {
limits: {
memory: `1Gi`,
},
},
},
],
containerConcurrency: 50,
},
},
metadata: {
annotations: {
"<http://run.googleapis.com/cloudsql-instances|run.googleapis.com/cloudsql-instances>": pgInstance.connectionName,
},
},
});
e.g. yields https://some-chars.a.run.app
and is available as
// Export the URL
export const appUrl = app.statuses[0].url;
But I am not sure you can include setting this back to the cloud run env variable?acceptable-army-69872
03/11/2021, 4:27 PMNEXTAUTH_URL
looks intended to be a "friendly" name for a user to interact with. My guess is you need to pick a friendly name <http://blah.mydomain.com|blah.mydomain.com>
and then create a the dns entry by hand or based on the output of app.statuses[0].url.get()
.creamy-iron-5034
03/11/2021, 4:33 PMDomainMapping
and then this way I can categorically know what my domain will be e.g. <http://staging.domain.com|staging.domain.com>
and not use the dynamic url's that are output, this way it is safe. I think that this has to be set for production deploys rather than for users (AFAIK) - bit of a funny req