🐛 Fix database for docker container

This commit is contained in:
Manuel
2023-08-23 22:18:31 +02:00
parent c06905bfd0
commit 4a04725aaf
3 changed files with 6 additions and 1 deletions

View File

@@ -41,6 +41,10 @@ const getTrpcConfiguration = () => ({
const getBaseUrl = () => {
if (typeof window !== 'undefined') return ''; // browser should use relative url
if (env.HOSTNAME) {
console.log('Constructing internal hostname address using', env.HOSTNAME, env.NEXT_PUBLIC_PORT);
return `http://${env.HOSTNAME}:${env.NEXT_PUBLIC_PORT}`;
}
return `http://localhost:${env.NEXT_PUBLIC_PORT ?? 3000}`; // dev SSR should use localhost
};