Hi team, I'm actually facing a problem.. I have a ...
# general
Hi team, I'm actually facing a problem.. I have a postgres instance running on a seperate container, and I want to connect supertokens container to the postgres container. I think I am facing issue at POSTGRESQL_HOST.. This is my docker command: sudo docker run -p 3567:3567 -e POSTGRESQL_USER="postgres" -e POSTGRESQL_PASSWORD="postgres" -e POSTGRESQL_HOST="host" -e POSTGRESQL_PORT="5432" -e POSTGRESQL_DATABASE_NAME="supertokens" -d registry.supertokens.io/supertokens/supertokens-postgresql This is my postgres docker-compose.yml: version: '3' services: db: image: postgres:latest environment: POSTGRES_USER: user POSTGRES_PASSWORD: pass POSTGRES_DB: supertokens ports: - 5432:5432 networks: - db restart: unless-stopped supertokens: image: registry.supertokens.io/supertokens/supertokens-postgresql depends_on: - db ports: - 3567:3567 environment: POSTGRESQL_CONNECTION_URI : postgresql://user:pass@db/supertokens networks: - db restart: unless-stopped networks: db: driver: bridge
Hey @24kMagic what’s the issue you are facing with this?
I see the docker container up and running . But when I try to connect to localhost:3567/hello I don't see any response. Also when I try from localhost:3000 from my frontend app, I don't see any buttons like singin or signup to be functioning..
The error shows up as something went wrong, try again in the front-end.
You might want to expose the containers to your host's network too.
This is more of a docker networking setup issue.
Also, are you running the docker run container or via the docker compose file? Im confused..
Postgres, using the docker-compose and supertokens using docker run command..
Okay. Will give it a try.
I think the issue might be with your connection URI - you did not indicate the port. Try this: POSTGRESQL_CONNECTION_URI : postgresql://user:pass@db:5432/supertokens
Oh yea! Good catch @execreate