File tree Expand file tree Collapse file tree 4 files changed +15
-23
lines changed Expand file tree Collapse file tree 4 files changed +15
-23
lines changed Original file line number Diff line number Diff line change 16
16
composer && \
17
17
echo "**** install runtime packages ****" && \
18
18
apk add --no-cache \
19
- curl \
20
19
fontconfig \
21
20
memcached \
22
- netcat-openbsd \
23
21
php8-ctype \
24
22
php8-curl \
25
23
php8-dom \
Original file line number Diff line number Diff line change 16
16
composer && \
17
17
echo "**** install runtime packages ****" && \
18
18
apk add --no-cache \
19
- curl \
20
19
fontconfig \
21
20
memcached \
22
- netcat-openbsd \
23
21
php8-ctype \
24
22
php8-curl \
25
23
php8-dom \
Original file line number Diff line number Diff line change 16
16
composer && \
17
17
echo "**** install runtime packages ****" && \
18
18
apk add --no-cache \
19
- curl \
20
19
fontconfig \
21
20
memcached \
22
- netcat-openbsd \
23
21
php8-ctype \
24
22
php8-curl \
25
23
php8-dom \
Original file line number Diff line number Diff line change 36
36
37
37
# Echo init finish for test runs
38
38
if [ -n "${TEST_RUN}" ]; then
39
- echo '[services.d ] done.'
39
+ echo '[ls.io-init ] done.'
40
40
fi
41
41
42
42
# Create API key if needed
@@ -121,24 +121,22 @@ if ! grep -qx '^post_max_size.*$' /config/php/php-local.ini; then
121
121
echo 'post_max_size = 100M' >>/config/php/php-local.ini
122
122
fi
123
123
124
- # check for the mysql endpoint for 30 seconds
125
- END=$((SECONDS + 30))
126
- while [ ${SECONDS} -lt ${END} ] && [ -n "${DB_HOST}" ]; do
127
- if /usr/bin/nc -z "${DB_HOST}" "${DB_PORT}"; then
128
- if [ -n "$(/usr/bin/nc -w1 "${DB_HOST}" "${DB_PORT}")" ]; then
129
- if [ -n "${RUN}" ]; then
130
- break
131
- fi
132
- RUN="RAN"
133
- # we sleep here again due to first run init on DB containers
134
- if [ ! -f /dbwait.lock ]; then
135
- sleep 5
136
- fi
137
- else
138
- sleep 1
124
+ # check for the mysql endpoint
125
+ echo "Waiting for DB to be available"
126
+ END=$((SECONDS+30))
127
+ while [[ ${SECONDS} -lt ${END} ]] && [[ -n "${DB_HOST+x}" ]]; do
128
+ if [[ $(/usr/bin/nc -w1 "${DB_HOST}" "${DB_PORT}" | tr -d '\0') ]]; then
129
+ if [[ -n "${RUN}" ]]; then
130
+ break
139
131
fi
132
+ RUN="RAN"
133
+ # we sleep here again due to first run init on DB containers
134
+ if [[ ! -f /dbwait.lock ]]; then
135
+ sleep 5
136
+ fi
137
+ else
138
+ sleep 1
140
139
fi
141
- sleep 1
142
140
done
143
141
144
142
# update database - will set up database if fresh, or, migrate existing
You can’t perform that action at this time.
0 commit comments