From 71e1c0d9b83d85a8b0b783d78b3724b4f701a73b Mon Sep 17 00:00:00 2001 From: Bram Ceulemans Date: Thu, 28 Dec 2023 12:07:20 +0100 Subject: [PATCH 1/3] Add PHP_COMMAND environment variable to Dockerfile --- runtimes/8.0/Dockerfile | 1 + runtimes/8.1/Dockerfile | 1 + runtimes/8.2/Dockerfile | 1 + runtimes/8.3/Dockerfile | 1 + 4 files changed, 4 insertions(+) diff --git a/runtimes/8.0/Dockerfile b/runtimes/8.0/Dockerfile index d4cd0d36..2a39d966 100644 --- a/runtimes/8.0/Dockerfile +++ b/runtimes/8.0/Dockerfile @@ -10,6 +10,7 @@ WORKDIR /var/www/html ENV DEBIAN_FRONTEND noninteractive ENV TZ=UTC +ENV PHP_COMMAND="/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80" RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone diff --git a/runtimes/8.1/Dockerfile b/runtimes/8.1/Dockerfile index e62b4371..c15bd7eb 100644 --- a/runtimes/8.1/Dockerfile +++ b/runtimes/8.1/Dockerfile @@ -10,6 +10,7 @@ WORKDIR /var/www/html ENV DEBIAN_FRONTEND noninteractive ENV TZ=UTC +ENV PHP_COMMAND="/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80" RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone diff --git a/runtimes/8.2/Dockerfile b/runtimes/8.2/Dockerfile index 414301f1..9190a046 100644 --- a/runtimes/8.2/Dockerfile +++ b/runtimes/8.2/Dockerfile @@ -10,6 +10,7 @@ WORKDIR /var/www/html ENV DEBIAN_FRONTEND noninteractive ENV TZ=UTC +ENV PHP_COMMAND="/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80" RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone diff --git a/runtimes/8.3/Dockerfile b/runtimes/8.3/Dockerfile index 789df190..8b2c133a 100644 --- a/runtimes/8.3/Dockerfile +++ b/runtimes/8.3/Dockerfile @@ -10,6 +10,7 @@ WORKDIR /var/www/html ENV DEBIAN_FRONTEND noninteractive ENV TZ=UTC +ENV PHP_COMMAND="/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80" RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone From 6fb758887db02630947222d82b52f50bd7385aeb Mon Sep 17 00:00:00 2001 From: Bram Ceulemans Date: Thu, 28 Dec 2023 12:08:34 +0100 Subject: [PATCH 2/3] Add environment variable substitution in supervisord.conf --- runtimes/8.0/supervisord.conf | 2 +- runtimes/8.1/supervisord.conf | 2 +- runtimes/8.2/supervisord.conf | 2 +- runtimes/8.3/supervisord.conf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/runtimes/8.0/supervisord.conf b/runtimes/8.0/supervisord.conf index 9d284795..26ccc0a5 100644 --- a/runtimes/8.0/supervisord.conf +++ b/runtimes/8.0/supervisord.conf @@ -5,7 +5,7 @@ logfile=/var/log/supervisor/supervisord.log pidfile=/var/run/supervisord.pid [program:php] -command=/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80 +command=%(ENV_SUPERVISOR_PHP_COMMAND)s user=sail environment=LARAVEL_SAIL="1" stdout_logfile=/dev/stdout diff --git a/runtimes/8.1/supervisord.conf b/runtimes/8.1/supervisord.conf index 9d284795..26ccc0a5 100644 --- a/runtimes/8.1/supervisord.conf +++ b/runtimes/8.1/supervisord.conf @@ -5,7 +5,7 @@ logfile=/var/log/supervisor/supervisord.log pidfile=/var/run/supervisord.pid [program:php] -command=/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80 +command=%(ENV_SUPERVISOR_PHP_COMMAND)s user=sail environment=LARAVEL_SAIL="1" stdout_logfile=/dev/stdout diff --git a/runtimes/8.2/supervisord.conf b/runtimes/8.2/supervisord.conf index 9d284795..26ccc0a5 100644 --- a/runtimes/8.2/supervisord.conf +++ b/runtimes/8.2/supervisord.conf @@ -5,7 +5,7 @@ logfile=/var/log/supervisor/supervisord.log pidfile=/var/run/supervisord.pid [program:php] -command=/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80 +command=%(ENV_SUPERVISOR_PHP_COMMAND)s user=sail environment=LARAVEL_SAIL="1" stdout_logfile=/dev/stdout diff --git a/runtimes/8.3/supervisord.conf b/runtimes/8.3/supervisord.conf index 9d284795..26ccc0a5 100644 --- a/runtimes/8.3/supervisord.conf +++ b/runtimes/8.3/supervisord.conf @@ -5,7 +5,7 @@ logfile=/var/log/supervisor/supervisord.log pidfile=/var/run/supervisord.pid [program:php] -command=/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80 +command=%(ENV_SUPERVISOR_PHP_COMMAND)s user=sail environment=LARAVEL_SAIL="1" stdout_logfile=/dev/stdout From d5a572c5d32f7341c35482ebbe959ac24c340d6f Mon Sep 17 00:00:00 2001 From: Bram Ceulemans Date: Thu, 28 Dec 2023 18:07:27 +0100 Subject: [PATCH 3/3] Fix variable name --- runtimes/8.0/Dockerfile | 2 +- runtimes/8.1/Dockerfile | 2 +- runtimes/8.2/Dockerfile | 2 +- runtimes/8.3/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/runtimes/8.0/Dockerfile b/runtimes/8.0/Dockerfile index 2a39d966..a6dabe6b 100644 --- a/runtimes/8.0/Dockerfile +++ b/runtimes/8.0/Dockerfile @@ -10,7 +10,7 @@ WORKDIR /var/www/html ENV DEBIAN_FRONTEND noninteractive ENV TZ=UTC -ENV PHP_COMMAND="/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80" +ENV SUPERVISOR_PHP_COMMAND="/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80" RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone diff --git a/runtimes/8.1/Dockerfile b/runtimes/8.1/Dockerfile index c15bd7eb..746f3ecb 100644 --- a/runtimes/8.1/Dockerfile +++ b/runtimes/8.1/Dockerfile @@ -10,7 +10,7 @@ WORKDIR /var/www/html ENV DEBIAN_FRONTEND noninteractive ENV TZ=UTC -ENV PHP_COMMAND="/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80" +ENV SUPERVISOR_PHP_COMMAND="/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80" RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone diff --git a/runtimes/8.2/Dockerfile b/runtimes/8.2/Dockerfile index 9190a046..3de361ef 100644 --- a/runtimes/8.2/Dockerfile +++ b/runtimes/8.2/Dockerfile @@ -10,7 +10,7 @@ WORKDIR /var/www/html ENV DEBIAN_FRONTEND noninteractive ENV TZ=UTC -ENV PHP_COMMAND="/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80" +ENV SUPERVISOR_PHP_COMMAND="/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80" RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone diff --git a/runtimes/8.3/Dockerfile b/runtimes/8.3/Dockerfile index 8b2c133a..a4fa8890 100644 --- a/runtimes/8.3/Dockerfile +++ b/runtimes/8.3/Dockerfile @@ -10,7 +10,7 @@ WORKDIR /var/www/html ENV DEBIAN_FRONTEND noninteractive ENV TZ=UTC -ENV PHP_COMMAND="/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80" +ENV SUPERVISOR_PHP_COMMAND="/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80" RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone