Initial commit: complete WebsiteBox project
Docker-based self-hosted WordPress deployment system with: - Four-container stack (nginx, wordpress/php-fpm, mariadb, certbot) - Automatic SSL via Let's Encrypt with self-signed fallback - First-boot WordPress setup via WP-CLI (GeneratePress + child theme, plugins) - Interactive setup wizard and one-line install script - Backup, update, healthcheck, and SSL renewal scripts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
41
wordpress/Dockerfile
Normal file
41
wordpress/Dockerfile
Normal file
@@ -0,0 +1,41 @@
|
||||
FROM wordpress:php8.2-fpm-alpine
|
||||
|
||||
# Install dependencies
|
||||
RUN apk add --no-cache \
|
||||
bash \
|
||||
less \
|
||||
mysql-client \
|
||||
fcgi
|
||||
|
||||
# Install WP-CLI
|
||||
RUN curl -o /usr/local/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && \
|
||||
chmod +x /usr/local/bin/wp
|
||||
|
||||
# Install php-fpm-healthcheck
|
||||
RUN curl -o /usr/local/bin/php-fpm-healthcheck \
|
||||
https://raw.githubusercontent.com/renatomefi/php-fpm-healthcheck/master/php-fpm-healthcheck && \
|
||||
chmod +x /usr/local/bin/php-fpm-healthcheck
|
||||
|
||||
# Enable php-fpm status page for healthcheck
|
||||
RUN echo "pm.status_path = /status" >> /usr/local/etc/php-fpm.d/zz-docker.conf
|
||||
|
||||
# Copy PHP upload config
|
||||
COPY uploads.ini /usr/local/etc/php/conf.d/uploads.ini
|
||||
|
||||
# Copy wp-config template
|
||||
COPY wp-config-docker.php /usr/src/wordpress/wp-config-docker.php
|
||||
|
||||
# Copy child theme and mu-plugins
|
||||
COPY wp-content/themes/websitebox/ /usr/src/websitebox-theme/
|
||||
COPY wp-content/mu-plugins/ /usr/src/websitebox-mu-plugins/
|
||||
|
||||
# Copy custom entrypoint
|
||||
COPY entrypoint.sh /usr/local/bin/websitebox-entrypoint.sh
|
||||
RUN chmod +x /usr/local/bin/websitebox-entrypoint.sh
|
||||
|
||||
# Create Wordfence-compatible .user.ini
|
||||
RUN echo "; Wordfence PHP settings" > /usr/src/wordpress/.user.ini && \
|
||||
echo "auto_prepend_file = /var/www/html/wordfence-waf.php" >> /usr/src/wordpress/.user.ini
|
||||
|
||||
ENTRYPOINT ["websitebox-entrypoint.sh"]
|
||||
CMD ["php-fpm"]
|
||||
Reference in New Issue
Block a user