Skip to content

Latest commit

 

History

History
70 lines (52 loc) · 1.64 KB

README.md

File metadata and controls

70 lines (52 loc) · 1.64 KB

Database Laboratory.

This repository is intended to be a platform or academic laboratory for database design and implementation. This laboratory is based on Docker technology to lift PostgreSQL 15 and pgAdmin4 services in a Linux environment, mainly.

To install:

$ git clone https://github.com/ejdecena/lab_database
$ cd lab_database
$ sudo apt install make
$ make install
$ sudo usermod -aG docker $USER
$ sudo service docker start
close the terninal.

To run the laboratory:

$ make run
  • GO TO http://{PGADMIN_ADDRESS}:{PGADMIN_PORT}
  • Username: user@gmail.com.
  • Password: {PGADMIN_DEFAULT_PASSWORD} in .env file.

To login in pgAdmin4:

Login Pgadmin parameters.

To register a server in pgAdmin4:

When you log in for the first time, you will have to register a server. To do this, right click on the Servers option:

Register Server.

To connect pgAdmin4 to PostgreSQL:

The data for the connection are:

  • Host name / address: postgres_db
  • Port: 5432
  • Database: {POSTGRES_DB} in .env file.
  • Username: {POSTGRES_USER} in .env file.
  • Pass: {POSTGRES_PASSWORD} in .env file.

Server Connection.

To access the PostgreSQL container:

$ make psql

To look the logs of the laboratory:

$ make logs

To stop the laboratory:

$ make stop

To restart the laboratory:

$ make restart

To reset the databases of laboratory:

$ make reset