Added tpl file
This commit is contained in:
parent
b5e6c3d524
commit
771d29502d
41
templates/postgres/1/docker-compose.yml.tpl
Normal file
41
templates/postgres/1/docker-compose.yml.tpl
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
version: '2'
|
||||||
|
services:
|
||||||
|
postgres-lb:
|
||||||
|
image: rancher/lb-service-haproxy
|
||||||
|
ports:
|
||||||
|
- ${lb_port}
|
||||||
|
{{- if ne .Values.host_label ""}}
|
||||||
|
labels:
|
||||||
|
io.rancher.scheduler.affinity:host_label: ${host_label}
|
||||||
|
{{- end}}
|
||||||
|
|
||||||
|
postgres-data:
|
||||||
|
image: busybox
|
||||||
|
labels:
|
||||||
|
io.rancher.container.start_once: true
|
||||||
|
{{- if ne .Values.host_label ""}}
|
||||||
|
io.rancher.scheduler.affinity:host_label: ${host_label}
|
||||||
|
{{- end}}
|
||||||
|
volumes:
|
||||||
|
- pgdata:/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
|
||||||
|
{{- if ne .Values.host_label ""}}
|
||||||
|
io.rancher.scheduler.affinity:host_label: ${host_label}
|
||||||
|
{{- end}}
|
||||||
|
volumes_from:
|
||||||
|
- postgres-data
|
||||||
|
volumes:
|
||||||
|
pgdata:
|
||||||
|
driver: ${VOLUME_DRIVER}
|
||||||
|
per_container: true
|
Loading…
x
Reference in New Issue
Block a user