Adding PostgreSQL
This commit is contained in:
parent
3d85bae5cc
commit
2bb9b57fcc
29
templates/postgres/0/docker-compose.yml
Normal file
29
templates/postgres/0/docker-compose.yml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
version: '2'
|
||||||
|
services:
|
||||||
|
postgres-lb:
|
||||||
|
image: rancher/load-balancer-service
|
||||||
|
links:
|
||||||
|
- postgres
|
||||||
|
ports:
|
||||||
|
- ${lb_port}:5432
|
||||||
|
|
||||||
|
postgres-data:
|
||||||
|
image: busybox
|
||||||
|
labels:
|
||||||
|
io.rancher.container.start_once: true
|
||||||
|
volumes:
|
||||||
|
- /var/lib/postgresql/data/pgdata
|
||||||
|
|
||||||
|
postgres:
|
||||||
|
image: postgres:latest
|
||||||
|
environment:
|
||||||
|
PGDATA: /var/lib/postgresql/data/pgdata
|
||||||
|
POSTGRES_DB: ${postgres_db}
|
||||||
|
POSTGRES_USER: ${postgres_user}
|
||||||
|
POSTGRES_PASSWORD: ${postgres_password}
|
||||||
|
tty: true
|
||||||
|
stdin_open: true
|
||||||
|
labels:
|
||||||
|
io.rancher.sidekicks: postgres-data
|
||||||
|
volumes_from:
|
||||||
|
- postgres-data
|
52
templates/postgres/0/rancher-compose.yml
Normal file
52
templates/postgres/0/rancher-compose.yml
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
.catalog:
|
||||||
|
name: "Postgres"
|
||||||
|
version: "v0.0.1"
|
||||||
|
description: "PostgreSQL"
|
||||||
|
uuid: postgres-0
|
||||||
|
minimum_rancher_version: v0.9.0
|
||||||
|
questions:
|
||||||
|
- variable: lb_port
|
||||||
|
description: "Port to access PostgreSQL from external services"
|
||||||
|
label: "Postgres LB Port"
|
||||||
|
required: true
|
||||||
|
default: 5432
|
||||||
|
type: "int"
|
||||||
|
- variable: postgres_db
|
||||||
|
description: "Postgres Database"
|
||||||
|
label: "Postgres Database"
|
||||||
|
required: true
|
||||||
|
default: "postgres_sb"
|
||||||
|
type: "string"
|
||||||
|
- variable: postgres_user
|
||||||
|
description: "Postgres User"
|
||||||
|
label: "Postgres User"
|
||||||
|
required: true
|
||||||
|
default: "postgres_user"
|
||||||
|
type: "string"
|
||||||
|
- variable: postgres_password
|
||||||
|
description: "Postgres Password"
|
||||||
|
label: "Postgres Password"
|
||||||
|
required: true
|
||||||
|
default: "postgres_password"
|
||||||
|
type: "string"
|
||||||
|
|
||||||
|
version: '2'
|
||||||
|
services:
|
||||||
|
postgres-lb:
|
||||||
|
scale: 1
|
||||||
|
load_balancer_config:
|
||||||
|
haproxy_config: {}
|
||||||
|
health_check:
|
||||||
|
port: 42
|
||||||
|
interval: 2000
|
||||||
|
unhealthy_threshold: 3
|
||||||
|
healthy_threshold: 2
|
||||||
|
response_timeout: 2000
|
||||||
|
postgres:
|
||||||
|
scale: 1
|
||||||
|
health_check:
|
||||||
|
port: 5432
|
||||||
|
interval: 2000
|
||||||
|
unhealthy_threshold: 3
|
||||||
|
healthy_threshold: 2
|
||||||
|
response_timeout: 2000
|
7
templates/postgres/README.md
Normal file
7
templates/postgres/README.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
## What is inside PostgreSQL Stack?
|
||||||
|
* Postgres Database + sidekick with volume data
|
||||||
|
* Load Balancer
|
||||||
|
|
||||||
|
## Info
|
||||||
|
* Easy setup with all needed data: `database_name`, `user`, `password`
|
||||||
|
* Load Balancer used to forroward Postgress port for the external services.
|
BIN
templates/postgres/catalogIcon-postgres.png
Normal file
BIN
templates/postgres/catalogIcon-postgres.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.9 KiB |
5
templates/postgres/config.yml
Normal file
5
templates/postgres/config.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
name: PostgreSQL
|
||||||
|
description: |
|
||||||
|
PostgreSQL — an object-relational database (ORDBMS)
|
||||||
|
version: v0.0.1
|
||||||
|
category: Database
|
Loading…
x
Reference in New Issue
Block a user