Updates
This commit is contained in:
21
nextcloud-aio/Containers/domaincheck/Dockerfile
Normal file
21
nextcloud-aio/Containers/domaincheck/Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
# syntax=docker/dockerfile:latest
|
||||
FROM alpine:3.22.1
|
||||
RUN set -ex; \
|
||||
apk upgrade --no-cache -a; \
|
||||
apk add --no-cache bash lighttpd netcat-openbsd; \
|
||||
adduser -S www-data -G www-data; \
|
||||
rm -rf /etc/lighttpd/lighttpd.conf; \
|
||||
chmod 777 -R /etc/lighttpd; \
|
||||
mkdir -p /var/www/domaincheck; \
|
||||
chown www-data:www-data -R /var/www; \
|
||||
chmod 777 -R /var/www/domaincheck
|
||||
COPY --chown=www-data:www-data lighttpd.conf /lighttpd.conf
|
||||
|
||||
COPY --chmod=775 start.sh /start.sh
|
||||
|
||||
USER www-data
|
||||
ENTRYPOINT ["/start.sh"]
|
||||
|
||||
HEALTHCHECK CMD nc -z 127.0.0.1 $APACHE_PORT || exit 1
|
||||
LABEL com.centurylinklabs.watchtower.enable="false" \
|
||||
org.label-schema.vendor="Nextcloud"
|
||||
20
nextcloud-aio/Containers/domaincheck/lighttpd.conf
Normal file
20
nextcloud-aio/Containers/domaincheck/lighttpd.conf
Normal file
@@ -0,0 +1,20 @@
|
||||
server.document-root = "/var/www/domaincheck/"
|
||||
|
||||
server.port = env.APACHE_PORT
|
||||
|
||||
server.username = "www-data"
|
||||
server.groupname = "www-data"
|
||||
|
||||
mimetype.assign = (
|
||||
".html" => "text/html",
|
||||
".txt" => "text/plain",
|
||||
".jpg" => "image/jpeg",
|
||||
".png" => "image/png"
|
||||
)
|
||||
|
||||
static-file.exclude-extensions = ( ".fcgi", ".php", ".rb", "~", ".inc" )
|
||||
index-file.names = ( "index.html" )
|
||||
|
||||
$SERVER["socket"] == "ipv6-placeholder" {
|
||||
server.document-root = "/var/www/domaincheck/"
|
||||
}
|
||||
23
nextcloud-aio/Containers/domaincheck/start.sh
Normal file
23
nextcloud-aio/Containers/domaincheck/start.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z "$INSTANCE_ID" ]; then
|
||||
echo "You need to provide an instance id."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "$INSTANCE_ID" > /var/www/domaincheck/index.html
|
||||
|
||||
if [ -z "$APACHE_PORT" ]; then
|
||||
export APACHE_PORT="443"
|
||||
fi
|
||||
|
||||
CONF_FILE="$(sed "s|ipv6-placeholder|\[::\]:$APACHE_PORT|" /lighttpd.conf)"
|
||||
echo "$CONF_FILE" > /etc/lighttpd/lighttpd.conf
|
||||
|
||||
# Check config file
|
||||
lighttpd -tt -f /etc/lighttpd/lighttpd.conf
|
||||
|
||||
# Run server
|
||||
lighttpd -D -f /etc/lighttpd/lighttpd.conf
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user