This guide will walk you through the process of running a PostgreSQL database inside a Docker container and connecting to it.
- Docker installed on your system
- Basic knowledge of SQL and command-line interface
- Clone the repository to your local machine.
- Build the Docker image for the PostgreSQL database by running
docker build -t dbtemplate .
in the root directory of the monorepo.
To run the applications, follow these steps:
- Start the PostgreSQL database by running
docker run -d --name dbtemplate-container -p 5432:5432 dbtemplate
. - you can
To connect to the database you can use the following instructions:
- Grab the username and password from the dockerfile
- by default , the postgresql server will run on your local host on port 5432
- using localhost as your hostname / servername and the username and password , you will be able to connect to the database