g3w-suite / g3w-suite-docker

Run G3W-SUITE stack with docker-compose
https://g3w-suite.readthedocs.io/en/latest/docker.html
32 stars 34 forks source link

Can not connect to PostGIS Database #115

Closed desilvarami closed 10 months ago

desilvarami commented 10 months ago

Checklist

Subject of the issue

I have installed G3W Suite using docker. Did not come across any errors during installation and all containers are running. But while browsing the application, I got 502 Bad Gateway error. When examine the running containers and logs I found following.

  1. g3w-suite-docker_g3w-suite_1 container restarts after every 60 seconds
  2. Could not run psql inside postgres container

Steps to reproduce

Clone g3w-suite-docker from latest stable branch 3.7.x Create .env file Run docker-compose up -d command Browse http://ipaddress and it will result 502 Bad Gateway error

Environment

Link to your project

No response

Additional info

g3w-suite-docker_g3w-suite_1 container restarts in every 60 seconds image

Can not run psql inside PostGIS container image

PostGIS log image

g3w-suite log image

wlorenzetti commented 10 months ago

Hi @desilvarami I just try to deploy a F3W-SUITE v3.7.x on a Ubuntu 22.04, but it works fine. Your postgis instance is not working fine. How to you do the deploy on your machine?

desilvarami commented 10 months ago

Hi @wlorenzetti thank you for testing out this. May be I am missing something here. After cloning and creating the .env file, I just executed "docker-compose up -d" command. I believe that would install PostGIS as declared in docker-compose.yml. In "docker ps" output I can see g3w-suite-docker_postgis_1 running. And as there is a random password is declared in .env (G3WSUITE_POSTGRES_PASS='89#kL8y3D'), I thought to update the password of DB User "g3wsuite" and change the same in .env. But unfortunately psql command did not work, though I could access the PostGIS container. May be that's why DBMS refuses connection. Kindly advice. Thank you.

desilvarami commented 10 months ago

Hi @wlorenzetti, since you have confirmed successful deployment on Ubuntu 22.04, I also upgraded my Ubuntu 20.04 to Ubuntu 22.04.3 LTS. After that I could successfully run the application. All the containers are continuously running. I have access to psql via PostGIS container. Thanks for the hint.

wlorenzetti commented 10 months ago

Good :)