Last active
August 20, 2024 22:55
-
-
Save iffa/7e57b3e9e93f5ea3c630ec896d6038cf to your computer and use it in GitHub Desktop.
CapRover template for PostGIS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"captainVersion": "2", | |
"documentation": "https://hub.docker.com/r/postgis/postgis", | |
"displayName": "Postgres with PostGIS", | |
"description": "PostGIS is a spatial database extender for PostgreSQL object-relational database.", | |
"dockerCompose": { | |
"version": "3.3", | |
"services": { | |
"$$cap_appname-db": { | |
"image": "postgis/postgis:$$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": "https://hub.docker.com/r/postgis/postgis/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 database", | |
"description": "", | |
"validRegex": "/.{1,}/" | |
}, | |
{ | |
"id": "$$cap_pg_initdb_args", | |
"label": "OPTIONAL: Arguments for 'postgres initdb'", | |
"description": "For example, --data-checksums", | |
"validRegex": "/.{0,}/" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks