Sign inSign up

mayeu/postgres-dev

By mayeu

•Updated over 7 years ago

A docker image for postgres tailored toward dev and testing environment

Image
0

9.7K

mayeu/postgres-dev repository overview

⁠🐘 Postgres Dev image

This is a postgres docker image tailored toward software development and testing.

It should not be run in production at all. You will lose data if you do so (see the features).

This image is entirely based on the official postgres one⁠. Thus, the following documentation only covers the additional configuration specific to this image.

⁠✨ Features

Multiple databases support.

You can declare multiple databases directly via an environment variable. So you can have my-project-dev, my-project-test, etc. easily. All of them share the same user and password.

Really really fast write operation.

The image breaks all write guarantee and thus goes really fast. This is ideal for dev & testing, not so for production. It uses libeatmydata⁠ to achieve this.

⁠🌳 Configuration

⁠POSTGRES_ADDITIONAL_DB

In addition to the database created with the POSTGRES_DB environment variable, this image provides support to have any number of DB via the POSTGRES_ADDITIONAL_DB.

Note that all the DB created like this will use the same user and password that you provided via POSTGRES_USER and POSTGRES_PASSWORD

Example of use in a docker-compose.yml file:

version: '3'
services:
  db:
    image: mayeu/postgres-dev
    environment:
      POSTGRES_PASSWORD: password
      POSTGRES_USER: user
      POSTGRES_DB: db1
      POSTGRES_ADDITIONAL_DB: db2,db3,db4

You can put one or more databse. All databases must be separated by a coma (',').

Tag summary

Content type

Image

Digest

Size

112.9 MB

Last updated

over 7 years ago

docker pull mayeu/postgres-dev