{"id":20780735,"url":"https://github.com/farrajota/docker-pgadmin4","last_synced_at":"2026-04-13T04:02:03.792Z","repository":{"id":202488505,"uuid":"138606866","full_name":"farrajota/docker-pgadmin4","owner":"farrajota","description":"pgadmin4 + postgres10 on docker","archived":false,"fork":false,"pushed_at":"2018-06-25T16:35:47.000Z","size":956,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-18T08:46:37.170Z","etag":null,"topics":["docker","docker-compose","pgadmin4","postgres","postgresql"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/farrajota.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}},"created_at":"2018-06-25T14:33:11.000Z","updated_at":"2018-06-25T16:37:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"57ee4dc8-a5ef-48c8-913c-58ee9d5e8d0d","html_url":"https://github.com/farrajota/docker-pgadmin4","commit_stats":null,"previous_names":["farrajota/docker-pgadmin4"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farrajota%2Fdocker-pgadmin4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farrajota%2Fdocker-pgadmin4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farrajota%2Fdocker-pgadmin4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farrajota%2Fdocker-pgadmin4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/farrajota","download_url":"https://codeload.github.com/farrajota/docker-pgadmin4/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243125155,"owners_count":20240263,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","postgres","postgresql"],"created_at":"2024-11-17T13:39:01.161Z","updated_at":"2025-12-26T04:33:19.857Z","avatar_url":"https://github.com/farrajota.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pgAdmin 4 (with Docker)\n\nThis is a basic docker image for running pgAdmin 4 in a container. The default configuration is intended for playing with SQL datasets and it is not intended for production (it runs in \"desktop\" mode and authentication is disabled).\n\n## Requirements\n\n- Docker\n- docker-compose\n\n# Getting started\n\nTo run the pgAdmin4 docker image you just need to call `docker-compose up` (or `make up`) to start the service with postgres and pgadmin4.\n\nThen, you must open a browser tab and go to `0.0.0.0:5050` or `127.0.0.1:5050` to start using the pgAdmin service.\n\n\u003e Note: If you start the service via `localhost:5050` you'll receive an error on the form **Query Tool Initialize Error** when trying to use the query tool. This is an issue with pgadmin v3.0 and, as soon as a fix is provided, I'll update this repository accordingly.\n\n## Setting up a dataset\n\nTo create a dataset you first need to set up a server to connect to the postgres service. For that, you'll need to (1) set a server connection to the postgres service and (2)create a database (and (3) load data from a file).\n\nThe following subsections will show you how to set up these steps in order to use pgAdmin for querying data.\n\n### Set up a connection to the postgres service\n\n1. Right click on the `Servers` in the left side-bar and create a server;\n\n![alt text](images/screenshot1.png \"Set up a server\")\n\n2. A popup window will appear. In the **General** tab, enter a name for the server (for example, *Postgres10*);\n\n![alt text](images/screenshot2.png \"Give the server a name (e.g., Postgres10)\")\n\n3. In the **Connection** tab, add the following string to the Host name/address: `postgres`;\n\n![alt text](images/screenshot3.png \"Set the Host name/address to 'postgres'\")\n\n4. Set the password field to `postgres` (optional: click the **Save password?** checkbox to avoid typoping the password everytime you start pgadmin);\n\n![alt text](images/screenshot4.png \"Set the Host name/address to 'postgres'\")\n\n5. Save the settings.\n\n### Create a database\n\n1. In the previously created server connection, right click on the `Databases` field and click on Create -\u003e Database;\n\n![alt text](images/screenshot5.png \"Creating a database\")\n\n2. Give a name to the database and click on save.\n\n![alt text](images/screenshot6.png \"Set a name for the database\")\n\nA database will be created and you should see a sucess message appear in the bottom-right corner of the screen.\n\n### Load/restore data of a database\n\nLoading data into a database can be done by following the next steps. Before doing so, you must copy the file of the database you want to load into a directory in the  root dir of this repository with the name `data/`. After you've copied a data file into this directory, do the following steps to load the data to postgres:\n\n1. On the database you've previously created, right click on its name under Databases and select the `Restore` option;\n\n![alt text](images/screenshot7.png \"Restoring the data of a database\")\n\n2. A popup window will open. Click on the **...** icon in the right side of the **Filename** field;\n\n![alt text](images/screenshot8.png \"Open data files\")\n\n3. This will opean another window and you'll travel to the `/home/` directory. This is where the data file stored in the `data` dir is located. To visualize it, select the **All Files** option in the dropdown box in the bottom right corner;\n\n![alt text](images/screenshot9.png \"home dir with All Files selected\")\n\n4. Select the file you want to load and click on **Save**.\n\n5. Next, in the **Restore options** tab, click on the **Data** box and set it to `yes` and then click on **Restore**;\n\n![alt text](images/screenshot10.png \"Set restore options\")\n\n\u003e Note: You'll see in the bottom right corner a success message if the database restoration has been done successfully.\n\n6. Finally, right click on the database you've restored and click on **Refresh** in order to see the changes done to the database.\n\n![alt text](images/screenshot11.png \"Update the database to see the changes\")\n\n## Querying a database\n\nQuerying a database is easy:\n\n1. Select the database you want to query;\n\n2. Right click on the database and select the **Query Tool** option;\n\n![alt text](images/screenshot12.png \"Query Tool\")\n\n\u003e Note: If it is giving the error **Query Tool Initialize Error**, you'll need to connect to pgAdmin via `0.0.0.:5050` or `127.0.0.1:5050`. pgAmin v3.0 is having an issuing when using `localhost:5050` to connect to the service.\n\n3. Write an SQL statement and click on the symbol to run it.\n\n![alt text](images/screenshot13.png \"Run an SQL statement\")\n\n# Acknowledgements\n\nThis repository is based on @thaJeztah's [pgadmin4-docker](https://github.com/thaJeztah/pgadmin4-docker).\n\n# License\n\n[MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarrajota%2Fdocker-pgadmin4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffarrajota%2Fdocker-pgadmin4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarrajota%2Fdocker-pgadmin4/lists"}