Giter Club home page Giter Club logo

compose-postgres's Introduction

Hi there, I'm Guillaume ๐Ÿ‘‹

I'm currently responsible for technology at Peaks.


githubstats

compose-postgres's People

Contributors

cadbox1 avatar jaybcee avatar johnowl avatar khezen avatar pablintino avatar saderi avatar wsierakowski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

compose-postgres's Issues

pgAdmin lost data on restart

When I restart the container, the connection data saved in pgAdmin is lost.
I noticed in the image that the volume set is:
VOLUME [/var/lib/pgadmin]

Would it be okay to change docker-compose.yml?
From: volumes:
- pgadmin: /root/.pgadmin
To: volumes:
- pgadmin: /var/lib/pgadmin

Note: I am using the Docker Toolbox

Seems to work but...

Pg admin runs on 5050 but I cant connect to the database. If I use local pgadmin I can connect with no issues using the user:postgres and password:changeme

pgadmin can't connect to postgres

Hi,
i tried this configuration, containers start correctly but pgadmin can't connect to postgres.
This is error message:

Unable to connect to server:

could not connect to server: Host is unreachable
Is the server running on host "postgres" (172.29.0.2) and accepting
TCP/IP connections on port 5432?

Postgres service is accessible from the host using host ip address and, obviusly, from inside the container.

pgAdmin does not connect to postgres

I up this compose and all is good except when I add a new server in pgAdmin to connect to postgres, it says:
Unable to connect to server:

could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Address not available
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?

my new server:
Host: localhost
port: 5432

I can connect through local pgAdmin installation though, but not the one on localhost:5050.

Is it only me having this problem? Am I missing something?

A little precision

You should say that the host of the database is postgres.
If a non docker user sees that it maybe that he will not understand how it works, it will not help him ...

About Data in PgAdmin4

Hey friend,

I am using your compose but I dont have persistence data in pgadmin, in database is ok, just only in pgadmin doesnt show for me.

Why?

Error while installing

`NOTE: Configuring authentication for SERVER mode.

Traceback (most recent call last):
File "run_pgadmin.py", line 4, in
from pgAdmin4 import app
File "/pgadmin4/pgAdmin4.py", line 98, in
app = create_app()
File "/pgadmin4/pgadmin/init.py", line 380, in create_app
paths.init_app(app)
File "/pgadmin4/pgadmin/utils/paths.py", line 103, in init_app
raise InternalServerError(
werkzeug.exceptions.InternalServerError: 500 Internal Server Error: The user does not have permission to read and write to the specified storage directory.
[2021-03-09 06:51:14 +0000] [1] [INFO] Starting gunicorn 20.0.4
[2021-03-09 06:51:14 +0000] [1] [INFO] Listening at: http://[::]:80 (1)
[2021-03-09 06:51:14 +0000] [1] [INFO] Using worker: threads
[2021-03-09 06:51:14 +0000] [89] [INFO] Booting worker with pid: 89
[2021-03-09 06:51:16 +0000] [89] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/venv/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
worker.init_process()
File "/venv/lib/python3.8/site-packages/gunicorn/workers/gthread.py", line 92, in init_process
super().init_process()
File "/venv/lib/python3.8/site-packages/gunicorn/workers/base.py", line 119, in init_process
self.load_wsgi()
File "/venv/lib/python3.8/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
self.wsgi = self.app.wsgi()
File "/venv/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/venv/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
return self.load_wsgiapp()
File "/venv/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
return util.import_app(self.app_uri)
File "/venv/lib/python3.8/site-packages/gunicorn/util.py", line 358, in import_app
mod = importlib.import_module(module)
File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "/pgadmin4/run_pgadmin.py", line 4, in
from pgAdmin4 import app
File "/pgadmin4/pgAdmin4.py", line 98, in
app = create_app()
File "/pgadmin4/pgadmin/init.py", line 380, in create_app
paths.init_app(app)
File "/pgadmin4/pgadmin/utils/paths.py", line 103, in init_app
raise InternalServerError(
werkzeug.exceptions.InternalServerError: 500 Internal Server Error: The user does not have permission to read and write to the specified storage directory.
[2021-03-09 06:51:16 +0000] [89] [INFO] Worker exiting (pid: 89)
[2021-03-09 06:51:17 +0000] [1] [INFO] Shutting down: Master
[2021-03-09 06:51:17 +0000] [1] [INFO] Reason: Worker failed to boot.
[2021-03-09 06:51:21 +0000] [1] [INFO] Starting gunicorn 20.0.4
[2021-03-09 06:51:21 +0000] [1] [INFO] Listening at: http://[::]:80 (1)
[2021-03-09 06:51:21 +0000] [1] [INFO] Using worker: threads
[2021-03-09 06:51:21 +0000] [82] [INFO] Booting worker with pid: 82
[2021-03-09 06:51:23 +0000] [82] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/venv/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
worker.init_process()
File "/venv/lib/python3.8/site-packages/gunicorn/workers/gthread.py", line 92, in init_process
super().init_process()
File "/venv/lib/python3.8/site-packages/gunicorn/workers/base.py", line 119, in init_process
self.load_wsgi()
File "/venv/lib/python3.8/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
self.wsgi = self.app.wsgi()
File "/venv/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/venv/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
return self.load_wsgiapp()
File "/venv/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
return util.import_app(self.app_uri)
File "/venv/lib/python3.8/site-packages/gunicorn/util.py", line 358, in import_app
mod = importlib.import_module(module)
File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "/pgadmin4/run_pgadmin.py", line 4, in
from pgAdmin4 import app
File "/pgadmin4/pgAdmin4.py", line 98, in
app = create_app()
File "/pgadmin4/pgadmin/init.py", line 380, in create_app
paths.init_app(app)
File "/pgadmin4/pgadmin/utils/paths.py", line 103, in init_app
raise InternalServerError(
werkzeug.exceptions.InternalServerError: 500 Internal Server Error: The user does not have permission to read and write to the specified storage directory.
[2021-03-09 06:51:23 +0000] [82] [INFO] Worker exiting (pid: 82)
[2021-03-09 06:51:23 +0000] [1] [INFO] Shutting down: Master
[2021-03-09 06:51:23 +0000] [1] [INFO] Reason: Worker failed to boot.`

