Access zitadel from docker compose app + browser
Use case: to do app with oauth - I want to test how zitadel works now, not building anything serious yet
Environment: self hosted (docker compose)
Version: latest
Stack: Svelte Kit Auth, docker compose
Expectations: access to zitadel both from my browser and from an app in docker compose, setup alongside zitadel (in the same network)
What went wrong: I set up Zitadel in docker compose (service: zitadel), alongside my svelte kit app. I set the external domain to localhost, created a zitadel project and added a new PKCE web app - I can access Zitadel just fine from my browser.
Now I want to set up auth in my app, I'm using SvelteKitAuth, but I suppose the issue I'm about to describe happens with all auth libraries/web frameworks.
I set the the issuer in SvelteKitAuth to http://localhost:8080 (that's what I'm using to access zitadel in my browser), but it doesn't work - my app lives in docker compose network, it cannot access zitadel via localhost. I then tried to change the external domain to http://zitadel:8080 and it worked in my app, but then I couldn't access zitadel from my browser...
I spent an entire evening banging my head, trying different configurations, trying stuff dfferent LLMs suggest, but nothing worked - either the zitadel works in browser or in my app.
I expect docker compose + web framework to be pretty common setup... Do you have any suggestions how can I fix the setup, so it works in both browser and my app?
Environment: self hosted (docker compose)
Version: latest
Stack: Svelte Kit Auth, docker compose
Expectations: access to zitadel both from my browser and from an app in docker compose, setup alongside zitadel (in the same network)
What went wrong: I set up Zitadel in docker compose (service: zitadel), alongside my svelte kit app. I set the external domain to localhost, created a zitadel project and added a new PKCE web app - I can access Zitadel just fine from my browser.
Now I want to set up auth in my app, I'm using SvelteKitAuth, but I suppose the issue I'm about to describe happens with all auth libraries/web frameworks.
I set the the issuer in SvelteKitAuth to http://localhost:8080 (that's what I'm using to access zitadel in my browser), but it doesn't work - my app lives in docker compose network, it cannot access zitadel via localhost. I then tried to change the external domain to http://zitadel:8080 and it worked in my app, but then I couldn't access zitadel from my browser...
I spent an entire evening banging my head, trying different configurations, trying stuff dfferent LLMs suggest, but nothing worked - either the zitadel works in browser or in my app.
I expect docker compose + web framework to be pretty common setup... Do you have any suggestions how can I fix the setup, so it works in both browser and my app?
