Thanks to visit codestin.com
Credit goes to github.com

Skip to content

marcusguttenplan/docker-postgresql-multiple-databases

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Using multiple databases with the official PostgreSQL Docker image

Usage

Quickly refactored to use the same user with multiple databases, for deploying a Rails application quickly.

Note: requires docker to run with -id to force the entrypoint script into the background, otherwise the container will only stay up as long as the current terminal window is open.

git clone <this-repo> db
docker build db -t db #tag the built image to find it better
docker run -id --name rails-db -e POSTGRES_MULTIPLE_DATABASES="db-dev","db-test","db-prod" -e POSTGRES_USER=<user> -e POSTGRES_PASSWORD=<pw> -p 5435:5432 db:latest

About

Using multiple databases with the official PostgreSQL Docker image

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 77.9%
  • Dockerfile 22.1%