As the wait-for-it script is started before the parsing of the command
line, it is always started. It can be a problem if a user wants to start
some other binary than odoo (for example a shell).
Also, the wait-for-it script is only checking if a port is open on a
host and then waits 5 seconds before starting Odoo.
With this commit, the wait-for-it script is replaced by a more useful
custom python script that checks if the postgresql server is able to
handle a connection with the given parameters. Odoo then starts whenever
it's ready or fails after a 30 sec timeout.
In some situations, like when a docker compose file use a data volume
to persist postgresql databases, the Odoo server starts and tries to
connect to database server before the postgresql server is ready.
In such a case, the Odoo containers fails to start.
With this commit, the wait-for-it script is used to wait for the
database server service to be ready before starting Odoo.
This script is available as a Debian package.
Closes#258, closes#259
While phonenumbers is not required to run Odoo, it's a requested nice to
have.
To avoid a red warning while installing num2words with pip, the Debian
backport repository is used.
Also use Debian slim images to gain some space.
closes#245 and closes#168