Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions templates/compose/wordpress-with-openlitespeed-mariadb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# documentation: https://wordpress.org
# slogan: WordPress is open source software you can use to create a beautiful website, blog, or app.
# category: cms
# tags: cms, blog, content, management, mariadb, openlitespeed
# logo: svgs/wordpress.svg

services:
wordpress:
image: litespeedtech/openlitespeed:latest
volumes:
- wordpress-files:/var/www/vhosts/localhost/html
environment:
- SERVICE_URL_WORDPRESS
- WORDPRESS_DB_HOST=mariadb
- WORDPRESS_DB_USER=$SERVICE_USER_WORDPRESS
- WORDPRESS_DB_PASSWORD=$SERVICE_PASSWORD_WORDPRESS
- WORDPRESS_DB_NAME=wordpress
depends_on:
- mariadb
entrypoint: ["/bin/sh", "-c"]
command: |
set -e
DOCROOT="/var/www/vhosts/localhost/html"
if [ ! -f "$${DOCROOT}/wp-config.php" ]; then
mkdir -p "$${DOCROOT}"
curl -sL https://wordpress.org/latest.tar.gz | tar -xz -C /tmp
cp -R /tmp/wordpress/. "$${DOCROOT}"
Comment on lines +26 to +27
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The container downloads and unpacks WordPress at runtime from https://wordpress.org/latest.tar.gz. This adds an external availability dependency to every fresh deployment and makes installs non-reproducible as “latest” changes over time. Consider using a prebuilt image that already contains WordPress (or pinning to a specific WordPress version and validating the download, e.g., checksum/signature) to improve reliability.

Copilot uses AI. Check for mistakes.
rm -rf /tmp/wordpress
wp config create --path="$${DOCROOT}" --dbname="$${WORDPRESS_DB_NAME}" --dbuser="$${WORDPRESS_DB_USER}" --dbpass="$${WORDPRESS_DB_PASSWORD}" --dbhost="$${WORDPRESS_DB_HOST}" --skip-check --allow-root
chown -R 1000:1000 "$${DOCROOT}"
Comment on lines +24 to +30
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bootstrap logic only creates wp-config.php (via wp config create) but does not perform a WordPress core install. Unless the image has additional automation, this typically means the user will still see the WordPress web installer on first visit, which conflicts with the PR description (“No setup wizard is shown”). Consider adding an idempotent wp core install step (and exposing admin user/email/password inputs), or adjust the PR description/expectations accordingly.

Copilot uses AI. Check for mistakes.
fi
exec /entrypoint.sh
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1"]
interval: 2s
timeout: 10s
retries: 10
mariadb:
image: mariadb:11
volumes:
- mariadb-data:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=$SERVICE_PASSWORD_ROOT
- MYSQL_DATABASE=wordpress
- MYSQL_USER=$SERVICE_USER_WORDPRESS
- MYSQL_PASSWORD=$SERVICE_PASSWORD_WORDPRESS
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 5s
timeout: 20s
retries: 10
Loading