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 1616 composer && \
1717 echo "**** install runtime packages ****" && \
1818 apk add --no-cache \
19- curl \
2019 fontconfig \
2120 memcached \
22- netcat-openbsd \
2321 php8-ctype \
2422 php8-curl \
2523 php8-dom \
Original file line number Diff line number Diff line change 1616 composer && \
1717 echo "**** install runtime packages ****" && \
1818 apk add --no-cache \
19- curl \
2019 fontconfig \
2120 memcached \
22- netcat-openbsd \
2321 php8-ctype \
2422 php8-curl \
2523 php8-dom \
Original file line number Diff line number Diff line change 1616 composer && \
1717 echo "**** install runtime packages ****" && \
1818 apk add --no-cache \
19- curl \
2019 fontconfig \
2120 memcached \
22- netcat-openbsd \
2321 php8-ctype \
2422 php8-curl \
2523 php8-dom \
Original file line number Diff line number Diff line change 3636
3737# Echo init finish for test runs
3838if [ -n "${TEST_RUN}" ]; then
39- echo '[services.d ] done.'
39+ echo '[ls.io-init ] done.'
4040fi
4141
4242# Create API key if needed
@@ -121,24 +121,22 @@ if ! grep -qx '^post_max_size.*$' /config/php/php-local.ini; then
121121 echo 'post_max_size = 100M' >>/config/php/php-local.ini
122122fi
123123
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
139131 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
140139 fi
141- sleep 1
142140done
143141
144142# update database - will set up database if fresh, or, migrate existing
You can’t perform that action at this time.
0 commit comments