incubator-answer
incubator-answer copied to clipboard
Auto install failed for the reason of Postgres password
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.
Do you add depends_on in your docker-compose.yml?
https://github.com/apache/incubator-answer/blob/main/docker-compose.uffizzi.yml#L46-L48
@chendelin1982 If you are using the docker-compose. FYI: https://github.com/apache/incubator-answer/issues/472#issuecomment-1670860248
@chendelin1982 If you are using the docker-compose. FYI: #472 (comment)
Yes, add depends_on can run OK
Do you add
depends_onin your docker-compose.yml? https://github.com/apache/incubator-answer/blob/main/docker-compose.uffizzi.yml#L46-L48
Yes, This is OK