diff --git a/app/[locale]/page.tsx b/app/[locale]/page.tsx index 69b09c6..0f054b4 100644 --- a/app/[locale]/page.tsx +++ b/app/[locale]/page.tsx @@ -26,7 +26,7 @@ export default async function Page() { categories.map(category => (
{category.name} diff --git a/src/helpers/pocketbase.ts b/src/helpers/pocketbase.ts index 8eeba15..1e30da4 100644 --- a/src/helpers/pocketbase.ts +++ b/src/helpers/pocketbase.ts @@ -3,10 +3,13 @@ import Pocketbase from 'pocketbase' var pb: Pocketbase -// -- Internal -if (typeof window === 'undefined') pb = new Pocketbase('http://127.0.0.1:' + process.env.POCKETBASE_PORT) +// -- Server +if (typeof window === 'undefined') { + if (process.env.COMPOSE_PROFILES?.toLocaleLowerCase() != 'prod') pb = new Pocketbase('http://0.0.0.0:8090') + else pb = new Pocketbase('http://pocketbase:' + process.env.POCKETBASE_PORT) +} -// -- Remote +// -- Client else { pb = new Pocketbase(process.env.NEXT_PUBLIC_POCKETBASE_URL)