GithubHelp home page GithubHelp logo

supertokens-docker-postgresql's Introduction

Quickstart

# This will start with an in memory database.

$ docker run -p 3567:3567 -d registry.supertokens.io/supertokens/supertokens-postgresql

Configuration

You can use your own config.yaml file as a shared volume or pass the key-values as environment variables.

If you do both, only the shared config.yaml file will be considered.

Using environment variables

Available environment variables

  • Core
    • API_KEYS
    • SUPERTOKENS_HOST
    • SUPERTOKENS_PORT
    • ACCESS_TOKEN_VALIDITY
    • ACCESS_TOKEN_BLACKLISTING
    • ACCESS_TOKEN_SIGNING_KEY_DYNAMIC
    • ACCESS_TOKEN_DYNAMIC_SIGNING_KEY_UPDATE_INTERVAL
    • REFRESH_TOKEN_VALIDITY
    • PASSWORD_RESET_TOKEN_LIFETIME
    • EMAIL_VERIFICATION_TOKEN_LIFETIME
    • INFO_LOG_PATH
    • ERROR_LOG_PATH
    • MAX_SERVER_POOL_SIZE
    • PASSWORDLESS_MAX_CODE_INPUT_ATTEMPTS
    • PASSWORDLESS_CODE_LIFETIME
    • DISABLE_TELEMETRY
    • BASE_PATH
    • PASSWORD_HASHING_ALG
    • ARGON2_ITERATIONS
    • ARGON2_MEMORY_KB
    • ARGON2_PARALLELISM
    • ARGON2_HASHING_POOL_SIZE
    • BCRYPT_LOG_ROUNDS
    • LOG_LEVEL
    • FIREBASE_PASSWORD_HASHING_POOL_SIZE
    • FIREBASE_PASSWORD_HASHING_SIGNER_KEY
    • IP_ALLOW_REGEX
    • IP_DENY_REGEX
    • TOTP_MAX_ATTEMPTS
    • TOTP_RATE_LIMIT_COOLDOWN_SEC
  • POSTGRESQL:
    • POSTGRESQL_CONNECTION_URI
    • POSTGRESQL_USER
    • POSTGRESQL_PASSWORD
    • POSTGRESQL_PASSWORD_FILE
    • POSTGRESQL_CONNECTION_POOL_SIZE
    • POSTGRESQL_HOST
    • POSTGRESQL_PORT
    • POSTGRESQL_DATABASE_NAME
    • POSTGRESQL_TABLE_NAMES_PREFIX
    • POSTGRESQL_TABLE_SCHEMA
    • POSTGRESQL_IDLE_CONNECTION_TIMEOUT
    • POSTGRESQL_MINIMUM_IDLE_CONNECTIONS
docker run \
	-p 3567:3567 \
	-e POSTGRESQL_CONNECTION_URI="postgresql://username:password@host:port/dbName" \
	-d registry.supertokens.io/supertokens/supertokens-postgresql

# OR

docker run \
	-p 3567:3567 \
	-e POSTGRESQL_USER="postgresqlUser" \
	-e POSTGRESQL_HOST="192.168.1.2" \
	-e POSTGRESQL_PORT="5432" \
	-e POSTGRESQL_PASSWORD="password" \
	-d registry.supertokens.io/supertokens/supertokens-postgresql

Using custom config file

  • In your config.yaml file, please make sure you store the following key / values:
    • core_config_version: 0
    • host: "0.0.0.0"
    • postgresql_config_version: 0
    • info_log_path: null (to log in docker logs)
    • error_log_path: null (to log in docker logs)
  • The path for the config.yaml file in the container is /usr/lib/supertokens/config.yaml
docker run \
	-p 3567:3567 \
	-v /path/to/config.yaml:/usr/lib/supertokens/config.yaml \
	-d registry.supertokens.io/supertokens/supertokens-postgresql

