summaryrefslogtreecommitdiffhomepage
path: root/public/v4/apps/supertokens.yml
blob: 10dc0837fc5df429d41e01947da0c78f230bae72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
captainVersion: 4
services:
    # PostgreSQL
    $$cap_appname-postgres:
        image: postgres:$$cap_postgres_version
        volumes:
            - $$cap_appname-postgres-data:/var/lib/postgresql/data
        restart: always
        environment:
            POSTGRES_USER: $$cap_pg_user
            POSTGRES_PASSWORD: $$cap_postgres_password
            POSTGRES_DB: $$cap_pg_db
        caproverExtra:
            notExposeAsWebApp: 'true'
    # Supertokens
    $$cap_appname:
        depends_on:
            - $$cap_appname-postgres
        image: supertokens/supertokens-postgresql:$$cap_supertokens_version
        restart: always
        environment:
            API_KEYS: $$cap_supertokens_api_keys
            DISABLE_TELEMETRY: true
            POSTGRESQL_CONNECTION_URI: postgresql://$$cap_pg_user:$$cap_postgres_password@srv-captain--$$cap_appname-postgres:5432/$$cap_pg_db
        caproverExtra:
            containerHttpPort: 3567
caproverOneClickApp:
    instructions:
        start: |-
            SuperTokens is an open source user authentication solution.
            More details: https://supertokens.com
        end: |-
            SuperTokens has been successfully deployed! It might take few moments before it's fully started.
            For more information and available options, see https://github.com/supertokens/supertokens-docker-postgresql
    displayName: SuperTokens
    isOfficial: false
    description: Auth Provider solution alternative to Auth0 / Firebase Auth / AWS Cognito
    documentation: For more information, https://supertokens.com/docs/guides
    variables:
        - id: $$cap_supertokens_version
          label: SuperTokens Version
          description: Choose the latest version of SuperTokens from https://hub.docker.com/r/supertokens/supertokens-postgresql/tags
          defaultValue: '7.0'
        - id: $$cap_supertokens_api_keys
          label: API Keys
          validRegex: '/.{1,}/'
          description: A comma separated list of API keys (https://supertokens.com/docs/thirdpartyemailpassword/common-customizations/core/api-keys)
          defaultValue: $$cap_gen_random_hex(64)
        - id: $$cap_postgres_version
          label: Postgres Version
          description: Version of PostgreSQL. Check out their Docker page for the valid tags https://hub.docker.com/_/postgres/tags
          defaultValue: 15-alpine
        - id: $$cap_pg_user
          label: Postgres Username
          description: ''
          validRegex: /.{1,}/
          defaultValue: supertokens
        - id: $$cap_postgres_password
          label: Postgres User Password
          description: User password for the database instance.
          defaultValue: $$cap_gen_random_hex(16)
          validRegex: /^(?=.*\d).{10,}$/
        - id: $$cap_pg_db
          label: Postgres database name
          description: Name of the databse
          validRegex: /.{1,}/
          defaultValue: supertokens