summaryrefslogtreecommitdiffhomepage
path: root/public/v2/apps/postgres.json
diff options
context:
space:
mode:
authorKasra Bigdeli <[email protected]>2019-08-14 13:00:30 -0400
committerKasra Bigdeli <[email protected]>2019-08-14 13:00:30 -0400
commitd5223e80f564cc21ca90f67008fa12f76e1f069e (patch)
treef241e5b065d7fa24dcef18923bbe653262788d9b /public/v2/apps/postgres.json
parent3f6dc9213224d35c97857f6db6aa20da5119ba67 (diff)
downloadcaprover-one-click-apps-d5223e80f564cc21ca90f67008fa12f76e1f069e.tar.gz
caprover-one-click-apps-d5223e80f564cc21ca90f67008fa12f76e1f069e.zip
Added v2
Diffstat (limited to 'public/v2/apps/postgres.json')
-rw-r--r--public/v2/apps/postgres.json60
1 files changed, 60 insertions, 0 deletions
diff --git a/public/v2/apps/postgres.json b/public/v2/apps/postgres.json
new file mode 100644
index 0000000..62c897d
--- /dev/null
+++ b/public/v2/apps/postgres.json
@@ -0,0 +1,60 @@
+{
+ "captainVersion": "2",
+ "documentation": "Taken from https://docs.docker.com/compose/mysql/ port mapping removed from WP as it's not needed",
+ "dockerCompose": {
+ "version": "3.3",
+ "services": {
+ "$$cap_appname-db": {
+ "image": "postgres:$$cap_postgres_version",
+ "notExposeAsWebApp": "true",
+ "volumes": [
+ "$$cap_appname-db-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"
+ }
+ }
+ }
+ },
+ "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.\n\n After installation on CapRover, it will be available as srv-captain--YOUR_CONTAINER_NAME at port 5432 to other CapRover apps.\n\n 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})'"
+ },
+ "variables": [{
+ "id": "$$cap_postgres_version",
+ "label": "Postgres Version",
+ "defaultValue": "9.6",
+ "description": "Checkout their docker page for the valid tags https://hub.docker.com/r/library/postgres/tags/",
+ "validRegex": "/^([^\\s^\\/])+$/"
+ },
+ {
+ "id": "$$cap_pg_user",
+ "label": "Postgres Username",
+ "description": "",
+ "validRegex": "/.{1,}/"
+ },
+ {
+ "id": "$$cap_pg_pass",
+ "label": "Postgres Password",
+ "description": "",
+ "validRegex": "/.{1,}/"
+ },
+ {
+ "id": "$$cap_pg_db",
+ "label": "Postgres Default Database",
+ "description": "",
+ "validRegex": "/.{1,}/"
+ },
+ {
+ "id": "$$cap_pg_initdb_args",
+ "label": "OPTIONAL: Arguments for 'postgres initdb'",
+ "description": "For example, --data-checksums",
+ "validRegex": "/.{0,}/"
+ }
+ ]
+
+} \ No newline at end of file