File tree Expand file tree Collapse file tree 12 files changed +48
-8
lines changed Expand file tree Collapse file tree 12 files changed +48
-8
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ WORKDIR /var/www/html
11
11
ENV DEBIAN_FRONTEND noninteractive
12
12
ENV TZ=UTC
13
13
ENV SUPERVISOR_PHP_COMMAND="/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80"
14
+ ENV SUPERVISOR_PHP_USER="sail"
14
15
15
16
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
16
17
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
+ if [ " $SUPERVISOR_PHP_USER " != " root" ] && [ " $SUPERVISOR_PHP_USER " != " sail" ]; then
4
+ echo " You should set SUPERVISOR_PHP_USER to either 'sail' or 'root'."
5
+ exit 1
6
+ fi
7
+
3
8
if [ ! -z " $WWWUSER " ]; then
4
9
usermod -u $WWWUSER sail
5
10
fi
11
16
chmod -R ugo+rw /.composer
12
17
13
18
if [ $# -gt 0 ]; then
14
- exec gosu $WWWUSER " $@ "
19
+ if [ " $SUPERVISOR_PHP_USER " = " root" ]; then
20
+ exec " $@ "
21
+ else
22
+ exec gosu $WWWUSER " $@ "
23
+ fi
15
24
else
16
25
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
17
26
fi
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ pidfile=/var/run/supervisord.pid
6
6
7
7
[program:php]
8
8
command=%(ENV_SUPERVISOR_PHP_COMMAND)s
9
- user=sail
9
+ user=%(ENV_SUPERVISOR_PHP_USER)s
10
10
environment=LARAVEL_SAIL="1"
11
11
stdout_logfile=/dev/stdout
12
12
stdout_logfile_maxbytes=0
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ WORKDIR /var/www/html
11
11
ENV DEBIAN_FRONTEND noninteractive
12
12
ENV TZ=UTC
13
13
ENV SUPERVISOR_PHP_COMMAND="/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80"
14
+ ENV SUPERVISOR_PHP_USER="sail"
14
15
15
16
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
16
17
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
+ if [ " $SUPERVISOR_PHP_USER " != " root" ] && [ " $SUPERVISOR_PHP_USER " != " sail" ]; then
4
+ echo " You should set SUPERVISOR_PHP_USER to either 'sail' or 'root'."
5
+ exit 1
6
+ fi
7
+
3
8
if [ ! -z " $WWWUSER " ]; then
4
9
usermod -u $WWWUSER sail
5
10
fi
11
16
chmod -R ugo+rw /.composer
12
17
13
18
if [ $# -gt 0 ]; then
14
- exec gosu $WWWUSER " $@ "
19
+ if [ " $SUPERVISOR_PHP_USER " = " root" ]; then
20
+ exec " $@ "
21
+ else
22
+ exec gosu $WWWUSER " $@ "
23
+ fi
15
24
else
16
25
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
17
26
fi
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ pidfile=/var/run/supervisord.pid
6
6
7
7
[program:php]
8
8
command=%(ENV_SUPERVISOR_PHP_COMMAND)s
9
- user=sail
9
+ user=%(ENV_SUPERVISOR_PHP_USER)s
10
10
environment=LARAVEL_SAIL="1"
11
11
stdout_logfile=/dev/stdout
12
12
stdout_logfile_maxbytes=0
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ WORKDIR /var/www/html
11
11
ENV DEBIAN_FRONTEND noninteractive
12
12
ENV TZ=UTC
13
13
ENV SUPERVISOR_PHP_COMMAND="/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80"
14
+ ENV SUPERVISOR_PHP_USER="sail"
14
15
15
16
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
16
17
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
+ if [ " $SUPERVISOR_PHP_USER " != " root" ] && [ " $SUPERVISOR_PHP_USER " != " sail" ]; then
4
+ echo " You should set SUPERVISOR_PHP_USER to either 'sail' or 'root'."
5
+ exit 1
6
+ fi
7
+
3
8
if [ ! -z " $WWWUSER " ]; then
4
9
usermod -u $WWWUSER sail
5
10
fi
11
16
chmod -R ugo+rw /.composer
12
17
13
18
if [ $# -gt 0 ]; then
14
- exec gosu $WWWUSER " $@ "
19
+ if [ " $SUPERVISOR_PHP_USER " = " root" ]; then
20
+ exec " $@ "
21
+ else
22
+ exec gosu $WWWUSER " $@ "
23
+ fi
15
24
else
16
25
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
17
26
fi
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ pidfile=/var/run/supervisord.pid
6
6
7
7
[program:php]
8
8
command=%(ENV_SUPERVISOR_PHP_COMMAND)s
9
- user=sail
9
+ user=%(ENV_SUPERVISOR_PHP_USER)s
10
10
environment=LARAVEL_SAIL="1"
11
11
stdout_logfile=/dev/stdout
12
12
stdout_logfile_maxbytes=0
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ WORKDIR /var/www/html
11
11
ENV DEBIAN_FRONTEND noninteractive
12
12
ENV TZ=UTC
13
13
ENV SUPERVISOR_PHP_COMMAND="/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80"
14
+ ENV SUPERVISOR_PHP_USER="sail"
14
15
15
16
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
16
17
You can’t perform that action at this time.
0 commit comments