Logging

  • By default, all the logs will be available via the docker logs <container-name> command.
  • You can setup logging to a shared volume by:
    • Setting the info_log_path and error_log_path variables in your config.yaml file (or passing the values asn env variables).
    • Mounting the shared volume for the logging directory.
docker run \
	-p 3567:3567 \
	-v /path/to/logsFolder:/home/logsFolder \
	-e INFO_LOG_PATH="/home/logsFolder/info.log" \
	-e ERROR_LOG_PATH="/home/logsFolder/error.log" \
	-e POSTGRESQL_USER="postgresqlUser" \
	-e POSTGRESQL_PASSWORD="password" \
	-d registry.supertokens.io/supertokens/supertokens-postgresql

Database setup

  • Before you start this container, make sure to initialize your database.
  • You do not need to ensure that the Postgresql database has started before this container is started. During bootup, SuperTokens will wait for ~1 hour for a Postgresql instance to be available.
  • If POSTGRESQL_USER, POSTGRESQL_PASSWORD, POSTGRESQL_PASSWORD_FILE and POSTGRESQL_CONNECTION_URI are not provided, then SuperTokens will use an in memory database.

supertokens-docker-postgresql's People

Contributors

aboutphilippe avatar assafushy avatar belyaev-dev avatar bhumilsarvaiya avatar chenkaic4 avatar lukasknuth avatar opichon avatar piyush0810 avatar renyijiu avatar rishabhpoddar avatar sattvikc avatar skellla avatar tomsons avatar xatuke avatar zachequi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

supertokens-docker-postgresql's Issues

Helm chart not working

Hi guys,

the helm chart is really not mature.
there is no official published chart, and when you try to run it from this repo - your get missing vars errors.

for the connection test and then for the printed note.

if you bypass it, it still wont deploy.

are you planning on fixing it? want me to try it out and submit pr?

Host the Helm Chart

Currently (as far as I understand) the only option to use the Helm Chart provided with this repository is to either push it to another Helm repository (not official, not auto updated) or to copy the chart as a dependency into my chart (again, not auto updated).

Working with SuperTokens self-hosted could be made much smoother by hosting the Helm Chart in a repository, either something existing like Artifactory or GitHub Pages.

[Kubernetes] Breaks on Kubernetes ReadOnlyFileSystem

On a ReadOnlyFileSystem Pod in Kubernetes, you got many Read-only file system errors

$ k logs -f supertokens-core-9fbc964db-t7vgj
Defaulted container "supertokens-core" out of: supertokens-core, create-db (init)
chown: changing ownership of '/usr/lib/supertokens/.started': Read-only file system
chown: changing ownership of '/usr/lib/supertokens/LICENSE.md': Read-only file system
chown: changing ownership of '/usr/lib/supertokens/cli/argon2-jvm-2.11.jar': Read-only file system
chown: changing ownership of '/usr/lib/supertokens/cli/argon2-jvm-nolibs-2.11.jar': Read-only file system
chown: changing ownership of '/usr/lib/supertokens/cli/cli.jar': Read-only file system
chown: changing ownership of '/usr/lib/supertokens/cli/gson-2.3.1.jar': Read-only file system
chown: changing ownership of '/usr/lib/supertokens/cli/jackson-annotations-2.16.1.jar': Read-only file system
chown: changing ownership of '/usr/lib/supertokens/cli/jackson-core-2.16.1.jar': Read-only file system
[....]
chown: changing ownership of '/usr/lib/supertokens/plugin-interface/plugin-interface-4.0.6.jar': Read-only file system
chown: changing ownership of '/usr/lib/supertokens/plugin-interface': Read-only file system
chown: changing ownership of '/usr/lib/supertokens/version.yaml': Read-only file system
chown: changing ownership of '/usr/lib/supertokens/webserver-temp': Read-only file system
chown: changing ownership of '/usr/lib/supertokens/': Read-only file system

There are many chown commands in the entry point; could they be make it optional?

For Instance as an ENV

