Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

matschik/docker-compose-postgres-pgadmin

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

14 Commits
14 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Docker Compose for PostgreSQL and pgAdmin ๐Ÿณ

A Docker Compose setup for running a PostgreSQL database and pgAdmin, a web-based administration tool for PostgreSQL.

Features ๐ŸŒŸ

  • ๐Ÿš€ Easy Setup: One-command launch for both PostgreSQL and pgAdmin.
  • ๐Ÿ–ฅ๏ธ Pre-configured pgAdmin: Quick access to pgAdmin with pre-set environment variables and automatic server configuration via entrypoint.sh.
  • ๐Ÿ”‘ No pgAdmin Login Page: When accessing pgAdmin, you are automatically logged in with the credentials you set in the .env file.
  • โš™๏ธ Customizable: Easy to customize with your environment variables via the .env file.

Prerequisites ๐Ÿ› ๏ธ

  • Docker and Docker Compose installed on your machine.
  • Basic knowledge of Docker and PostgreSQL.

Getting Started ๐Ÿš€

  1. Clone the Repository

    git clone https://github.com/matschik/docker-compose-postgres-pgadmin.git
    cd docker-compose-postgres-pgadmin
  2. Set Up Environment Variables

    Copy the .env.example file to a new file named .env.

    cp .env.example .env

    Then edit the .env file to fill in your PostgreSQL and pgAdmin settings.

  3. Start Docker Compose

    Run the following command to start the services defined in compose.yaml:

    docker compose up -d
  4. Access pgAdmin

    Open your web browser and go to http://localhost:[PGADMIN_PORT]. Log in using the credentials you set in the .env file.

Contents ๐Ÿ“

  • compose.yaml: A Docker Compose file to set up PostgreSQL and pgAdmin.
  • .env.example: An example environment file. Rename this to .env and fill in your desired values before starting your containers.
  • entrypoint.sh: A custom entrypoint script for pgAdmin to set up server connections automatically.

Windows users ๐ŸชŸ

entrypoint.sh must keep Unix (LF) line endings to run inside the Linux container. This repository ships a .gitattributes file that enforces LF on clone, so you normally don't need to do anything. If you ever hit exec /entrypoint_custom.sh: no such file or directory, re-normalize the file:

git add --renormalize .

โš ๏ธ Production Use Caution โš ๏ธ

The pgAdmin setup provided in this repository, particularly with the use of the entrypoint.sh script, is intended for development or testing purposes and is not recommended for production environments. For production deployments, consider more secure and robust configuration practices.

Contributing ๐Ÿค

Contributions to the repository are welcome. Please fork the repository and submit a pull request with your changes.

License ๐Ÿ“œ

This project is licensed under the MIT License.

About

๐Ÿณ A Docker Compose setup for PostgreSQL and pgAdmin, ideal for development and testing environments.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.