Last active
January 28, 2019 17:49
-
-
Save richardblondet/b90aabc23ab6dbee916f9da112f3d4e7 to your computer and use it in GitHub Desktop.
Wordpress Docker Contairnerization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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