matic-insurance.docker-postgres
Role Name
This Ansible role manages and runs a PostgreSQL docker container. It can also create an initial user and database if needed.
It uses a data container to keep data safe, which is a cleaner method than using host volumes.
Requirements
Tested with Ubuntu 14.04.
This role uses Ansible's docker module, so the requirements are the same.
Role Variables
Here are the default variables and their values:
postgres_docker_image: postgres
postgres_docker_image_tag: 9.5
postgres_container_name: 'postgres'
postgres_port: 5432
You can also set optional variables to create an initial user and database:
postgres_user: db_user
postgres_password: db_password
postgres_database: my_db
postgres_schema: my_db_schema
postgres_networks: [
{ name: backend }
]
You can adjust Docker settings using this variable:
container_memory_limit: 512m
Dependencies
No dependencies.
Example Playbook
- hosts: database
roles:
- role: matic-insurance.docker-postgres
tags: ['database']
postgres_user: 'db_user'
postgres_password: 'db_password' # it's better to store this in Vault
postgres_database: 'my_db'
License
MIT
Author Information
Matic is a platform that connects lenders and borrowers for new home loans. Borrowers can track their loan process and understand what they need to do to complete it.
Informazioni sul progetto
Manage and run the PostgreSQL docker container.
Installa
ansible-galaxy install matic-insurance.docker-postgres
Licenza
mit
Download
638
Proprietario