Coder Social home page Coder Social logo

docker-postgres-exec's Introduction

Docker Postgres executor

Docker container for initialising and manipulating external postgres databases by executing postgres SQL scripts.

Usage

To use this image you will need to either mount in your SQL scripts when you run this image or you will need to derive a new image from this one and copy your scripts across in your Dockerfile.

The scripts should be placed in /docker-entrypoint-initdb.d/.

An example of executing an image built in this way can be found below:

docker run \
       -e POSTGRES_HOST=your-postgres-server \
       -e POSTGRES_DB=your-db-name \
       -e POSTGRES_USER=your-postgres-user \
       -e POSTGRES_PASSWORD=your-password \
       your-image

The login credentials can also be mounted into the image rather than provided as environment variables.

Environment Variables

The variables and the defaults are shown below.

  • POSTGRES_HOST The host to connect to.
  • POSTGRES_PORT=5432 The port to connect to.
  • POSTGRES_DB_SECRET=/etc/postgres/db The location in which to look for the database name.
  • POSTGRES_USER_SECRET=/etc/postgres/user The location in which to look for the postgres username.
  • POSTGRES_PASSWORD_SECRET=/etc/postgres/password The location in which to look for the postgres password.
  • POSTGRES_DB The database name (overrides the secret).
  • POSTGRES_USER The postgres username (overrides the secret).
  • POSTGRES_PASSWORD The postgres password (overrides the secret).

Contributing

Feel free to submit pull requests and issues. If it's a particularly large PR, you may wish to discuss it in an issue first.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

docker-postgres-exec's People

Contributors

daniel-ac-martin avatar robinknipe avatar timgent avatar

Watchers

Marcin Ciszak avatar Jits avatar Ben Marvell avatar Rustem Suniev avatar Luke Ashe-Browne avatar Douglas Gardner avatar James Cloos avatar Oliver Sterzel avatar Leigh Eyles avatar Colin Gallagher avatar Jakub Czeczótka avatar Samuel.Hughes avatar  avatar Mohammud Yassine Jaffoo avatar Leon de Jager avatar  avatar Lance Paine avatar Martin Devlin avatar  avatar Iqbal Shaikh avatar Giles Hinchcliff avatar Geoffrey Martin avatar  avatar  avatar Dale Cotterill avatar Vijay Jadhav avatar Milan Bogunovic avatar  avatar Syed Rafiq avatar  avatar Ben Eustace avatar Rick Williams avatar  avatar

Forkers

uk-gov-mirror

docker-postgres-exec's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.