splinteer
08/03/2023, 6:26 PMsupertokens:
container_name: tattoo_supertokens
image: registry.supertokens.io/supertokens/supertokens-postgresql
depends_on:
tattoo_db:
condition: service_healthy
ports:
- 3567:3567
environment:
postgresql_connection_uri: "postgresql://user:passssword@db:5432/db"
restart: unless-stopped
healthcheck:
test: >
bash -c 'exec 3<>/dev/tcp/127.0.0.1/3567 && echo -e "GET /hello HTTP/1.1\r\nhost: 127.0.0.1:3567\r\nConnection: close\r\n\r\n" >&3 && cat <&3 | grep "Hello"'
interval: 10s
timeout: 5s
retries: 5
The database follow the script from this page: https://supertokens.com/docs/session/quick-setup/database-setup/postgresql
I had to rename POSTGRESQL_CONNECTION_URI to postgresql_connection_uri to avoid this message:
Error connecting to PostgreSQL instance. Please make sure that PostgreSQL is running and that you have specified the correct values for ('postgresql_host' and 'postgresql_port') or for 'postgresql_connection_uri'
But the key_value is always empty.
The login/register flow is working but the user is different when I restart the container (certainly because of the in memory db)