php-fpm: add lighttpd; supervisord
This commit is contained in:
parent
7dbdc8e98c
commit
f51f7d723e
5 changed files with 30 additions and 6 deletions
|
@ -16,13 +16,16 @@ COPY --from=builder /usr/share/keyrings/deb.sury.org-php.gpg /usr/share/keyrings
|
|||
COPY --from=builder /etc/apt/sources.list.d/php.list /etc/apt/sources.list.d/php.list
|
||||
|
||||
|
||||
RUN apt-get update && install_packages php8.3-fpm php8.3-mbstring php8.3-imagick php8.3-zip php8.3-intl php8.3-sqlite3 && apt-get clean
|
||||
COPY php-sbrl.ini /etc/php/8.3/fpm/conf.d/sbrl.ini
|
||||
COPY www.conf /etc/php/8.3/fpm/www.conf
|
||||
RUN apt-get update && install_packages php8.3-fpm php8.3-mbstring php8.3-imagick php8.3-zip php8.3-intl php8.3-sqlite3 supervisor lighttpd && apt-get clean && mkdir -p /app
|
||||
|
||||
COPY supervisord.conf /app/supervisord.conf
|
||||
COPY php-sbrl.ini /app/sbrl.ini
|
||||
COPY www.conf /app/www.conf
|
||||
COPY lighttpd.conf /app/lighttpd.conf
|
||||
|
||||
VOLUME [ "/srv" ]
|
||||
|
||||
USER 10700:10700
|
||||
|
||||
WORKDIR /srv
|
||||
ENTRYPOINT [ "/usr/sbin/php-fpm8.3", "--nodaemonize", "--fpm-config", "/etc/php/8.3/fpm/php-fpm.conf" ]
|
||||
ENTRYPOINT [ "/usr/bin/supervisord", "-c", "/app/supervisord.conf" ]
|
||||
|
|
11
images/php-fpm/lighttpd.conf
Normal file
11
images/php-fpm/lighttpd.conf
Normal file
|
@ -0,0 +1,11 @@
|
|||
server.document-root = "/srv"
|
||||
server.port = 3000
|
||||
index-file.names = ( "index.html" )
|
||||
|
||||
static-file.exclude-extensions = ( ".php" )
|
||||
fastcgi.server = ( ".php" =>
|
||||
((
|
||||
"socket" => "/run/php-fpm.sock",
|
||||
"broken-scriptfilename" => "enable"
|
||||
))
|
||||
)
|
8
images/php-fpm/supervisord.conf
Normal file
8
images/php-fpm/supervisord.conf
Normal file
|
@ -0,0 +1,8 @@
|
|||
[supervisord]
|
||||
nodaemon=true
|
||||
|
||||
[program:phpfpm]
|
||||
command=/usr/sbin/php-fpm8.3 --nodaemonize --fpm-config /app/www.conf
|
||||
|
||||
[program:lighttpd]
|
||||
command=/usr/sbin/lighttpd -D -f /app/lighttpd.conf
|
|
@ -1,7 +1,9 @@
|
|||
pid = /run/php-fpm.pid
|
||||
|
||||
[www]
|
||||
user = www-data
|
||||
group = www-data
|
||||
listen = 0.0.0.0:9989
|
||||
listen = /run/php-fpm.sock
|
||||
listen.owner = www-data
|
||||
listen.group = www-data
|
||||
pm = dynamic
|
||||
|
|
Loading…
Reference in a new issue