Skip to content

Commit

Permalink
🔼 Bump versions
Browse files Browse the repository at this point in the history
  • Loading branch information
bdsoha committed Jan 12, 2025
1 parent 7ae27a6 commit 87992df
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ARG php_version=8.3
ARG php_version=8.4
ARG frankenphp_version=1.4

FROM dunglas/frankenphp:1.2-php${php_version} AS base
FROM dunglas/frankenphp:${frankenphp_version}-php${php_version} AS base
WORKDIR /laravel
SHELL ["/bin/bash", "-eou", "pipefail", "-c"]

Expand All @@ -16,7 +17,6 @@ COPY src/php.ini "${PHP_INI_DIR}/php.ini"
RUN apt-get update \
&& apt-get satisfy -y --no-install-recommends \
"curl (>=7.88)" \
"supervisor (>=4.2)" \
"unzip (>=6.0)" \
"vim-tiny (>=2)" \
&& rm -rf /var/lib/apt/lists/*
Expand Down
28 changes: 14 additions & 14 deletions src/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ _migrate() {
local count=0
local timeout=20

while [ $count -lt "${timeout}" ]; do
while [ "$count" -lt "$timeout" ]; do
php -f /common/test_db_connection.php > /dev/null 2>&1

status=$?

if [ $status -eq 0 ]; then
if [ "$status" -eq 0 ]; then
echo "✅ Database connection successful."
break
fi
Expand All @@ -31,7 +31,7 @@ _migrate() {
sleep 1
done

if [ $count -eq "${timeout}" ]; then
if [ "$count" -eq "$timeout" ]; then
echo "⛔ Database connection failed after multiple attempts."
exit 1
fi
Expand All @@ -41,7 +41,7 @@ _migrate() {
}

_setup() {
if [ -n "${CONTAINER_MANUAL_SETUP}" ]; then
if [ -n "$CONTAINER_MANUAL_SETUP" ]; then
echo "⏭: Skipping setup..."

return
Expand All @@ -63,30 +63,30 @@ _setup() {
}

_run() {
case "${CONTAINER_MODE}" in
case "$CONTAINER_MODE" in
app)
echo "🚀 Running octane..."
exec "${ARTISAN}" octane:frankenphp --host=0.0.0.0 --port="${CONTAINER_PORT}"
exec ${ARTISAN} octane:frankenphp --host=0.0.0.0 --port="$CONTAINER_PORT"
;;
worker)
echo "⏳ Running the queue..."
exec "${ARTISAN}" queue:work -vv \
exec ${ARTISAN} queue:work -vv \
--no-interaction \
--tries="${CONTAINER_WORKER_TRIES}" \
--sleep="${CONTAINER_WORKER_SLEEP}" \
--timeout="${CONTAINER_WORKER_TIMEOUT}" \
--delay="${CONTAINER_WORKER_DELAY}"
--tries="$CONTAINER_WORKER_TRIES" \
--sleep="$CONTAINER_WORKER_SLEEP" \
--timeout="$CONTAINER_WORKER_TIMEOUT" \
--delay="$CONTAINER_WORKER_DELAY"
;;
horizon)
echo "Running horizon..."
exec "${ARTISAN}" horizon
exec ${ARTISAN} horizon
;;
scheduler)
echo "📆 Running scheduled tasks..."
exec "${ARTISAN}" schedule:work --verbose --no-interaction
exec ${ARTISAN} schedule:work --verbose --no-interaction
;;
*)
echo "⛔ Could not match the container mode [${CONTAINER_MODE}]"
echo "⛔ Could not match the container mode [$CONTAINER_MODE]"
exit 1
;;
esac
Expand Down

0 comments on commit 87992df

Please sign in to comment.