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"
This commit is contained in:
Matthew Francis Brunetti 2022-10-17 21:50:27 -04:00 committed by GitHub
parent 296c7de1a8
commit d096b84661
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -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