Switch maas to dockerized PostgreSQL
Changes to support deploying Postgresql in docker swarm for MAAS
Prod-related: PROD-25203 (PROD:25203)
Change-Id: Ib48de31ed35a883ea8eff5a7fb4fba46e0cd6a52
diff --git a/docker/swarm/stack/postgresql.yml b/docker/swarm/stack/postgresql.yml
index 192b82c..b3936c6 100644
--- a/docker/swarm/stack/postgresql.yml
+++ b/docker/swarm/stack/postgresql.yml
@@ -2,7 +2,8 @@
_param:
docker_postgresql_replicas: 1
postgresql_bind_host: postgresql-db
- postgresql_bind_port: ${_param:haproxy_postgresql_bind_port}
+ postgresql_bind_port: 5432
+ postgresql_exposed_port: 5432
postgresql_ssl:
enabled: false
postgresql_admin_user: postgres
@@ -14,6 +15,7 @@
environment:
POSTGRES_USER: ${_param:postgresql_admin_user}
POSTGRES_PASSWORD: ${_param:postgresql_admin_user_password}
+ PGDATA: /var/lib/postgresql/data/pgdata
service:
postgresql-db:
image: ${_param:docker_image_postgresql}
@@ -24,8 +26,4 @@
volumes:
- /srv/volumes/postgresql/data:/var/lib/postgresql/data
ports:
- - ${_param:haproxy_postgresql_exposed_port}:${_param:haproxy_postgresql_bind_port}
- network:
- default:
- external:
- name: oss_backend
+ - ${_param:postgresql_exposed_port}:${_param:postgresql_bind_port}