aj-ya
01/18/2023, 6:11 AMdocker
& PostgreSQL
, while fetching the dashboard i get an error - no core to query
.
here is the relevent part my dockerfile -
authdb:
container_name: authdb
image: 'postgres:latest'
environment:
POSTGRES_USER: supertokens_user
POSTGRES_PASSWORD: somePassword
POSTGRES_DB: supertokens
ports:
- 5432:5432
networks:
- outpost-infra
restart: unless-stopped
healthcheck:
test: ['CMD', 'pg_isready -U supertokens_user']
interval: 10s
timeout: 5s
retries: 5
supertokens:
image: registry.supertokens.io/supertokens/supertokens-postgresql:4.3
container_name: supertokens
depends_on:
- authdb
# condition: service_healthy
ports:
- 3567:3567
environment:
POSTGRESQL_CONNECTION_URI: "postgresql://supertokens_user:somePassword@authdb:5432/supertokens"
networks:
- outpost-infra
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
networks:
outpost-infra:
attachable: true
name: outpost-infra
driver: bridge
while looking into issues... i found that the postgres container was unhealthy
i've attached the logs as well.rp
01/18/2023, 6:58 AMsupertokensConnectionURI
?aj-ya
01/18/2023, 7:08 AMSUPERTOKENS_CONNECTION_URI=http://localhost:3567
rp
01/18/2023, 7:12 AMhttp://localhost:3567
on your browser. What do you see?http://supertokens:3567
aj-ya
01/18/2023, 7:23 AMdepends_on:
authdb:
condition: service_healthy
which does not start the supertokens container as authdb is unhealthy.
but i've made it just to make it work i'm using old docs -
depends_on:
- authdb
on which i getrp
01/18/2023, 7:24 AMhello
call should not succeed cause that queries the dbaj-ya
01/18/2023, 7:31 AMsupertokens
not starting as authdb
is unhealthy
)
what do you suggest i do for that currently?rp
01/18/2023, 7:37 AM