This repository contains a docker-compose.yml
file to quickly set up and run PgSQL with Adminer for database management.
- Docker installed on your system.
- Docker Compose installed.
- Clone this repository or copy the
pgsql-docker-compose.yml
file to your project directory. - Open a terminal and navigate to the directory containing the
pgsql-docker-compose.yml
file. - Run the following command to start the services:
docker compose -f pgsql-docker-compose.yml up -d --build
- Access Adminer in your browser at http://localhost:8080.
- Use the following credentials to log in:
- Server:
postgres
- Username:
admin
- Password:
admin
- Database:
mydb
- Server:
Below is an example of the Adminer login page:
You can modify the pgsql-docker-compose.yml
file to change the pgsql root password, database name, or Adminer port.
To stop and remove the containers, run:
docker compose -f pgsql-docker-compose.yml down
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:
This project is licensed under the MIT License.