Deleted User
01/27/2023, 5:38 AMdocker
supertokens:
image: registry.supertokens.io/supertokens/supertokens-postgresql
depends_on:
- supertokens_database
ports:
- 3567:3567
environment:
POSTGRESQL_CONNECTION_URI: "postgresql://supertokens_user:somePassword@supertokens_database:5432/supertokens"
#POSTGRESQL_CONNECTION_URI: "postgresql://${SUPERTOKENS_USER}:${SUPERTOKENS_PASSWORD}@database:5432/${SUPERTOKENS_DB}?schema=public"
networks:
- supertokens_network
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
supertokens_database:
image: 'postgres:latest'
restart: always
environment:
POSTGRES_USER: supertokens_user
POSTGRES_PASSWORD: somePassword
POSTGRES_DB: supertokens
ports:
- 5432:5432
networks:
- supertokens_network
volumes:
- ./volumes/supertokens:/var/lib/postgresql/data
#- ./postgres:/var/lib/postgresql/data
healthcheck:
test: ['CMD', 'pg_isready -U supertokens_user']
interval: 5s
timeout: 5s
retries: 5
rp_st
01/27/2023, 5:42 AMvolumes:
-
Thats not mentioned in our docs.Deleted User
01/27/2023, 9:15 AMDeleted User
01/27/2023, 9:16 AMDeleted User
01/27/2023, 9:19 AMsupertokens_database
on right? (e.g. 5433 instead of 5432)rp_st
01/27/2023, 9:20 AMPOSTGRESQL_CONNECTION_URI
rp_st
01/27/2023, 9:20 AMDeleted User
01/27/2023, 9:20 AMrp_st
01/27/2023, 9:21 AMrp_st
01/27/2023, 9:21 AMrp_st
01/27/2023, 9:21 AMrp_st
01/27/2023, 9:21 AMDeleted User
01/27/2023, 9:22 AM2023-01-27 20:17:41 .2023-01-27 09:17:41.771 UTC [49] LOG: aborting any active transactions
2023-01-27 20:17:41 2023-01-27 09:17:41.773 UTC [49] LOG: background worker "logical replication launcher" (PID 55) exited with exit code 1
2023-01-27 20:17:41 2023-01-27 09:17:41.775 UTC [50] LOG: shutting down
2023-01-27 20:17:41 2023-01-27 09:17:41.776 UTC [50] LOG: checkpoint starting: shutdown immediate
2023-01-27 20:17:41 2023-01-27 09:17:41.809 UTC [50] LOG: checkpoint complete: wrote 918 buffers (5.6%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.012 s, sync=0.019 s, total=0.034 s; sync files=250, longest=0.004 s, average=0.001 s; distance=4217 kB, estimate=4217 kB
2023-01-27 20:17:41 2023-01-27 09:17:41.820 UTC [49] LOG: database system is shut down
2023-01-27 20:17:41 done
2023-01-27 20:17:41 server stopped
2023-01-27 20:17:41
2023-01-27 20:17:41 PostgreSQL init process complete; ready for start up.
2023-01-27 20:17:41
2023-01-27 20:17:41 initdb: warning: enabling "trust" authentication for local connections
2023-01-27 20:17:41 initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.
2023-01-27 20:17:41 2023-01-27 09:17:41.888 UTC [1] LOG: starting PostgreSQL 15.1 (Debian 15.1-1.pgdg110+1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2023-01-27 20:17:41 2023-01-27 09:17:41.888 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2023-01-27 20:17:41 2023-01-27 09:17:41.888 UTC [1] LOG: listening on IPv6 address "::", port 5432
2023-01-27 20:17:41 2023-01-27 09:17:41.890 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-01-27 20:17:41 2023-01-27 09:17:41.894 UTC [65] LOG: database system was shut down at 2023-01-27 09:17:41 UTC
2023-01-27 20:17:41 2023-01-27 09:17:41.898 UTC [1] LOG: database system is ready to accept connections
rp_st
01/27/2023, 9:22 AMDeleted User
01/27/2023, 9:23 AM2023-01-27 20:22:42 27 Jan 2023 09:22:42:607 +0000 | INFO | pid: d32baf58-80d7-4fd6-8aec-db073b75db64 | [main] thread | io.supertokens.storage.postgresql.ConnectionPool.initPool(ConnectionPool.java:154) | Trying again in a few seconds for 55.0 mins...
2023-01-27 20:22:42
2023-01-27 20:22:42 Trying again in a few seconds for 55.0 mins...
2023-01-27 20:22:52 27 Jan 2023 09:22:52:616 +0000 | ERROR | pid: d32baf58-80d7-4fd6-8aec-db073b75db64 | [main] thread | io.supertokens.storage.postgresql.HikariLoggingAppender.doAppend(HikariLoggingAppender.java:132) | SuperTokens - Exception during pool initialization.
2023-01-27 20:22:52
2023-01-27 20:22:52 27 Jan 2023 09:22:52:617 +0000 | INFO | pid: d32baf58-80d7-4fd6-8aec-db073b75db64 | [main] thread | io.supertokens.storage.postgresql.ConnectionPool.initPool(ConnectionPool.java:154) | Trying again in a few seconds for 54.8 mins...
2023-01-27 20:22:52
2023-01-27 20:22:52 Trying again in a few seconds for 54.8 mins...
Deleted User
01/27/2023, 9:23 AMrp_st
01/27/2023, 9:34 AMrp_st
01/27/2023, 9:45 AMrp_st
01/27/2023, 9:45 AMnetworks:
supertokens_network:
driver: bridge
rp_st
01/27/2023, 9:45 AMversion: '3'
services:
db:
image: 'postgres:latest'
environment:
POSTGRES_USER: supertokens_user
POSTGRES_PASSWORD: somePassword
POSTGRES_DB: supertokens
ports:
- 5432:5432
networks:
- app_network
restart: unless-stopped
healthcheck:
test: ['CMD', 'pg_isready -U supertokens_user']
interval: 5s
timeout: 5s
retries: 5
supertokens:
image: registry.supertokens.io/supertokens/supertokens-postgresql:4.3
depends_on:
db:
condition: service_healthy
ports:
- 3567:3567
environment:
POSTGRESQL_CONNECTION_URI: "postgresql://supertokens_user:somePassword@db:5432/supertokens"
networks:
- app_network
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:
app_network:
driver: bridge
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).
Powered by