Skip to content

Commit

Permalink
[1.x] Allow easy customization of the command ran by supervisor's PHP…
Browse files Browse the repository at this point in the history
… process (#645)

* Add PHP_COMMAND environment variable to Dockerfile

* Add environment variable substitution in supervisord.conf

* Fix variable name
  • Loading branch information
bram-pkg authored Dec 29, 2023
1 parent 15ec4be commit 9fa62a7
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions runtimes/8.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ WORKDIR /var/www/html

ENV DEBIAN_FRONTEND noninteractive
ENV TZ=UTC
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

Expand Down
2 changes: 1 addition & 1 deletion runtimes/8.0/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions runtimes/8.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ WORKDIR /var/www/html

ENV DEBIAN_FRONTEND noninteractive
ENV TZ=UTC
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

Expand Down
2 changes: 1 addition & 1 deletion runtimes/8.1/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions runtimes/8.2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ WORKDIR /var/www/html

ENV DEBIAN_FRONTEND noninteractive
ENV TZ=UTC
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

Expand Down
2 changes: 1 addition & 1 deletion runtimes/8.2/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions runtimes/8.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ WORKDIR /var/www/html

ENV DEBIAN_FRONTEND noninteractive
ENV TZ=UTC
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

Expand Down
2 changes: 1 addition & 1 deletion runtimes/8.3/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9fa62a7

Please sign in to comment.