Skip to content

Commit 9fffd40

Browse files
committed
Restore pg_isready command
Replaced in #31
1 parent 588b868 commit 9fffd40

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

api/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ TRUSTED_HOSTS=localhost,api
1313
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
1414
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
1515
# Configure your db driver and server_version in config/packages/doctrine.yaml
16-
DATABASE_URL=pgsql://api-platform:!ChangeMe!@db/api
16+
DATABASE_URL=postgres://api-platform:!ChangeMe!@db/api
1717
###< doctrine/doctrine-bundle ###
1818

1919
###> nelmio/cors-bundle ###

api/.env.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ TRUSTED_HOSTS=localhost,api
1313
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
1414
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
1515
# Configure your db driver and server_version in config/packages/doctrine.yaml
16-
DATABASE_URL=pgsql://api-platform:!ChangeMe!@db/api
16+
DATABASE_URL=postgres://api-platform:!ChangeMe!@db/api
1717
###< doctrine/doctrine-bundle ###
1818

1919
###> nelmio/cors-bundle ###

api/docker/php/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if [ "$1" = 'php-fpm' ] || [ "$1" = 'bin/console' ]; then
1414
if [ "$APP_ENV" != 'prod' ]; then
1515
composer install --prefer-dist --no-progress --no-suggest --no-interaction
1616
>&2 echo "Waiting for Postgres to be ready..."
17-
until bin/console doctrine:query:sql "SELECT 1" --quiet; do
17+
until pg_isready --timeout=0 --dbname="${DATABASE_URL}"; do
1818
sleep 1
1919
done
2020
bin/console doctrine:schema:update --force --no-interaction

0 commit comments

Comments
 (0)