项目作者: nanobox-io

项目描述 :
PostgreSQL Image for Using PostgreSQL on Nanobox
高级语言: Shell
项目地址: git://github.com/nanobox-io/nanobox-docker-postgresql.git
创建时间: 2015-07-01T20:27:43Z
项目社区:https://github.com/nanobox-io/nanobox-docker-postgresql

开源协议:MIT License

下载


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:

  1. data.db:
  2. 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

  1. # default setting
  2. data.db:
  3. image: nanobox/postgresql
  4. config:
  5. version: 9.4

Custom Users/Permissions/Databases

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

  1. data.postgresql:
  2. image: nanobox/postgresql:9.5
  3. config:
  4. users:
  5. - username: customuser
  6. meta:
  7. privileges:
  8. - privilege: ALL PRIVILEGES
  9. type: DATABASE
  10. 'on': gonano
  11. grant: true
  12. - privilege: ALL PRIVILEGES
  13. type: DATABASE
  14. 'on': customdb
  15. grant: true
  16. roles:
  17. - SUPERUSER

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

  1. # Pattern
  2. COMPONENT_ID_USERNAME_PASS
  3. # Examples
  4. ## Custom user config 1
  5. data.postgres:
  6. config:
  7. users:
  8. - username: customuser
  9. ## Generated password evar 1
  10. DATA_POSTGRES_CUSTOMUSER_PASS
  11. ## Custom user config 2
  12. data.db:
  13. config:
  14. users:
  15. - username: dbuser
  16. ## Generated password evar 2
  17. 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