Skip to content

Commit e6b9ab6

Browse files
fix actions
1 parent 7059cad commit e6b9ab6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ jobs:
3737

3838
- name: Wait for MySQL to be ready
3939
run: |
40-
for i in {1..30}; do
40+
for i in {1..60}; do
4141
if mysqladmin ping -h mysql -P 3306 -u sampleuser -p"samplepassword" --silent; then
4242
echo "MySQL is ready!"
4343
break
4444
fi
4545
echo "Waiting for MySQL to be ready..."
46-
sleep 2
46+
sleep 5 # Adjusted waiting time
4747
done
4848
4949
- name: Build with Gradle
@@ -60,4 +60,3 @@ jobs:
6060

6161
- name: Run dbAndCsvBatch (CSV to DB)
6262
run: ./gradlew dbAndCsvBatch:bootRun --args="--spring.profiles.active=local --spring.batch.job.name=CSV_TO_DB"
63-

compose.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ services:
1313
- ./init-scripts:/docker-entrypoint-initdb.d
1414
healthcheck:
1515
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "--silent"]
16-
interval: 10s
17-
timeout: 5s
18-
retries: 5
16+
interval: 20s # 健康チェック間隔を20秒に延長
17+
timeout: 10s # タイムアウトを10秒に設定
18+
retries: 10 # リトライ回数を10回に設定
19+
start_period: 60s # コンテナ起動からの待機時間を追加
1920
restart: always
2021
networks:
2122
default:

0 commit comments

Comments
 (0)