env:
  READ_ONLY_FS: true
  # OR
  K8S: true
  # OR
  ON_KUBERNETES: true

chown -R supertokens:supertokens /usr/lib/supertokens/

[BUG] `?schema` connection param is not respected

Issue Summary

SuperTokens container doesn't respect ?schema connection string param. Only if the POSTGRESQL_TABLE_SCHEMA variable is specified, then the ST uses that schema instead.

Steps to reproduce

  1. Create necessary files (.env and docker-compose.yaml)
  2. Run:
docker-compose down -v
docker-compose up -d
  1. Check the database with any tool of choice.

Expected Behavior

?schema connection param is respected.

Additional context

docker-compose.yaml

version: "3.8"

services:
    appPostgres:
        image: postgres:alpine
        container_name: app_postgres
        restart: unless-stopped
        environment:
            - POSTGRES_USER=username
            - POSTGRES_PASSWORD=password
            - POSTGRES_DB=app
        ports:
            - "5432:5432"
        volumes:
            - app_postgres_data:/var/lib/postgresql/data
        healthcheck:
            test:
                [
                    "CMD-SHELL",
                    "sh -c 'pg_isready -U username -d app'",
                ]
            interval: 10s
            timeout: 5s
            retries: 5

    # https://github.com/supertokens/supertokens-docker-postgresql/blob/master/README.md
    supertokens:
        image: registry.supertokens.io/supertokens/supertokens-postgresql:7.0
        restart: unless-stopped
        depends_on:
            appPostgres:
                condition: service_healthy
        ports:
            - 3567:3567
        environment:
            - POSTGRESQL_CONNECTION_URI="postgresql://username:password@appPostgres:5432/app?schema=super_tokens"
        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:
    default:
        name: app_net

volumes:
    app_postgres_data:

All of ST-related tables are generated inside of public schema instead of specified schema:

image

Tenant(, public, public) | What caused the crash: Unable to create the directory

Docker image

registry.supertokens.io/supertokens/supertokens-postgresql:6.0

docker-compose

  supertokens:
    image: registry.supertokens.io/supertokens/supertokens-postgresql:6.0
    depends_on:
      db:
        condition: service_healthy
    networks:
      - 'stack'
    environment:
      POSTGRESQL_USER: '${POSTGRES_USER}'
      POSTGRESQL_PASSWORD: '${POSTGRES_PASSWORD}'
      POSTGRESQL_DATABASE_NAME: '${POSTGRES_DB}'
      POSTGRESQL_TABLE_NAMES_PREFIX: 'supertokens'
      POSTGRESQL_HOST: db
      POSTGRESQL_PORT: 5432
      API_KEYS: '${SUPERTOKENS_API_KEY}'
      ACCESS_TOKEN_BLACKLISTING: 'true'

Logs:

24 Jul 2023 08:49:05:793 +0000 | INFO | pid: 3f7ed4ef-eb4e-439b-b9a8-268787eb0d3c | [main] thread | io.supertokens.cronjobs.CronTask.shutdownIsGoingToBeCalled(CronTask.java:72) | Tenant(, public, public) | Stopping task: DeleteExpiredAccessTokenSigningKeys

24 Jul 2023 08:49:07:128 +0000 | INFO | pid: 3f7ed4ef-eb4e-439b-b9a8-268787eb0d3c | [pool-1-thread-1] thread | io.supertokens.cronjobs.CronTask.run(CronTask.java:167) | Tenant(, public, public) | Cronjob finished: Telemetry

Tenant(, public, public) | What caused the crash: Unable to create the directory [/usr/lib/supertokens/webserver-temp/dc248361-d7dd-4a7b-8266-10cfb0465027] to use as the base directory

Helm chart image registry

Hi.

In the repo readme the repository for image is registry.supertokens.io/supertokens/supertokens-postgresql.

In helm package it's set to supertokens/supertokens-postgresql, which is reference to dockerhub.

So what's the main repo? Since in dockerhub there's no 7.0.13 tag, which is set in values.

