add root-folder and files, Dockerfile and docker-compose.yml
All checks were successful
Docker Build Smart Logic / Build amd64 & arm64 (push) Successful in 13s
All checks were successful
Docker Build Smart Logic / Build amd64 & arm64 (push) Successful in 13s
This commit is contained in:
22
root/defaults/lighttpd.conf
Normal file
22
root/defaults/lighttpd.conf
Normal file
@@ -0,0 +1,22 @@
|
||||
server.document-root = "/app/www"
|
||||
|
||||
server.port = 80
|
||||
|
||||
server.username = "abc"
|
||||
server.groupname = "users"
|
||||
|
||||
# Mime Types laden (wichtig für CSS/JS)
|
||||
include "/etc/lighttpd/mime-types.conf"
|
||||
|
||||
# Module laden
|
||||
server.modules += ( "mod_access", "mod_accesslog" )
|
||||
|
||||
# Index Dateien
|
||||
index-file.names = ( "index.html" )
|
||||
|
||||
# Logging nach stdout/stderr für Docker
|
||||
server.errorlog = "/dev/stderr"
|
||||
accesslog.filename = "/dev/stdout"
|
||||
|
||||
# Verhindert, dass Lighttpd im Hintergrund läuft (wichtig für s6)
|
||||
server.event-handler = "linux-sysepoll"
|
||||
19
root/etc/s6-overlay/s6-rc.d/init-lighttpd-config/run
Executable file
19
root/etc/s6-overlay/s6-rc.d/init-lighttpd-config/run
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/command/with-contenv bash
|
||||
|
||||
# Standard-Verzeichnisse erstellen
|
||||
mkdir -p /config /app/www
|
||||
|
||||
# Config kopieren, falls nicht vorhanden
|
||||
if [ ! -f /config/lighttpd.conf ]; then
|
||||
echo "Keine Konfiguration gefunden, kopiere Standard..."
|
||||
cp /defaults/lighttpd.conf /config/lighttpd.conf
|
||||
fi
|
||||
|
||||
# Dummy Index-Datei erstellen, falls leer
|
||||
if [ ! -f /app/www/index.html ]; then
|
||||
echo "<h1>Es funktioniert!</h1><p>Lighttpd auf Alpine.</p>" > /app/www/index.html
|
||||
fi
|
||||
|
||||
# Berechtigungen korrigieren (für User abc)
|
||||
chown -R abc:users /config
|
||||
chown -R abc:users /app/www
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-lighttpd-config/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-lighttpd-config/type
Normal file
@@ -0,0 +1 @@
|
||||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/svc-lighttpd/dependencies
Normal file
1
root/etc/s6-overlay/s6-rc.d/svc-lighttpd/dependencies
Normal file
@@ -0,0 +1 @@
|
||||
init-lighttpd-config
|
||||
3
root/etc/s6-overlay/s6-rc.d/svc-lighttpd/run
Executable file
3
root/etc/s6-overlay/s6-rc.d/svc-lighttpd/run
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/command/with-contenv bash
|
||||
# Startet lighttpd im Vordergrund (-D) mit der Config aus dem Volume
|
||||
exec lighttpd -D -f /config/lighttpd.conf
|
||||
1
root/etc/s6-overlay/s6-rc.d/svc-lighttpd/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/svc-lighttpd/type
Normal file
@@ -0,0 +1 @@
|
||||
longrun
|
||||
Reference in New Issue
Block a user