Giter Site home page Giter Site logo

sbsb3838 / nanobox-docker-postgresql Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nanobox-io/nanobox-docker-postgresql

0.0 4.0 0.0 131 KB

PostgreSQL Image for Using PostgreSQL on Nanobox

Home Page: https://nanobox.io

License: Mozilla Public License 2.0

Makefile 4.66% Shell 80.28% Roff 15.06%

nanobox-docker-postgresql's Introduction

PostgreSQL Build Status Image

This is an PostgreSQL Docker image used to launch a PostgreSQL service on Nanobox. To use this image, add a data component to your boxfile.yml with the nanobox/postgresql image specified:

data.db:
  image: nanobox/postgresql

PostgreSQL Configuration Options

PostgreSQL components are configured in your boxfile.yml. All available configuration options are outlined below.

Version

When configuring a PostgreSQL service in your boxfile.yml, you can specify which version to load into your database service. The following version(s) are available:

  • 9.3
  • 9.4
  • 9.5
  • 9.6

Note: PostgreSQL versions cannot be changed after the service is created. To use a different version, you'll have to create a new PostgreSQL service.

version

# default setting
data.db:
  image: nanobox/postgresql
  config:
    version: 9.4

Custom Users/Permissions/Databases

You can create custom users with custom permissions as well as additional databases.

data.postgresql:
  image: nanobox/postgresql:9.5
  config:
    users:
    - username: customuser
      meta:
        privileges:
        - privilege: ALL PRIVILEGES
          type: DATABASE
          'on': gonano
          grant: true
        - privilege: ALL PRIVILEGES
          type: DATABASE
          'on': customdb
          grant: true
        roles:
        - SUPERUSER

For each custom user specified, Nanobox will generate an environment variable for the user's password using the following pattern:

# Pattern
COMPONENT_ID_USERNAME_PASS

# Examples

## Custom user config 1
data.postgres:
  config:
    users:
      - username: customuser

## Generated password evar 1
DATA_POSTGRES_CUSTOMUSER_PASS

## Custom user config 2
data.db:
  config:
    users:
      - username: dbuser

## Generated password evar 2
DATA_DB_DBUSER_PASS

Request PostgreSQL Boxfile Configs

One of the many benefits of using PostgreSQL is that it doesn't require much configuration. The project itself is finely tuned. However we know there are settings that users may want to tweak. If there's a setting you'd like to modify that is typically handled in the postresql.conf, please let us know by creating a new issue on this project.

Help & Support

This is a PostgreSQL Docker image provided by Nanobox. If you need help with this image, you can reach out to us in the Nanobox Slack channel. If you are running into an issue with the image, feel free to create a new issue on this project.

License

Mozilla Public License, version 2.0

nanobox-docker-postgresql's People

Contributors

glinton avatar sanderson avatar tylerflint avatar leveloid avatar

Watchers

James Cloos avatar 长毛是狗总公司 avatar  avatar 长毛是狗 avatar

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.