Skip to content

A Docker container definition to setup up a test DB and play with it

Notifications You must be signed in to change notification settings

tammymendt/playground-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

playground-db

A Docker container definition to setup up a test DB and play with it. The data from the test database is PostgresSQL sample database for a dvd rental shop.

Requirements

You should have an installation of docker and docker compose.

Use

  1. Clone this repository on your laptop
  2. Make sure docker is running. You can test this by running docker ps. You should see this outcome:
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES

and possibly a list of already running containers, if you had some already running. 3. From the command line, go to the directory where you cloned this repository and run docker-compose up -d. When you run docker ps now you should see a new running docker container called playground-db_postgres_1. You can now connect to your database either using a database client (e.g. DBeaver), using the postgres client psql (in case it is installed on your computer), or by connecting to your docker container.

The credentials for your running database are:

hostname: localhost
database: dvdrental
port: 5432
user: postgres
password: postgres

About

A Docker container definition to setup up a test DB and play with it

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published