Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Actions で PostgreSQL がエラーになるのを修正 #1018

Merged
merged 2 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading