incubator-answer icon indicating copy to clipboard operation
incubator-answer copied to clipboard

Auto install failed for the reason of Postgres password

Open chendelin1982 opened this issue 1 year ago • 4 comments

Is your feature request related to a problem? Please describe

I use Docker image for install. It work good, but I found if when the database container completes later than Answer container , Answer will not wait or monitor the database service, but will directly exit the automatic installation mode

docker logs of Answer

[upload-dir] try to install...
[upload-dir] install success, upload directory is /data/uploads
[i18n] try to install i18n bundle...
[i18n] find i18n bundle 42
install all initial environment done
[auto-install] try to install by environment variable
connection database failed: dial tcp 172.18.0.13:5432: connect: connection refused
[auto-install] try to init by env fail: Database connection failed
[SUCCESS] answer installation service will run at: http://localhost:80/install/ 

Then, I restart Answer container, auto install is OK

Describe the solution you'd like

Answer container should try to wait continuously or monitor the database service. When the service is available, start automatic installation.

chendelin1982 avatar Jan 13 '24 00:01 chendelin1982

Do you add depends_on in your docker-compose.yml? https://github.com/apache/incubator-answer/blob/main/docker-compose.uffizzi.yml#L46-L48

jihuayu avatar Jan 13 '24 01:01 jihuayu

@chendelin1982 If you are using the docker-compose. FYI: https://github.com/apache/incubator-answer/issues/472#issuecomment-1670860248

LinkinStars avatar Jan 13 '24 09:01 LinkinStars

@chendelin1982 If you are using the docker-compose. FYI: #472 (comment)

Yes, add depends_on can run OK

chendelin1982 avatar Jan 15 '24 02:01 chendelin1982

Do you add depends_on in your docker-compose.yml? https://github.com/apache/incubator-answer/blob/main/docker-compose.uffizzi.yml#L46-L48

Yes, This is OK

chendelin1982 avatar Jan 15 '24 02:01 chendelin1982