Pgadmin keeps losing connection while running queries

I was running a query similar to below when pgadmin was taking longer than an hour to run it.
SELECT seifa_scores.sid, seifa_scores.sa2_code, seifa_scores.sa2_name, seifa_scores.seifa_index, seifa_scores.year, seifa_scores.seifa_index_code, seifa_scores.seifa_score, seifa_scores.seifa_decile FROM abs.seifa_scores WHERE seifa_scores.year = 2011;

I don't remember if the connection was lost here too but I basically forced closed the pgadmin on task manager since I wanted a fresh start. But since then, the Pgadmin keeps losing the connection within a couple of minutes. I restarted my computer a few times now. I checked the services, postgres is running and is set to automatic; listened addesses on .conf file is "*". I don't understand any other solutions, they all seem complicated (TCP/IP address or keep alive).
I'm using PgAdmin 4 with Postgres 15 (PostgreSQL 15.3 on aarch64-unknown-linux-gnu, compiled by gcc (GCC) 7.3.1 20180712 (Red Hat 7.3.1-6), 64-bit) on Windows 11.
The errors I get:
to begin with the simple query to select all from a table takes longer than a couple of minutes, meanwhile select all from table limit 100 runs fine. when I go back to the query with no limit, I get error saying "Connection to pgAdmin server has been lost"
I play around a bit more, I get "network error" message, and a bit more, the whole display grays out and gives me "127.0.0.1 refused to connect".
If I restart the pgadmin, the connection establishes again and same story. Sometimes before losing the connection, the query to select all runs successfully but doesn't display any data, if I rerun it I get "ERROR: message contents do not agree with length in message type "D" "

Not connected to the server pgAdmin4

I'm new to pgAdmin4 and postgres. I have a table that I created in QGIS and imported it into a database using that function in QGIS. It had been working, but I recently upgraded to postgresql 11.5. Now when I attempt to query my database i receive the error message "Not connected to the server or the connection to the server has been closed." I can query the db in QGIS using the DB Manger. The table appears in the tree on the left side of the pgAdmin4 screen, but when I try to query it in PGAdmin, I get the "not connected" error." I'm using a localhost.

I tried disconnecting the server and reconnecting it through pgAdmin. When I did, I received the message that the server and DB were connected successfully; however I still cannot query the data.

I also tried reinstalling postgresql but that didn't solve the problem. Since this my db is not yet in production, I can start over from scratch, but uninstalling does not remove my servers.

I'm running on Windows 10, QGIS 3.4.

Thank you.

Changing passwords

What is the best practice for changing default passwords?
Going into container and settings env vars?

Can not change postgres password

Hi,

First thank you so much for your work and for sharing it !

I'm new in Docker, so I need help for a problem.

All is working on my project except that I cannot change the postgres password.
It tried to changed it on my env file and next directly on the file, the password is ever "changeme".
Of course, I stop and restart docker after each change :
docker-compose -f "docker-compose.yml" down
docker-compose -f "docker-compose.yml" up -d --build

whereas the change of the identifiers of PGADMIN worked well. I changed it by adding values in my .env file.

Thanks,

Ben.

pgAdmin authentication did not work

Hi,

I used the enviroment params below:

      PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:[email protected]}
      PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin}
      PGADMIN_CONFIG_SERVER_MODE: 'False'

When I access pgAdmin on browser, there are no authentication required.

How can to resolve it ?
Regrads,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.