php-fpm: add lighttpd; supervisord

This commit is contained in:
Starbeamrainbowlabs 2023-12-16 13:21:21 +00:00
parent 7dbdc8e98c
commit f51f7d723e
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
5 changed files with 30 additions and 6 deletions

View file

@ -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 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 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 php-sbrl.ini /etc/php/8.3/fpm/conf.d/sbrl.ini
COPY www.conf /etc/php/8.3/fpm/www.conf 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" ] VOLUME [ "/srv" ]
USER 10700:10700 USER 10700:10700
WORKDIR /srv 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" ]

View 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"
))
)

View 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

View file

@ -1,7 +1,9 @@
pid = /run/php-fpm.pid
[www] [www]
user = www-data user = www-data
group = www-data group = www-data
listen = 0.0.0.0:9989 listen = /run/php-fpm.sock
listen.owner = www-data listen.owner = www-data
listen.group = www-data listen.group = www-data
pm = dynamic pm = dynamic