summaryrefslogtreecommitdiffhomepage
path: root/public/v4/apps/postgres.yml
blob: 3b18f2d36a0ff09d221b12c195d1c4f5c8320386 (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
captainVersion: 4
services:
    $$cap_appname:
        image: postgres:$$cap_postgres_version
        volumes:
            - $$cap_appname-data:/var/lib/postgresql/data
        restart: always
        environment:
            POSTGRES_USER: $$cap_pg_user
            POSTGRES_PASSWORD: $$cap_pg_pass
            POSTGRES_DB: $$cap_pg_db
            POSTGRES_INITDB_ARGS: $$cap_pg_initdb_args
        caproverExtra:
            notExposeAsWebApp: 'true'
caproverOneClickApp:
    variables:
        - id: $$cap_postgres_version
          label: Version
          defaultValue: '14.5'
          description: Check out their Docker page for the valid tags https://hub.docker.com/r/library/postgres/tags
          validRegex: /^([^\s^\/])+$/
        - id: $$cap_pg_user
          label: Username
          defaultValue: postgres
          validRegex: /.{1,}/
        - id: $$cap_pg_pass
          label: Password
          defaultValue: $$cap_gen_random_hex(16)
          validRegex: /.{1,}/
        - id: $$cap_pg_db
          label: Default Database
          defaultValue: postgres
          validRegex: /.{1,}/
        - id: $$cap_pg_initdb_args
          label: Optional Arguments
          description: >-
              Arguments will be appended to `postgres initdb`.
              Example: `--data-checksums`.
          validRegex: /.{0,}/
    instructions:
        start: |-
            PostgreSQL, often simply Postgres, is an object-relational database management system (ORDBMS) with an emphasis on extensibility and standards-compliance.
            As a database server, its primary function is to store data, securely and supporting best practices, and retrieve it later, as requested by other software applications, be it those on the same computer or those running on another computer across a network (including the Internet).
            It can handle workloads ranging from small single-machine applications to large Internet-facing applications with many concurrent users.
        end: |-
            Postgres is deployed and available as `srv-captain--$$cap_appname:5432` to other apps.
            For example with Node.js: `const client = new Client({ user: '$$cap_pg_user', host: 'srv-captain--$$cap_appname', database: '$$cap_pg_db', password: '$$cap_pg_pass', port: 5432})`
    displayName: PostgreSQL
    isOfficial: true
    description: The PostgreSQL object-relational database system provides reliability and data integrity
    documentation: https://hub.docker.com/_/postgres