~cedric/newspipe

ref: v9.3.0 newspipe/wait-for-postgres.sh -rwxr-xr-x 421 bytes
0e9c0de1Cédric Bonhomme Updated CHANGELOG. 1 year, 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

# Used for Docker.

set -e

shift

until (! command -v psql || PGPASSWORD=password psql -h db -U "postgres" -c '\q' )
do
  >&2 echo "Postgres is unavailable - sleeping"
  sleep 1
done

>&2 echo "Postgres is up - executing command"
export Newspipe_CONFIG=/newspipe/instance/production.py
poetry run ./manager.py db_create >/dev/null
poetry run pybabel compile -d newspipe/translations
poetry run ./runserver.py