docker: use alpine flavor of postgres image, update to postgres 10.10

This commit is contained in:
Leon Klingele 2019-08-10 10:22:10 +02:00
parent bd7950b757
commit 557ccb12bb
No known key found for this signature in database
GPG Key ID: 0C8AF48831EEC211
2 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
FROM postgres:10
FROM postgres:10-alpine
ENV POSTGRES_USER postgres
# Do not require a PostgreSQL superuser password.

View File

@ -5,7 +5,7 @@ if [ ! -f /var/lib/postgresql/data/setupFinished ]; then
echo "### first run - setting up invidious database"
/usr/local/bin/docker-entrypoint.sh postgres &
sleep 10
until runuser -l postgres -c 'pg_isready' 2>/dev/null; do
until su postgres -c 'pg_isready' 2>/dev/null; do
>&2 echo "### Postgres is unavailable - waiting"
sleep 5
done