summaryrefslogtreecommitdiffhomepage
path: root/public/v4/apps/supabase-postgres.yml
blob: e8aa0600d06a9330ef57d63d35c01f302684adec (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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
captainVersion: 4
services:
    $$cap_appname-db:
        image: bitnami/supabase-postgres:$$cap_app_version
        volumes:
            - $$cap_appname-db-data:/var/lib/postgresql/data
        restart: always
        environment:
            POSTGRES_USER: $$cap_pg_user
            POSTGRES_DB: $$cap_pg_db
            POSTGRES_PASSWORD: $$cap_pg_pass
            POSTGRES_PORT_NUMBER: $$cap_pg_port
            POSTGRES_INITDB_ARGS: $$cap_pg_initdb_args
            POSTGRES_REPLICATION_USER: $$cap_pg_repl_user
            POSTGRES_REPLICATION_MODE: $$cap_pg_repl_mode
            POSTGRES_REPLICATION_PASSWORD: $$cap_pg_repl_pass
            POSTGRES_MASTER_HOST: $$cap_pg_master_host
            POSTGRES_MASTER_PORT_NUMBER: $$cap_pg_master_port
            POSTGRES_NUM_SYNCHRONOUS_REPLICAS: $$cap_pg_num_sync_repl
            POSTGRES_SYNCHRONOUS_COMMIT_MODE: $$cap_pg_sync_commit_mode
        caproverExtra:
            notExposeAsWebApp: 'true'
caproverOneClickApp:
    variables:
        - id: $$cap_app_version
          label: Postgres Version
          defaultValue: '15.1.0'
          description: Check out their Docker page for the valid tags https://hub.docker.com/r/bitnami/supabase-postgres/tags
          validRegex: /^([^\s^\/])+$/

        - id: $$cap_pg_user
          label: Postgres Username
          defaultValue: 'postgres'
          validRegex: /.{1,}/

        - id: $$cap_pg_db
          label: Postgres Default Database
          defaultValue: 'postgres'
          validRegex: /.{1,}/

        - id: $$cap_pg_pass
          label: Postgres Password
          defaultValue: $$cap_gen_random_hex(32)
          validRegex: /.{1,}/

        - id: $$cap_pg_port
          label: Postgres Port
          defaultValue: '5432'
          validRegex: /\d+/

        - id: $$cap_pg_initdb_args
          label: "OPTIONAL: Arguments for 'postgres initdb'"
          description: For example, --data-checksums

        - id: $$cap_pg_repl_user
          label: Postgres Replication User
          description: 'The replication user created on the master on first run. No defaults.'

        - id: $$cap_pg_repl_mode
          label: Postgres Replication Mode
          description: 'Replication mode. Possible values `master` or `slave`. No defaults.'
          validRegex: /^(master|slave|)$/

        - id: $$cap_pg_repl_pass
          label: Postgres Replication Password
          description: 'The replication users password. No defaults.'

        - id: $$cap_pg_master_host
          label: Postgres Master Host
          description: 'Hostname/IP of replication master (slave parameter). No defaults.'

        - id: $$cap_pg_master_port
          label: Postgres Master Port
          description: 'Server port of the replication master (slave parameter). Defaults to 5432.'

        - id: $$cap_pg_num_sync_repl
          label: Postgres number of synchronous replica
          description: 'Number of replicas that will enable synchronous replication'

        - id: $$cap_pg_sync_commit_mode
          label: Postgres Replication Commit Mode
          description: 'Type of synchronous commit. The available options are: `on`, `remote_apply`, `remote_write`, `local` and `off`. The default value is on.'
          defaultValue: 'on'
          validRegex: /^(on|remote_apply|remote_write|local|off|)$/

    instructions:
        start: >-
            Postgres + goodies = Supabase Postgres
            Unmodified Postgres with some useful plugins.

            Why use it over the official postgres image?
            It is an unmodified Postgres image with convenient plugins added.
            It's optimized for replication, and provides popular extensions like PostGIS, pgRouting, pgTAP, and more for enhanced functionality. Ideal for those who prefer an unaltered Postgres experience with added features.
        end: "Supabase (Postgres) is deployed and available as srv-captain--$$cap_appname-db:5432 to other apps. For example with NodeJS: 'const client = new Client({ user: 'cap_pg_user', host: 'srv-captain--$$cap_appname', database: 'cap_pg_db', password: '********', port: 5432})'"
    displayName: Supabase PostgreSQL
    isOfficial: true
    description: Supabase makes it easy to use Postgres.
    documentation: Taken from https://hub.docker.com/r/bitnami/supabase-postgres