summaryrefslogtreecommitdiffhomepage
path: root/entrypoint.sh
diff options
context:
space:
mode:
Diffstat (limited to 'entrypoint.sh')
-rw-r--r--entrypoint.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/entrypoint.sh b/entrypoint.sh
new file mode 100644
index 0000000..03d3b63
--- /dev/null
+++ b/entrypoint.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+set -e
+
+# Path where WordPress should live
+WP_PATH="/var/www/html"
+
+# Check if directory is empty
+if [ -z "$(ls -A $WP_PATH)" ]; then
+ echo "WordPress directory empty, downloading 6.8.2 WordPress..."
+ curl -O https://wordpress.org/wordpress-6.8.2.zip
+ tar -xzf latest.tar.gz --strip-components=1
+ rm latest.tar.gz
+ chown -R www-data:www-data $WP_PATH
+ echo "WordPress downloaded successfully."
+else
+ echo "WordPress already exists, skipping download."
+fi
+
+# Execute the container's main command (php-fpm)
+exec "$@"