https://supertokens.com/ logo
Title
c

chill_cheese

01/07/2023, 2:30 PM
hostname Error when running my server, client inside docker
I'm running mysql, supertokens, server, client using docker-compose Getting this Error:
server_1 | /node_modules/supertokens-node/lib/build/recipe/session/utils.js:135 server_1 | throw new Error("Please make sure that the apiDomain and websiteDomain have correct values"); server_1 | ^
values passed for apiDomain are:
r

rp

01/07/2023, 2:31 PM
Can I see your supertokens.init code?
c

chill_cheese

01/07/2023, 2:31 PM
r

rp

01/07/2023, 2:32 PM
The value of apiDomain should be what it is from the frontend’s code point of view
So if your frontend is querying http://localhost:8000 for example, it should be set to that
c

chill_cheese

01/07/2023, 2:33 PM
ok and websiteDomain? currently It's websiteDomain: http://client:3000
r

rp

01/07/2023, 2:35 PM
Yes. That too needs to be what it will be from the browser’s point of view
So if you load on the browser http://localhost:3000 for website app, then it needs to be set to that
c

chill_cheese

01/07/2023, 2:36 PM
ok, I'll try with these