marioy47 / learn-postgresql-development

Docker compose environment for practicing PosgreSQL development

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PostgreSQL learning environment

This was created to follow the PostgreSQL Front End Masters course.

It includes the following Containers:

The customized Docker image for PostgreSQL includes git, wget and bzip2 which are needed to import the OMDB database.

NPM Commands

All commands needed where created as scripts in package.json

  • npm run psql: Gets the pgsql command on the PostgreSQL image
  • npm run bash: Executes bash on the PostgreSQL image
  • npm run omdb: Uses the omdb-postgres repo to import the omdb database into postgres.
    • Running this command will take a long time since the OMDB database is about 2G in size

The npm run omdb command can be executed in parts in case you want to debug issues. Refer to the pacakge.json file scripts for more info.

PgAdmin4

You can connect to PgAdmin4 on http://localhost:5050/ to manage the PostgreSQL databases with the following creadentials:

User: admin@example.co Password: password

And register a new Server by right clicking on the left sidebar and usgin the following connection paramters:

  • Name: Pg Docker Container (this can be whaterver you want actually)
  • Host: postgres
  • Port: 5432 (the default port)
  • User: postgres
  • Password: password

You can cange all this values by creating an .env file

About

Docker compose environment for practicing PosgreSQL development


Languages

Language:Shell 60.4%Language:Dockerfile 39.6%