If registry.supertokens.io is considered as "main" and contains version 7.0.13 maybe it's better to set it as default in helm chart values as well?

Feature Request - allow specifying API_KEYS via docker secret

It is currently possible to specify the postgresql password as a docker secret using POSTGRESQL_PASSWORD_FILE environment variable.

It would be nice to be able to also specify API_KEYS in a similar way.
ie. to add an environment variable called API_KEYS_FILE which would open the specified file and set API_KEYS to the contents.

I think this should just be a simple addition to the docker-entrypoint.sh script, similar to how POSTGRES_PASSWORD_FILE is handled.
eg.

if [ ! -z $API_KEYS_FILE ]
then
    API_KEYS=$(cat "$API_KEYS_FILE")
    export API_KEYS
fi

Thanks!

Error validating SSL certificate

Describe the bug

When attempting to make a connection to a secured Postgres database, client certificates are not being accepted. Failing with a Failed to initialize pool: FATAL: connection requires a valid client certificate error.

The database is hosted in a Heroku Private Space which allows you to generate a Certificate Bundle that contains one of each of the following: postgresql.crt (Client Certificate), postgresql.key (SSL Key) and root.crt (CA Certificate).

The containter was created and the related files were placed in the respective directory in order to be fetched from the POSTGRESQL_CONNECTION_URI.

I am able to tell they are in the correct directory because it will throw a different error Failed to initialize pool: Could not open SSL root certificate file if the root.crt file is not there.

docker-compose up is run after the files are copied as below:
docker cp ./postgres/certs/postgresql.crt supertokens-moneyspot-supertokens-1:server.crt
docker cp ./postgres/certs/postgresql.keysupertokens-moneyspot-supertokens-1:server.key
docker cp ./postgres/certs/root.crt supertokens-moneyspot-supertokens-1:root.crt

I additionally checked the Files tab in docker desktop to verify that the files were in fact there and with content.

docker-compose.yml

version: "3"

services:
    supertokens:
        image: registry.supertokens.io/supertokens/supertokens-postgresql:4.6
        ports:
            - 3567:3567
        environment:
            POSTGRESQL_CONNECTION_URI: "postgresql://<user>:<password>@<host>:5432/<db>?ssl=true&sslmode=verify-ca&sslrootcert=root.crt&sslcert=server.crt&sslkey=server.key"
        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

Expected behaviour

As completed through node (npm pg), DBeaver and the Docker PGAdmin4 extension, a successful connection should be able to be made to the secured database

Error deploying Helm chart

Getting this error when trying to apply the Helm chart (using default config values) on a GKE cluster:

