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

This commit is contained in:
2026-02-08 16:43:08 +01:00
parent 6719342818
commit 6757a2f18e
9 changed files with 69 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
# syntax=docker/dockerfile:1
FROM git.pi-farm.de/pi-farm/docker-baseimage-alpine:3.23
LABEL description="Alpine Baseimage mit s6-overlay und lighttpd"
LABEL build_version="Pi-Farm version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="Pi-Farm"
RUN apk add --no-cache \
lighttpd \
lighttpd-mod_auth
COPY root/ /
EXPOSE 80
VOLUME ["/config"]
ENTRYPOINT ["/init"]

View File

@@ -1,7 +1,9 @@
services: services:
docker-baseimage-alpine-lighttpd: docker-baseimage-alpine-lighttpd:
image: git.pi-farm.de/pi-farm/docker-baseimage-alpine-lighttpd:1.0 image: git.pi-farm.de/pi-farm/docker-baseimage-alpine-lighttpd:1.4.82
container_name: docker-baseimage-alpine-lighttpd container_name: docker-baseimage-alpine-lighttpd
volume:
- ./config:/config
environment: environment:
- PUID=1000 - PUID=1000
- PGID=1000 - PGID=1000

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

View 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

View File

@@ -0,0 +1 @@
oneshot

View File

@@ -0,0 +1 @@
init-lighttpd-config

View 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

View File

@@ -0,0 +1 @@
longrun