Adding PostgreSQL

This commit is contained in:
Mateusz Trojak
2016-12-29 11:59:17 +01:00
parent 3d85bae5cc
commit 2bb9b57fcc
5 changed files with 93 additions and 0 deletions
+29
View 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