27 Jul 2024 10:06:29:849 +0000 | ERROR | pid: 1e9271b7-c717-48a2-8bb1-54ec2e498ca8 | [main] thread | io.supertokens.storage.postgresql.HikariLoggingAppender.doAppend(HikariLoggingAppender.java:132) | |postgres.postgres|5432|supertokens|public~|10|postgres|********|allowPublicKeyRetrieval=true|postgresql|60000 - Exception during pool initialization.
27 Jul 2024 10:06:29:852 +0000 | INFO | pid: 1e9271b7-c717-48a2-8bb1-54ec2e498ca8 | [main] thread | io.supertokens.Main.stopApp(Main.java:417) | Tenant(, public, public) | Stopping SuperTokens...
[31mTenant(, public, public) | What caused the crash: io.supertokens.pluginInterface.exceptions.DbInitException: io.supertokens.pluginInterface.exceptions.DbInitException: java.sql.SQLException: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: The connection attempt failed.�[0m

postgres error logs on supertokens first run (empty database)

Maybe some cron task run before initial migrations done? There are no errors after restart of container or db.

docker image: registry.supertokens.io/supertokens/supertokens-postgresql:6.0

supertokens logs:

supertokens_1        | Loading supertokens config.
supertokens_1        | Completed config.yaml loading.
supertokens_1        | Loading storage layer.
supertokens_1        | Loading PostgreSQL config.
supertokens_1        | Loading supertokens version.yaml file.
supertokens_1        | 06 Sep 2023 07:19:06:153 +0000 | INFO | pid: 477e6a1c-b078-479b-9ff6-fd4af7f0defd | [main] thread | io.supertokens.storage.postgresql.ConnectionPool.initPool(ConnectionPool.java:136) | Setting up PostgreSQL connection pool.
supertokens_1        | 
supertokens_1        | Setting up PostgreSQL connection pool.
supertokens_1        | 06 Sep 2023 07:19:06:880 +0000 | INFO | pid: 477e6a1c-b078-479b-9ff6-fd4af7f0defd | [main] thread | io.supertokens.cronjobs.CronTask.<init>(CronTask.java:58) | Tenant(, public, public) | Starting task: EELicenseCheck
supertokens_1        | 
supertokens_1        | 06 Sep 2023 07:19:07:275 +0000 | INFO | pid: 477e6a1c-b078-479b-9ff6-fd4af7f0defd | [main] thread | io.supertokens.cronjobs.CronTask.<init>(CronTask.java:68) | Tenant(, public, public) | Starting task: SyncCoreConfigWithDb
supertokens_1        | 
supertokens_1        | 06 Sep 2023 07:19:07:276 +0000 | INFO | pid: 477e6a1c-b078-479b-9ff6-fd4af7f0defd | [main] thread | io.supertokens.cronjobs.CronTask.<init>(CronTask.java:58) | Tenant(, public, public) | Starting task: RemoveOldSessions
supertokens_1        | 
supertokens_1        | 06 Sep 2023 07:19:07:276 +0000 | INFO | pid: 477e6a1c-b078-479b-9ff6-fd4af7f0defd | [main] thread | io.supertokens.cronjobs.CronTask.<init>(CronTask.java:58) | Tenant(, public, public) | Starting task: RemoveOldPasswordResetTokens
supertokens_1        | 
supertokens_1        | 06 Sep 2023 07:19:07:278 +0000 | INFO | pid: 477e6a1c-b078-479b-9ff6-fd4af7f0defd | [main] thread | io.supertokens.cronjobs.CronTask.<init>(CronTask.java:58) | Tenant(, public, public) | Starting task: RemoveOldEmailVerificationTokens
supertokens_1        | 
supertokens_1        | 06 Sep 2023 07:19:07:279 +0000 | INFO | pid: 477e6a1c-b078-479b-9ff6-fd4af7f0defd | [main] thread | io.supertokens.cronjobs.CronTask.<init>(CronTask.java:58) | Tenant(, public, public) | Starting task: DeleteExpiredPasswordlessDevices
supertokens_1        | 
supertokens_1        | 06 Sep 2023 07:19:07:279 +0000 | INFO | pid: 477e6a1c-b078-479b-9ff6-fd4af7f0defd | [main] thread | io.supertokens.cronjobs.CronTask.<init>(CronTask.java:58) | Tenant(, public, public) | Starting task: DeleteExpiredTotpTokens
supertokens_1        | 
supertokens_1        | 06 Sep 2023 07:19:07:280 +0000 | INFO | pid: 477e6a1c-b078-479b-9ff6-fd4af7f0defd | [main] thread | io.supertokens.cronjobs.CronTask.<init>(CronTask.java:58) | Tenant(, public, public) | Starting task: RemoveExpiredDashboardSessions
supertokens_1        | 
supertokens_1        | 06 Sep 2023 07:19:07:280 +0000 | INFO | pid: 477e6a1c-b078-479b-9ff6-fd4af7f0defd | [main] thread | io.supertokens.cronjobs.CronTask.<init>(CronTask.java:58) | Tenant(, public, public) | Starting task: DeleteExpiredAccessTokenSigningKeys
supertokens_1        | 
supertokens_1        | Started SuperTokens on 0.0.0.0:3567 with PID: 36
supertokens_1        | 06 Sep 2023 07:19:07:847 +0000 | INFO | pid: 477e6a1c-b078-479b-9ff6-fd4af7f0defd | [main] thread | io.supertokens.Main.init(Main.java:268) | Tenant(, public, public) | Started SuperTokens on 0.0.0.0:3567 with PID: 36
supertokens_1        | 
supertokens_1        | 06 Sep 2023 07:20:07:275 +0000 | INFO | pid: 477e6a1c-b078-479b-9ff6-fd4af7f0defd | [pool-1-thread-1] thread | io.supertokens.cronjobs.CronTask.run(CronTask.java:77) | Tenant(, public, public) | Cronjob started: SyncCoreConfigWithDb
supertokens_1        | 
supertokens_1        | 06 Sep 2023 07:20:07:281 +0000 | INFO | pid: 477e6a1c-b078-479b-9ff6-fd4af7f0defd | [pool-1-thread-1] thread | io.supertokens.cronjobs.CronTask.run(CronTask.java:167) | Tenant(, public, public) | Cronjob finished: SyncCoreConfigWithDb
supertokens_1        | 
supertokens_1        | 06 Sep 2023 07:21:07:281 +0000 | INFO | pid: 477e6a1c-b078-479b-9ff6-fd4af7f0defd | [pool-1-thread-1] thread | io.supertokens.cronjobs.CronTask.run(CronTask.java:77) | Tenant(, public, public) | Cronjob started: SyncCoreConfigWithDb
supertokens_1        | 
supertokens_1        | 06 Sep 2023 07:21:07:286 +0000 | INFO | pid: 477e6a1c-b078-479b-9ff6-fd4af7f0defd | [pool-1-thread-1] thread | io.supertokens.cronjobs.CronTask.run(CronTask.java:167) | Tenant(, public, public) | Cronjob finished: SyncCoreConfigWithDb
supertokens_1        |

postgres logs:

db-supertokens_1     | 2023-09-06 07:19:06.406 UTC [68] ERROR:  relation "apps" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.406 UTC [68] STATEMENT:  SELECT 1 FROM apps LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.426 UTC [68] ERROR:  relation "tenants" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.426 UTC [68] STATEMENT:  SELECT 1 FROM tenants LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.433 UTC [68] ERROR:  relation "key_value" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.433 UTC [68] STATEMENT:  SELECT 1 FROM key_value LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.442 UTC [68] ERROR:  relation "app_id_to_user_id" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.442 UTC [68] STATEMENT:  SELECT 1 FROM app_id_to_user_id LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.451 UTC [68] ERROR:  relation "all_auth_recipe_users" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.451 UTC [68] STATEMENT:  SELECT 1 FROM all_auth_recipe_users LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.465 UTC [68] ERROR:  relation "user_last_active" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.465 UTC [68] STATEMENT:  SELECT 1 FROM user_last_active LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.473 UTC [68] ERROR:  relation "session_access_token_signing_keys" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.473 UTC [68] STATEMENT:  SELECT 1 FROM session_access_token_signing_keys LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.482 UTC [68] ERROR:  relation "session_info" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.482 UTC [68] STATEMENT:  SELECT 1 FROM session_info LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.495 UTC [68] ERROR:  relation "tenant_configs" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.495 UTC [68] STATEMENT:  SELECT 1 FROM tenant_configs LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.502 UTC [68] ERROR:  relation "tenant_thirdparty_providers" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.502 UTC [68] STATEMENT:  SELECT 1 FROM tenant_thirdparty_providers LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.512 UTC [68] ERROR:  relation "tenant_thirdparty_provider_clients" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.512 UTC [68] STATEMENT:  SELECT 1 FROM tenant_thirdparty_provider_clients LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.525 UTC [68] ERROR:  relation "emailpassword_users" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.525 UTC [68] STATEMENT:  SELECT 1 FROM emailpassword_users LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.537 UTC [68] ERROR:  relation "emailpassword_user_to_tenant" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.537 UTC [68] STATEMENT:  SELECT 1 FROM emailpassword_user_to_tenant LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.544 UTC [68] ERROR:  relation "emailpassword_pswd_reset_tokens" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.544 UTC [68] STATEMENT:  SELECT 1 FROM emailpassword_pswd_reset_tokens LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.558 UTC [68] ERROR:  relation "emailverification_verified_emails" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.558 UTC [68] STATEMENT:  SELECT 1 FROM emailverification_verified_emails LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.566 UTC [68] ERROR:  relation "emailverification_tokens" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.566 UTC [68] STATEMENT:  SELECT 1 FROM emailverification_tokens LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.581 UTC [68] ERROR:  relation "thirdparty_users" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.581 UTC [68] STATEMENT:  SELECT 1 FROM thirdparty_users LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.595 UTC [68] ERROR:  relation "thirdparty_user_to_tenant" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.595 UTC [68] STATEMENT:  SELECT 1 FROM thirdparty_user_to_tenant LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.602 UTC [68] ERROR:  relation "jwt_signing_keys" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.602 UTC [68] STATEMENT:  SELECT 1 FROM jwt_signing_keys LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.620 UTC [68] ERROR:  relation "passwordless_users" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.620 UTC [68] STATEMENT:  SELECT 1 FROM passwordless_users LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.636 UTC [68] ERROR:  relation "passwordless_user_to_tenant" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.636 UTC [68] STATEMENT:  SELECT 1 FROM passwordless_user_to_tenant LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.646 UTC [68] ERROR:  relation "passwordless_devices" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.646 UTC [68] STATEMENT:  SELECT 1 FROM passwordless_devices LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.663 UTC [68] ERROR:  relation "passwordless_codes" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.663 UTC [68] STATEMENT:  SELECT 1 FROM passwordless_codes LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.674 UTC [68] ERROR:  relation "user_metadata" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.674 UTC [68] STATEMENT:  SELECT 1 FROM user_metadata LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.682 UTC [68] ERROR:  relation "roles" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.682 UTC [68] STATEMENT:  SELECT 1 FROM roles LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.691 UTC [68] ERROR:  relation "role_permissions" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.691 UTC [68] STATEMENT:  SELECT 1 FROM role_permissions LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.701 UTC [68] ERROR:  relation "user_roles" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.701 UTC [68] STATEMENT:  SELECT 1 FROM user_roles LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.715 UTC [68] ERROR:  relation "userid_mapping" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.715 UTC [68] STATEMENT:  SELECT 1 FROM userid_mapping LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.726 UTC [68] ERROR:  relation "dashboard_users" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.726 UTC [68] STATEMENT:  SELECT 1 FROM dashboard_users LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.736 UTC [68] ERROR:  relation "dashboard_user_sessions" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.736 UTC [68] STATEMENT:  SELECT 1 FROM dashboard_user_sessions LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.745 UTC [68] ERROR:  relation "totp_users" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.745 UTC [68] STATEMENT:  SELECT 1 FROM totp_users LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.753 UTC [68] ERROR:  relation "totp_user_devices" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.753 UTC [68] STATEMENT:  SELECT 1 FROM totp_user_devices LIMIT 1
db-supertokens_1     | 2023-09-06 07:19:06.760 UTC [68] ERROR:  relation "totp_used_codes" does not exist at character 15
db-supertokens_1     | 2023-09-06 07:19:06.760 UTC [68] STATEMENT:  SELECT 1 FROM totp_used_codes LIMIT 1

Feature Request - automatically run SQL migrations

Are there plans for newer versions for this docker image to automatically run any needed SQL migrations?

To upgrade our local environment from core 4.6 to 5.0 we needed to pin the new version of the image in our docker-compose file, then connect to the Postgres database and run the manual SQL migrations described in this CHANGELOG. It would be very cool if the docker image had that functionality built in to automatically check for and run any missing migrations.

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.