Skip to content

Commit

Permalink
Merge pull request #1018 from nanasess/fix-ci
Browse files Browse the repository at this point in the history
GitHub Actions で PostgreSQL がエラーになるのを修正
  • Loading branch information
nanasess authored Oct 4, 2024
2 parents 74eaa0a + 566278f commit 928021e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions docker-compose.pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ services:
command: apache2-foreground
entrypoint: /wait-for-pgsql.sh
depends_on:
- postgres
postgres:
condition: service_healthy
environment:
TZ: Asia/Tokyo
PHP_POST_MAX_SIZE: 10M
Expand All @@ -33,14 +34,15 @@ services:
PASSWORD_HASH_ALGOS: sha256

postgres:
image: postgres
image: postgres:16
environment:
- TZ=Asia/Tokyo
- POSTGRES_DB=eccube_db
- POSTGRES_USER=eccube_db_user
- POSTGRES_PASSWORD=password
- POSTGRES_HOST_AUTH_METHOD=md5
- POSTGRES_INITDB_ARGS=--auth-host=md5
# 古いクライアント用の設定
# - POSTGRES_HOST_AUTH_METHOD=md5
# - POSTGRES_INITDB_ARGS=--auth-host=md5
ports:
- 15432:5432
volumes:
Expand Down
2 changes: 1 addition & 1 deletion dockerbuild/wait-for-pgsql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

export PGPASSWORD=$DB_PASSWORD
until psql -h "${DB_SERVER}" -U "${DB_USER}" -d "template1" -c '\l'; do
until psql -h "${DB_SERVER}" -U "${DB_USER}" -d "template1" -c 'SELECT 1'; do
>&2 echo "Postgres is unavailable - sleeping"
printf "."
sleep 1
Expand Down

0 comments on commit 928021e

Please sign in to comment.