Skip to content

Commit

Permalink
using lighttpd
Browse files Browse the repository at this point in the history
  • Loading branch information
rgaudin committed Jan 4, 2024
1 parent 53f40ab commit 34783ef
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 18 deletions.
20 changes: 9 additions & 11 deletions magoe/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
FROM alpine:3.18
FROM alpine:3.19
LABEL org.opencontainers.image.source https://github.com/offspot/container-images

COPY httpd-foreground entrypoint /usr/local/bin/
COPY entrypoint /usr/local/bin/

RUN apk add --no-cache \
dumb-init \
php81-apache2 \
php81-curl php81-gd php81-pdo_sqlite php81-session php81-sqlite3 php81-mbstring \
&& mkdir -p /var/www/magoe \
&& printf "\n\
ServerName magoe;\n\
ErrorLog /dev/stderr\n\
CustomLog /dev/stdout combined\n\
\n" >> /etc/apache2/conf.d/default.conf
lighttpd \
php82-cgi \
php82-curl php82-gd php82-pdo_sqlite php82-session php82-sqlite3 php82-mbstring \
&& mkdir -p /var/www/magoe

COPY lighttpd.conf /etc/lighttpd/lighttpd.conf

VOLUME /var/www/magoe
EXPOSE 80
STOPSIGNAL SIGWINCH
ENV MAGOE_URL http://localhost

ENTRYPOINT ["/usr/bin/dumb-init", "--", "/usr/local/bin/entrypoint"]
CMD ["httpd-foreground"]
CMD ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"]
7 changes: 0 additions & 7 deletions magoe/httpd-foreground

This file was deleted.

15 changes: 15 additions & 0 deletions magoe/lighttpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
server.port = 80
server.document-root = "/var/www/magoe"
server.errorlog = "/dev/fd/2"

server.modules += ("mod_accesslog")
server.modules += ("mod_deflate")
accesslog.filename = "/dev/fd/2"

server.modules += ( "mod_fastcgi" )
fastcgi.server = ( ".php" => ((
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/tmp/php.socket"
)))

index-file.names = ( "index.html", "index.php" )

0 comments on commit 34783ef

Please sign in to comment.