diff --git a/Dockerfile b/Dockerfile index fe26535..25b0670 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/docker/index.html b/docker/index.html new file mode 100644 index 0000000..1abef7a --- /dev/null +++ b/docker/index.html @@ -0,0 +1,22 @@ + + + + + + ShareX Uploader + + + + + +

ShareX Uploader

+

Created by ImFascinated

+
+ Source + Gitea + GitHub +
+ + diff --git a/docker/start.sh b/docker/start.sh index f96a68d..0479e93 100644 --- a/docker/start.sh +++ b/docker/start.sh @@ -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