From d096b8466181843b599671bb7476896540342a33 Mon Sep 17 00:00:00 2001 From: Matthew Francis Brunetti Date: Mon, 17 Oct 2022 21:50:27 -0400 Subject: [PATCH] Postgres updates (#768) * Update default postgres version to latest 14.x * Fix variable references in template * Use postgres defaults as one-click defaults * Don't postfix user-given app name with "-db" --- public/v4/apps/postgres.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/public/v4/apps/postgres.yml b/public/v4/apps/postgres.yml index c7fa869..cac61da 100644 --- a/public/v4/apps/postgres.yml +++ b/public/v4/apps/postgres.yml @@ -1,9 +1,9 @@ captainVersion: 4 services: - $$cap_appname-db: + $$cap_appname: image: postgres:$$cap_postgres_version volumes: - - $$cap_appname-db-data:/var/lib/postgresql/data + - $$cap_appname-data:/var/lib/postgresql/data restart: always environment: POSTGRES_USER: $$cap_pg_user @@ -16,11 +16,12 @@ caproverOneClickApp: variables: - id: $$cap_postgres_version label: Postgres Version - defaultValue: '14.1' + 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: Postgres Username + defaultValue: postgres description: '' validRegex: /.{1,}/ - id: $$cap_pg_pass @@ -29,6 +30,7 @@ caproverOneClickApp: validRegex: /.{1,}/ - id: $$cap_pg_db label: Postgres Default Database + defaultValue: postgres description: '' validRegex: /.{1,}/ - id: $$cap_pg_initdb_args @@ -42,7 +44,7 @@ caproverOneClickApp: After installation on CapRover, it will be available as srv-captain--YOUR_CONTAINER_NAME at port 5432 to other CapRover apps. Enter your Postgres Configuration parameters and click on next. It will take about a minute for the process to finish. - end: "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})'" + end: "Postgres is deployed and available as srv-captain--$$cap_appname: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: PostgreSQL isOfficial: true description: The PostgreSQL object-relational database system provides reliability and data integrity