Skip to content

rafi021/postgresql-adminer-docker-compose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Docker Compose for PostgreSQL and Adminer

This repository contains a docker-compose.yml file to quickly set up and run PgSQL with Adminer for database management.

Prerequisites

  • Docker installed on your system.
  • Docker Compose installed.

Usage

  1. Clone this repository or copy the pgsql-docker-compose.yml file to your project directory.
  2. Open a terminal and navigate to the directory containing the pgsql-docker-compose.yml file.
  3. Run the following command to start the services:
    docker compose -f pgsql-docker-compose.yml up -d --build
  4. Access Adminer in your browser at http://localhost:8080.
  5. Use the following credentials to log in:
    • Server: postgres
    • Username: admin
    • Password: admin
    • Database: mydb

Adminer Login Page

Below is an example of the Adminer login page:

Adminer Login Page

Configuration

You can modify the pgsql-docker-compose.yml file to change the pgsql root password, database name, or Adminer port.

Stopping the Services

To stop and remove the containers, run:

docker compose -f pgsql-docker-compose.yml down

Example docker-compose.yml

services:
  pgsql:
    image: postgres:15
    container_name: pgsql
    environment:
      POSTGRES_USER: admin
      POSTGRES_PASSWORD: admin
      POSTGRES_DB: mydb
    ports:
      - "5432:5432"
    volumes:
      - pgsql_data:/var/lib/postgresql/data

  adminer:
    image: adminer:latest
    container_name: adminer
    environment:
      ADMINER_DEFAULT_SERVER: pgsql
    ports:
      - "8080:8080"

volumes:
  pgsql_data:

License

This project is licensed under the MIT License.

Releases

No releases published

Packages

No packages published