Skip to main content
Version: 2.0

Posgres database

Supported Postgres version: 11
Posgis extension: Facultative

Configure phppgadmin

Use internal postgres

No yet documented

Use external postgres

Edit your inventory file inventories/<your inventory>/group_vars/regards_nodes/main.yml

  phppgadmin:
[ ... ]
db:
- name: DB Instance
host: database-inst.cnes.fr
port: 5432
defaultdb: <instance database name>
theme: cappuccino
- name: DB Project
host: database-first-project.cnes.fr
port: 5432
defaultdb: <first project database name>
theme: cappuccino
setting_main_theme: cappuccino

Use external postgres

Edit your inventory file inventories/<your inventory>/group_vars/regards_nodes/main.yml

  • add connection information
group_config_mservices:
[ ... ]
postgres:
instance:
host: database-inst.cnes.fr
port: 5432
user: <some user>
password: "{{ regards_vault.group_config_mservices.postgres.instance.password }}"
db: <instance database name>
init_project:
host: database-first-project.cnes.fr
port: 5432
user: <some user>
password: "{{ regards_vault.group_config_mservices.init_project.instance.password }}"
db: <first project database name>
  • remove the Postgres service that was deployed inside group_docker_cots
# Before
group_docker_cots:
postgres:
tag: "{{ group_docker_tags.cots }}"
[ ... ]

# After
group_docker_cots:
  • if you do not have Postgis on your database-inst.cnes.fr database, edit the access_instance service to indicate there is no Postgis available:
# Before
group_docker_mservices:
access_instance:
tag: "{{ group_docker_tags.back }}"
[ ... ]

# After
group_docker_mservices:
access_instance:
tag: "{{ group_docker_tags.back }}"
postgis: false
[ ... ]