Public Repository

Last pushed: a year ago
Short Description
Postgresql database
Full Description

Overview

  • Demonstrates running Ansible inside a container in a way that works on OpenShift. By using nns_wrapper, the entrypoint script is able to create an entry in the passwd file at startup, which enables Ansible, and then run a playbook to initialize a new database, and create users.
  • Used in django-gulp-nginx, an Ansible Container demo project.
  • Built to work with minishift, using a persistent volume claim (PVC) to store the database.

For a full description see the repository.

Usage

Here's how to use this image in the container.yml file of an Ansible Container project:


version: '2'
services:
  postgres:
    image: ansible/postgresql:latest
    environment:
      - POSTGRES_DB=mydb
      - POSTGRES_USER=admin
      - POSTGRES_PASS=admin
      - PGDATA=/var/lib/pgsql/data/userdata
    user: postgres
    command: ['postgres']
    entrypoint: ['/usr/bin/entrypoint.sh']
    expose:
      - 5432
    volumes:
      - pgql-data:/var/lib/pgsql/data
volumes:
  pgsql-data: {}

Docker Pull Command
Owner
ansible