{"id":27886021,"url":"https://github.com/azita-abdollahi/pgadmin-docker","last_synced_at":"2026-05-12T07:39:45.931Z","repository":{"id":153354813,"uuid":"513286908","full_name":"azita-abdollahi/pgadmin-docker","owner":"azita-abdollahi","description":"PostgreSQL + pgAdmin on Docker","archived":false,"fork":false,"pushed_at":"2024-09-24T06:21:18.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-05T07:54:54.594Z","etag":null,"topics":["docker","docker-compose","pgadmin4","postgresql"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/azita-abdollahi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-07-12T20:41:35.000Z","updated_at":"2024-09-24T06:21:21.000Z","dependencies_parsed_at":"2023-04-29T23:00:24.972Z","dependency_job_id":null,"html_url":"https://github.com/azita-abdollahi/pgadmin-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/azita-abdollahi/pgadmin-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azita-abdollahi%2Fpgadmin-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azita-abdollahi%2Fpgadmin-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azita-abdollahi%2Fpgadmin-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azita-abdollahi%2Fpgadmin-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/azita-abdollahi","download_url":"https://codeload.github.com/azita-abdollahi/pgadmin-docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azita-abdollahi%2Fpgadmin-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32929255,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-11T17:09:15.040Z","status":"online","status_checked_at":"2026-05-12T02:00:06.338Z","response_time":102,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","pgadmin4","postgresql"],"created_at":"2025-05-05T07:51:19.170Z","updated_at":"2026-05-12T07:39:45.926Z","avatar_url":"https://github.com/azita-abdollahi.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deploy `PostgresSQL` and `pgAdmin` on Docker\n\n\n\n[Docker](https://www.docker.com/) is an easy way to provide a suitable environment to build, test and deploy your projects. Today, most of the software tech companies and developers are using containered environments to setup their services.\n\nHere, we used [docker compose](https://docs.docker.com/compose/) plugin to build and deploy `postgres` and `pgAdmin` services.\n\n\n\n**Steps to write `Postgres` and `pgAdmin` configuration files:**\n\n- Create a  directory for configuration files in your desired path (Ex `postgres_docker`)\n\n- Create a [`docker-compose.yml`](https://docs.docker.com/compose/compose-file/) configuration file to define services\n\n  ```yaml\n  version: \"3\"\n  services:\n    postgres:\n      image: postgres:14\n      container_name: postgresql\n      networks:\n        - db-net\n      env_file: ./postgres_env\n      volumes:\n        - \"./postgres-data:/var/lib/postgresql/data\"\n    pgadmin:\n      image: dpage/pgadmin4:6.8\n      container_name: pg-admin\n      networks:\n        - db-net\n      env_file: ./pgadmin_env\n      ports:\n        - \"80:80\"\n      volumes:\n        - \"./pgadmin-data:/var/lib/pgadmin\"\n  \n  networks:\n    db-net:\n    \tdriver: bridge\n  ```\n\n  \n\n- Create `postgres_env` file for *postgres* container environments:\n\n  ```shell\n  POSTGRES_USER=root\n  POSTGRES_PASSWORD=root\n  ```\n\n- Create `pgadmin_env` file for *pgAdmin* container environments:\n\n  ```shell\n  PGADMIN_DEFAULT_EMAIL=root@example.com\n  PGADMIN_DEFAULT_PASSWORD=root\n  ```\n\n\n\n**Note: Persist `pgAdmin` container data**\n\nTo give `pgAdmin` enough privilege to write on its own volume, the mapped directory's user \u0026 group ownership should be 5050 (pgadmin user's ID)\n\n```shell\n# In your project's directory\n# First, make pgadmin-data directory (if you do't create it ;) )\nmkdir pgadmin-data\n\n# Then, change ownership's UID \u0026 GID to 5050\nsudo chown 5050:5050 pgadmin-data/\n```\n\n\nNow `pgAdmin` container has enough privilege to write data on `pgadmin-data/` directory\n\n\n\n**Now, start your services with `docker compose` command:**\n\n```shell\n# Run containered services\ndocker compose up -d\n\n# Check your services status\ndocker compose ps\n\n# And if you wish to stop them\ndocker compose down\n```\n\n**For troubleshooting container issues, use logs:**\n\n```shell\n# To monitor a specific service's logs (without following)\ndocker compose logs ServiceName\n# And if you want to use following option\ndocker compose logs -f ServiceName\n```\n\nNote: If you don't provide `ServiceName` argument, it will return all services logs\n\n\n\nFinally, open `https://yourserverip:PGADMIN_PORT` in your browser and user credentials those provided in `pgadmin_env` file and if you want to register your postgres server in pgAdmin, use credetials provided in `postgres_env` file.\n\nEnjoy ;)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazita-abdollahi%2Fpgadmin-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazita-abdollahi%2Fpgadmin-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazita-abdollahi%2Fpgadmin-docker/lists"}