Skip to content

Instantly share code, notes, and snippets.

@richardblondet
Last active January 28, 2019 17:49
Show Gist options
  • Save richardblondet/b90aabc23ab6dbee916f9da112f3d4e7 to your computer and use it in GitHub Desktop.
Save richardblondet/b90aabc23ab6dbee916f9da112f3d4e7 to your computer and use it in GitHub Desktop.
Wordpress Docker Contairnerization
# Local development file size upload
php_value upload_max_filesize 5000M
php_value post_max_size 2400M
php_value memory_limit 600M
php_value max_execution_time 600
php_value max_input_time 300
# Disabling anoying warnings
# php_flag display_startup_errors off
# php_flag display_errors off
# php_flag html_errors off
# php_flag log_errors on
# php_flag ignore_repeated_errors off
# php_flag ignore_repeated_source off
# php_flag report_memleaks on
# php_flag track_errors on
# php_value docref_root 0
# php_value docref_ext 0
# php_value error_log /home/path/public_html/domain/PHP_errors.log
# php_value error_reporting -1
# php_value log_errors_max_len 0
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
version: '3'
services:
wordpress:
image: wordpress:latest
ports:
- "80:80"
depends_on:
- wp-db
volumes:
- ./wordpress:/var/www/html
- ./config/php.conf.ini:/usr/local/etc/php/conf.d/conf.ini
environment:
WORDPRESS_DB_HOST: wp-db
WORDPRESS_DB_NAME: wordpress
WORDPRESS_DB_USER: root
WORDPRESS_DB_PASSWORD: wordpress
wp-db:
image: mysql:5.7
ports:
- "3306:3306"
command: [
'--default_authentication_plugin=mysql_native_password',
'--character-set-server=utf8mb4',
'--collation-server=utf8mb4_unicode_ci'
]
environment:
- MYSQL_ROOT_PASSWORD=wordpress
- MYSQL_DATABASE=wordpress
volumes:
- ./wp-db:/var/lib/mysql:cached
- ./wp-db:/docker-entrypoint-initdb.d
file_uploads = On
memory_limit = 5000M
upload_max_filesize = 2500M
post_max_size = 256M
max_execution_time = 600
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment