add default index.html
All checks were successful
Publish Docker Image / docker (push) Successful in 1m7s

This commit is contained in:
Lee 2024-02-25 17:37:58 +00:00
parent 006ac97c68
commit 93f49e9326
3 changed files with 32 additions and 0 deletions

View File

@ -23,6 +23,7 @@ COPY ./docker/nginx.conf /etc/nginx/nginx.conf
# Setup scripts
COPY ./upload.php /tmp/upload.php
COPY ./docker/start.sh /start.sh
COPY ./docker/index.html /tmp/index.html
# Copy public directory
COPY ./public /tmp/public
@ -35,6 +36,7 @@ COPY --from=builder /usr/local/nginx /usr/local/nginx
COPY --from=builder /usr/local/sbin/nginx /usr/local/sbin/nginx
COPY --from=builder /etc/nginx /etc/nginx
COPY --from=builder /tmp/upload.php /tmp/upload.php
COPY --from=builder /tmp/index.html /tmp/index.html
COPY --from=builder /start.sh /start.sh
COPY --from=builder /tmp/public /tmp/public

22
docker/index.html Normal file
View File

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ShareX Uploader</title>
<!-- TailwindCSS -->
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body
class="h-screen bg-neutral-900 text-white flex flex-col text-center items-center p-4 gap-2"
>
<p class="text-blue-400 text-4xl">ShareX Uploader</p>
<p class="text-gray-400 text-xl">Created by ImFascinated</p>
<div>
<a href="https://s.fascinated.cc/s/sharex-uploader">Source</a>
<a href="https://s.fascinated.cc/s/gitea">Gitea</a>
<a href="https://s.fascinated.cc/s/github">GitHub</a>
</div>
</body>
</html>

View File

@ -14,6 +14,14 @@ else
echo "Upload script was not found, copying it."
fi
echo "Checking if default index.html exists in /var/www/html"
if [ -f "/var/www/html/index.html" ]; then
echo "Upload script was found, ignoring copy."
else
cp /tmp/index.html /var/www/html
echo "Default index.html was not found, copying it."
fi
# Letting php know that we are running in docker
echo "env[DOCKER] = true" >> /etc/php81/php-fpm.d/www.conf
echo "clear_env = no" >> /etc/php81/php-fpm.d/www.conf