Docker Experimental - Auth Cookies not being set

I am trying to use experimental docker. I have the docker images built and containers running. I’ve done the prisma migrate step and I can actually login. I see the welcome back toast! But I dont get redirected to the main page. Looks like the authentication cookies are not being set. I have made sure that set my secret session in the dockerfile but only for the api. I’ve set the secret session also for the web container but that still doesn’t work. Is there something I need to consider as the API and web are running on different docker IP addresses? Any help would be greatly appreciated

This is what I see on the api logs:

api-1      | {"level":30,"time":1712243802645,"pid":1,"hostname":"bb8bcba358cb","reqId":"req-e","req":{"method":"POST","url":"/auth","hostname":"","remoteAddress":"","remotePort":46818},"msg":"incoming request"}
api-1      | {"level":30,"time":1712243802752,"pid":1,"hostname":"bb8bcba358cb","reqId":"req-e","res":{"statusCode":200},"responseTime":106.35094500007108,"msg":"request completed"}
api-1      | {"level":30,"time":1712243802768,"pid":1,"hostname":"bb8bcba358cb","reqId":"req-f","req":{"method":"GET","url":"/auth?method=getToken","hostname":"","remoteAddress":"","remotePort":46818},"msg":"incoming request"}
api-1      | {"level":30,"time":1712243802783,"pid":1,"hostname":"bb8bcba358cb","reqId":"req-f","res":{"statusCode":200},"responseTime":14.374230000190437,"msg":"request completed"}

Just a thought. Could it be something to do with the front-end web and back-end api being on 2 different IP addresses since they are using 2 separate containers.

I recall a similar cookie issue when deploying to netlify when you have separated web and api servers.

My apps spun up with works fine for me but the same app spun up with doesnt work.

I noticed an environment variable in the dev file that isnt present in the prod file


Could this be the issue?