yoast / plugin-development-docker Goto Github PK
View Code? Open in Web Editor NEWA docker configuration for WordPress plugin development
A docker configuration for WordPress plugin development
First time installing the Docker environment on a mac.
After running ./make.sh
the new entries are correctly added to the hosts file.
However, I already had other entries in my hosts file. Several entries πmostly the Vagrant ones for WordPress development and other ones added by Local by Flywheel that I use to test old WordPress versions.
In a few words. it appears the new entries are added without inserting a new line before them, ending up in something like this:
... lots of stuff here ...
192.168.95.100 www.wordpress30.local #Local Site
## Local by Flywheel - End ##127.0.0.1 basic.wordpress.test
127.0.0.1 woocommerce.wordpress.test
127.0.0.1 multisite.wordpress.test
127.0.0.1 basic-database.wordpress.test
127.0.0.1 woocommerce-database.wordpress.test
127.0.0.1 multisite-database.wordpress.test
Where the entry for basic.wordpress.test
is added on a pre-existing commented line thus it's actually commented.
The result for me was that running ./start.sh
hanged on:
Waiting for basic-wordpress to boot... Checking http://basic.wordpress.test
Console output:
start-sh-console-output.txt
Manually fixing the hosts file fixed the issue,
When make.sh
is not run before start.sh
is ran, it looks like Apache or Docker will create a folder named php.ini/
in the config/
folder. So there is no php.ini
for the server and xdebug will not work (along with the other configurations). Running make.sh
while this folder exists will only copy php.ini.default
to the php.ini/
directory.
I think we should check if make.sh
is ran somewhere in start.sh
to make sure everything is set up properly. Or we should move all make.sh
functionality to start.sh
. At the moment make.sh
doesn't contain too difficult functionalities to move to the start.
Workaround: remove the config/php.ini/
directory (with contents) and run make.sh
again.
When you overwrite the BASIC_HOST
in the config/config.sh
it does not work from the start.
It gets stuck in the Waiting for basic-wordpress to boot...
loop.
(Part of) the problem might be that the database of WP holds the siteurl
and home
(in wp_options
) that still is the default value.
Please check and fix:
I had basic-wordpress
and multisite-wordpress
running.
I tried running: ./wp.sh basic-wordpress yoast index
It results in: Error: No such container: wp
According to the documentation this should work, right?
I then tried the command that it should work out looking at the script: docker exec -ti --user www-data basic-wordpress wp yoast index
That worked fine.
The env does not seem to get correctly installed when using the wordpress:5.8.3-php8.1-apache
image. This will need fixing if we want to develop on / for PHP 8.1.
This only happens when installing a new environment, as it fails to create the database. If you first use a 8.0 image to create the environment and up the PHP version after that, it will work.
With 10.000 files in my wp-content/plugins directory, Docker slowed down to a crawl. Removing these (empty, non extension) files sped up the site significantly.
My guess is that the node_modules and other folders with a lot of files in the plugin repos might cause this slowness as well. If we can exclude them from mounting in the Docker container, maybe we can speed things up.
There are some cases we should check before running start.sh.
Users can have a working directory in the documents folder of their mac. Some shells allow for case-insensitive working directories, where /Users/name/Documents
is the same as /Users/name/documents
. However when comparing the docker label (which is absolute) with the shell script that uses pwd
there can be a mismatch in case sensitivity. This can cause the script to not see any running containers and fail, for example, installing plugins. At least, that is my conclusion.
pwd -P
would normally rectify this, but it seems that calling this from a subshell (script) does not work, and the directory path stays lowercase.
I am looking for a way to get the absolute path from a subshell, or else we should resort to lowercasing every output before comparing.
I have not been able to get Xdebug development aids to work in our docker environment. I tried different PHP configurations but a var_dump()
does never change to a xdebug version and error messages stay a simple text dump.
Started up my Woocommerce setup after a month in hibernation and ran into http 500 when trying to browse the site - getting error logs of wp() being undefined.
Tried running a fresh setup by removing my current containers and running:
./clean.sh &&
./make.sh &&
./start.sh woocommerce-wordpress
The install looks fine but it fails to start. Sorry if this is an obvious mistake on my end, not that familiar with docker.
It ends up running status-checks for http://woocommerce.wordpress.test indefinitely.
If the containers are newly created and installed (after a clean and make), there is a chance that a few things have failed to run. WordPress is sometimes not correctly installed and databases sometimes don't boot correctly. Powering down the containers and running start.sh
generally fixes this.
The domain is hardcoded in multisite-wordpress-seed.sh
and that needs to change to a custom value is one is set in config.sh
.
Problem
In some cases it's necessary to compare changes side-by-side between two versions of the plugin. The current setup does not allow for this as every configured site uses the same, shared plugins directory.
Solution
Add an additional environment (i.e. other.wordpress.test
or something similar) which is its own, standalone site with its own plugins directory.
User case:
In order to easily debug the Schema output on the front end, I had to manually add define( 'WPSEO_DEBUG', true );
to the config/basic-wordpress-config.php
.
Of course this gave me a modified file and it's just a temporary workaround as I then need to revert the change each time.
I guess there are other cases where we'd want to have WPSEO_DEBUG'
on. After all, the Docker sites are a development environment where debugging is a constant need.
Not sure if any drawbacks.
In start.sh
we perform chown -R www-data:www-data /var/www;
This is a rather aggressive chown that is prone to errors / long waiting times. If this takes too long and we cancel the process (ctrl + c) it may be that /var/www/.wp-cli/
has not been chowned and this prevents installation of the faker plugin to generate dummy content.
I suspect that plugins / github repo's in the plugins directory may cause this problem. Especially the Yoast SEO which has a large sum of files that need to be chowned, which may take too long.
Two possible options to resolve:
The latter option is the quickest, as we already know that at least the /ver/www/.wp-cli/
folder needs this chown.
While executing tests on my plugins I need to constantly reset the database to clean up tables and test functionalities.
After running clean.sh
, make.sh
and then start.sh
there are no posts. The whole database seed is not happening.
This is most likely due to: Error: Composer directory '/.wp-cli/packages' for packages couldn't be created: mkdir(): Permission denied
.
β plugin-development-docker git:(master) β ./start.sh
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory
sed: ./containers/wordpress/Dockerfile: No such file or directory
sed: ./containers/wordpress/Dockerfile: No such file or directory
Starting containers:
- basic-wordpress
Ensuring all containers are built.
Building basic-wordpress ...
Building basic-wordpress ... error
ERROR: for basic-wordpress Cannot locate specified Dockerfile: Dockerfile
ERROR: Cannot locate specified Dockerfile: Dockerfile
Booting containers.
Creating network "plugin-development-docker_default" with the default driver
Creating volume "plugin-development-docker_basic-database-data" with default driver
Creating volume "plugin-development-docker_woocommerce-database-data" with default driver
Creating volume "plugin-development-docker_multisite-database-data" with default driver
Creating volume "plugin-development-docker_standalone-database-data" with default driver
Creating wordpress-basic-database ... done
Creating nginx-router-wordpress ... done
Creating basic-wordpress ... done
Waiting for databases to boot.
Connection to localhost port 1987 [tcp/tr-rsrb-p1] succeeded!
Checking if WordPress is installed in basic-wordpress...
Installing WordPress for basic-wordpress...
Warning: Package name mismatch...Updating from git name 'Yoast/wp-cli-faker' to composer.json name 'yoast/wp-cli-faker'.
Installing package yoast/wp-cli-faker (dev-master)
Error: Composer directory '/.wp-cli/packages' for packages couldn't be created: mkdir(): Permission denied
sh: 1: /usr/sbin/sendmail: not found
Success: WordPress installed successfully.
chown in start.sh was changed from /var/www/
to /var/www/.wp-cli
to speed up the starting process. But this has impications for Linux systems which can get into file permission issues this way.
When starting the development docker instance it seems the procedure is hanging at the point that installs WP. After doing CTRL-C twice the starting continues. However it seems that the faker addon isn't installed resulting in and empty default install.
This is the output:
./start.sh
./start.sh: line 2: ./config/config.sh: No such file or directory
Starting containers:
- basic-wordpress
Ensuring all containers are built
Creating network "plugin-development-docker_default" with the default driver
Creating volume "plugin-development-docker_basic-database-data" with default driver
Creating volume "plugin-development-docker_woocommerce-database-data" with default driver
Creating volume "plugin-development-docker_multisite-database-data" with default driver
Creating nginx-router-wordpress ... done
Creating wordpress-basic-database ... done
Creating basic-wordpress ... done
Booting containers
Starting nginx-router-wordpress ... done
Starting wordpress-basic-database ... done
Starting basic-wordpress ... done
Waiting for databases to boot...
found 0 associations
found 1 connections:
1: flags=82<CONNECTED,PREFERRED>
outif lo0
src ::1 port 54081
dst ::1 port 1987
rank info not available
TCP aux info available
Connection to localhost port 1987 [tcp/tr-rsrb-p1] succeeded!
Checking if basic-wordpress is installed!
Installing WordPress for basic-wordpress
^Cgroupmod: GID '20' already exists
basic-wordpress
^CWarning: Package name mismatch...Updating from git name 'Yoast/wp-cli-faker' to composer.json name 'yoast/wp-cli-faker'.
Installing package yoast/wp-cli-faker (dev-master)
Error: Composer directory '/var/www/.wp-cli/packages' for packages couldn't be created: mkdir(): Permission denied
sh: 1: -t: not found
Success: WordPress installed successfully.
Success: Rewrite structure set.
Success: Rewrite rules flushed.
Warning: Regenerating a .htaccess file requires special configuration. See usage docs.
Success: Rewrite rules flushed.
Warning: debug-bar: Plugin already installed.
Activating 'debug-bar'...
Plugin 'debug-bar' activated.
Success: Plugin already installed.
Warning: query-monitor: Plugin already installed.
Activating 'query-monitor'...
Plugin 'query-monitor' activated.
Success: Plugin already installed.
Error: 'faker' is not a registered wp command. See 'wp help' for available commands.
Waiting for containers to boot...
Starting http://basic.wordpress.test
Containers have booted! Happy developing!
Outputting logs now:
Attaching to basic-wordpress, wordpress-basic-database, nginx-router-wordpress
wordpress-basic-database | 2020-04-21 09:23:25+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.29-1debian9 started.
wordpress-basic-database | 2020-04-21 09:23:26+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
wordpress-basic-database | 2020-04-21 09:23:26+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.29-1debian9 started.
wordpress-basic-database | 2020-04-21 09:23:26+00:00 [Note] [Entrypoint]: Initializing database files
wordpress-basic-database | 2020-04-21T09:23:26.250864Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
wordpress-basic-database | 2020-04-21T09:23:26.758054Z 0 [Warning] InnoDB: New log files created, LSN=45790
wordpress-basic-database | 2020-04-21T09:23:26.809840Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
wordpress-basic-database | 2020-04-21T09:23:26.870101Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: c198fe79-83b1-11ea-ada8-0242ac1a0002.
wordpress-basic-database | 2020-04-21T09:23:26.873259Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
wordpress-basic-database | 2020-04-21T09:23:28.051393Z 0 [Warning] CA certificate ca.pem is self signed.
wordpress-basic-database | 2020-04-21T09:23:28.128244Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
wordpress-basic-database | 2020-04-21 09:23:30+00:00 [Note] [Entrypoint]: Database files initialized
wordpress-basic-database | 2020-04-21 09:23:30+00:00 [Note] [Entrypoint]: Starting temporary server
wordpress-basic-database | 2020-04-21 09:23:30+00:00 [Note] [Entrypoint]: Waiting for server startup
wordpress-basic-database | 2020-04-21T09:23:30.913146Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
wordpress-basic-database | 2020-04-21T09:23:30.915075Z 0 [Note] mysqld (mysqld 5.7.29) starting as process 80 ...
wordpress-basic-database | 2020-04-21T09:23:30.919762Z 0 [Note] InnoDB: PUNCH HOLE support available
wordpress-basic-database | 2020-04-21T09:23:30.919966Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
wordpress-basic-database | 2020-04-21T09:23:30.920120Z 0 [Note] InnoDB: Uses event mutexes
wordpress-basic-database | 2020-04-21T09:23:30.920296Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
wordpress-basic-database | 2020-04-21T09:23:30.920394Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
wordpress-basic-database | 2020-04-21T09:23:30.920491Z 0 [Note] InnoDB: Using Linux native AIO
wordpress-basic-database | 2020-04-21T09:23:30.920910Z 0 [Note] InnoDB: Number of pools: 1
wordpress-basic-database | 2020-04-21T09:23:30.921163Z 0 [Note] InnoDB: Using CPU crc32 instructions
wordpress-basic-database | 2020-04-21T09:23:30.923114Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
wordpress-basic-database | 2020-04-21T09:23:30.935567Z 0 [Note] InnoDB: Completed initialization of buffer pool
wordpress-basic-database | 2020-04-21T09:23:30.938382Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
wordpress-basic-database | 2020-04-21T09:23:30.950301Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
wordpress-basic-database | 2020-04-21T09:23:30.959966Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
wordpress-basic-database | 2020-04-21T09:23:30.960260Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
wordpress-basic-database | 2020-04-21T09:23:30.984092Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
wordpress-basic-database | 2020-04-21T09:23:30.985005Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
wordpress-basic-database | 2020-04-21T09:23:30.985182Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
wordpress-basic-database | 2020-04-21T09:23:30.985607Z 0 [Note] InnoDB: Waiting for purge to start
wordpress-basic-database | 2020-04-21T09:23:31.036024Z 0 [Note] InnoDB: 5.7.29 started; log sequence number 2629923
wordpress-basic-database | 2020-04-21T09:23:31.036481Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
wordpress-basic-database | 2020-04-21T09:23:31.036946Z 0 [Note] Plugin 'FEDERATED' is disabled.
wordpress-basic-database | 2020-04-21T09:23:31.038330Z 0 [Note] InnoDB: Buffer pool(s) load completed at 200421 9:23:31
wordpress-basic-database | 2020-04-21T09:23:31.042330Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
wordpress-basic-database | 2020-04-21T09:23:31.042512Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
wordpress-basic-database | 2020-04-21T09:23:31.043181Z 0 [Warning] CA certificate ca.pem is self signed.
wordpress-basic-database | 2020-04-21T09:23:31.043404Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
wordpress-basic-database | 2020-04-21T09:23:31.045022Z 0 [Warning] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
wordpress-basic-database | 2020-04-21T09:23:31.053210Z 0 [Note] Event Scheduler: Loaded 0 events
wordpress-basic-database | 2020-04-21T09:23:31.053514Z 0 [Note] mysqld: ready for connections.
wordpress-basic-database | Version: '5.7.29' socket: '/var/run/mysqld/mysqld.sock' port: 0 MySQL Community Server (GPL)
wordpress-basic-database | 2020-04-21 09:23:31+00:00 [Note] [Entrypoint]: Temporary server started.
wordpress-basic-database | Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
wordpress-basic-database | Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
wordpress-basic-database | Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
wordpress-basic-database | Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
wordpress-basic-database | 2020-04-21 09:23:34+00:00 [Note] [Entrypoint]: Creating database wordpress
wordpress-basic-database | 2020-04-21 09:23:34+00:00 [Note] [Entrypoint]: Creating user wordpress
wordpress-basic-database | 2020-04-21 09:23:34+00:00 [Note] [Entrypoint]: Giving user wordpress access to schema wordpress
wordpress-basic-database |
wordpress-basic-database | 2020-04-21 09:23:34+00:00 [Note] [Entrypoint]: Stopping temporary server
wordpress-basic-database | 2020-04-21T09:23:34.463048Z 0 [Note] Giving 0 client threads a chance to die gracefully
wordpress-basic-database | 2020-04-21T09:23:34.463197Z 0 [Note] Shutting down slave threads
wordpress-basic-database | 2020-04-21T09:23:34.463221Z 0 [Note] Forcefully disconnecting 0 remaining clients
wordpress-basic-database | 2020-04-21T09:23:34.463242Z 0 [Note] Event Scheduler: Purging the queue. 0 events
wordpress-basic-database | 2020-04-21T09:23:34.463550Z 0 [Note] Binlog end
wordpress-basic-database | 2020-04-21T09:23:34.464478Z 0 [Note] Shutting down plugin 'ngram'
wordpress-basic-database | 2020-04-21T09:23:34.464743Z 0 [Note] Shutting down plugin 'partition'
wordpress-basic-database | 2020-04-21T09:23:34.464825Z 0 [Note] Shutting down plugin 'BLACKHOLE'
wordpress-basic-database | 2020-04-21T09:23:34.464848Z 0 [Note] Shutting down plugin 'ARCHIVE'
wordpress-basic-database | 2020-04-21T09:23:34.464859Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
wordpress-basic-database | 2020-04-21T09:23:34.464940Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
wordpress-basic-database | 2020-04-21T09:23:34.465103Z 0 [Note] Shutting down plugin 'MyISAM'
wordpress-basic-database | 2020-04-21T09:23:34.465209Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
wordpress-basic-database | 2020-04-21T09:23:34.465260Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
wordpress-basic-database | 2020-04-21T09:23:34.465277Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
wordpress-basic-database | 2020-04-21T09:23:34.465308Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
wordpress-basic-database | 2020-04-21T09:23:34.465520Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
wordpress-basic-database | 2020-04-21T09:23:34.465652Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
wordpress-basic-database | 2020-04-21T09:23:34.465746Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
wordpress-basic-database | 2020-04-21T09:23:34.465764Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
wordpress-basic-database | 2020-04-21T09:23:34.465971Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
wordpress-basic-database | 2020-04-21T09:23:34.466074Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
wordpress-basic-database | 2020-04-21T09:23:34.466185Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
wordpress-basic-database | 2020-04-21T09:23:34.466321Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
wordpress-basic-database | 2020-04-21T09:23:34.466336Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
wordpress-basic-database | 2020-04-21T09:23:34.466347Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
wordpress-basic-database | 2020-04-21T09:23:34.466438Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
wordpress-basic-database | 2020-04-21T09:23:34.466523Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
wordpress-basic-database | 2020-04-21T09:23:34.466727Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
wordpress-basic-database | 2020-04-21T09:23:34.466887Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
wordpress-basic-database | 2020-04-21T09:23:34.466941Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
wordpress-basic-database | 2020-04-21T09:23:34.467124Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
wordpress-basic-database | 2020-04-21T09:23:34.467175Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
wordpress-basic-database | 2020-04-21T09:23:34.467190Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
wordpress-basic-database | 2020-04-21T09:23:34.467200Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
basic-wordpress | WordPress not found in /var/www/html - copying now...
basic-wordpress | WARNING: /var/www/html is not empty! (copying anyhow)
basic-wordpress | Complete! WordPress has been successfully copied to /var/www/html
basic-wordpress | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.26.0.4. Set the 'ServerName' directive globally to suppress this message
basic-wordpress | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.26.0.4. Set the 'ServerName' directive globally to suppress this message
basic-wordpress | [Tue Apr 21 09:23:36.783743 2020] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.3.14 configured -- resuming normal operations
basic-wordpress | [Tue Apr 21 09:23:36.783858 2020] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
basic-wordpress | [Tue Apr 21 09:25:53.871227 2020] [mpm_prefork:notice] [pid 1] AH00170: caught SIGWINCH, shutting down gracefully
basic-wordpress | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.26.0.4. Set the 'ServerName' directive globally to suppress this message
basic-wordpress | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.26.0.4. Set the 'ServerName' directive globally to suppress this message
basic-wordpress | [Tue Apr 21 09:25:55.794198 2020] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.3.14 configured -- resuming normal operations
basic-wordpress | [Tue Apr 21 09:25:55.794276 2020] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
basic-wordpress | 127.0.0.1 - - [21/Apr/2020:09:26:08 +0000] "GET /2020/04/21/hello-world/ HTTP/1.1" 200 8766 "http://basic.wordpress.test/2020/04/21/hello-world/" "WordPress/5.3.2; http://basic.wordpress.test"
basic-wordpress | 127.0.0.1 - - [21/Apr/2020:09:26:10 +0000] "POST /wp-cron.php?doing_wp_cron=1587461170.0629949569702148437500 HTTP/1.1" 200 192 "http://basic.wordpress.test/wp-cron.php?doing_wp_cron=1587461170.0629949569702148437500" "WordPress/5.3.2; http://basic.wordpress.test"
basic-wordpress | 172.26.0.3 - - [21/Apr/2020:09:26:22 +0000] "HEAD / HTTP/1.1" 200 245 "-" "curl/7.54.0"
basic-wordpress | 172.26.0.3 - - [21/Apr/2020:09:26:23 +0000] "GET / HTTP/1.1" 200 7276 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36"
nginx-router-wordpress | WARNING: /etc/nginx/dhparam/dhparam.pem was not found. A pre-generated dhparam.pem will be used for now while a new one
nginx-router-wordpress | is being generated in the background. Once the new dhparam.pem is in place, nginx will be reloaded.
nginx-router-wordpress | forego | starting dockergen.1 on port 5000
nginx-router-wordpress | forego | starting nginx.1 on port 5100
nginx-router-wordpress | dockergen.1 | 2020/04/21 09:23:26 Generated '/etc/nginx/conf.d/default.conf' from 3 containers
nginx-router-wordpress | dockergen.1 | 2020/04/21 09:23:26 Running 'nginx -s reload'
nginx-router-wordpress | dockergen.1 | 2020/04/21 09:23:27 Watching docker events
nginx-router-wordpress | dockergen.1 | 2020/04/21 09:23:27 Contents of /etc/nginx/conf.d/default.conf did not change. Skipping notification 'nginx -s reload'
nginx-router-wordpress | 2020/04/21 09:23:29 [notice] 51#51: signal process started
nginx-router-wordpress | Generating DH parameters, 2048 bit long safe prime, generator 2
nginx-router-wordpress | This is going to take a long time
nginx-router-wordpress | dhparam generation complete, reloading nginx
nginx-router-wordpress | nginx.1 | 127.0.0.1 172.26.0.1 - - [21/Apr/2020:09:23:30 +0000] "HEAD / HTTP/1.1" 503 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) DockerDesktop/2.2.0 Chrome/78.0.3904.94 Electron/7.1.0 Safari/537.36"
nginx-router-wordpress | nginx.1 | 127.0.0.1 172.26.0.1 - - [21/Apr/2020:09:23:30 +0000] "HEAD / HTTP/1.1" 503 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) DockerDesktop/2.2.0 Chrome/78.0.3904.94 Electron/7.1.0 Safari/537.36"
nginx-router-wordpress | nginx.1 | 127.0.0.1 172.26.0.1 - - [21/Apr/2020:09:23:30 +0000] "HEAD / HTTP/1.1" 503 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) DockerDesktop/2.2.0 Chrome/78.0.3904.94 Electron/7.1.0 Safari/537.36"
nginx-router-wordpress | nginx.1 | 127.0.0.1 172.26.0.1 - - [21/Apr/2020:09:24:26 +0000] "HEAD / HTTP/1.1" 503 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) DockerDesktop/2.2.0 Chrome/78.0.3904.94 Electron/7.1.0 Safari/537.36"
nginx-router-wordpress | dockergen.1 | 2020/04/21 09:25:54 Received event die for container b3f7c54a987d
nginx-router-wordpress | dockergen.1 | 2020/04/21 09:25:55 Received event stop for container b3f7c54a987d
nginx-router-wordpress | dockergen.1 | 2020/04/21 09:25:55 Generated '/etc/nginx/conf.d/default.conf' from 2 containers
nginx-router-wordpress | dockergen.1 | 2020/04/21 09:25:55 Running 'nginx -s reload'
nginx-router-wordpress | dockergen.1 | 2020/04/21 09:25:55 Received event start for container b3f7c54a987d
nginx-router-wordpress | dockergen.1 | 2020/04/21 09:25:55 Generated '/etc/nginx/conf.d/default.conf' from 3 containers
nginx-router-wordpress | dockergen.1 | 2020/04/21 09:25:55 Running 'nginx -s reload'
nginx-router-wordpress | dockergen.1 | 2020/04/21 09:25:55 Contents of /etc/nginx/conf.d/default.conf did not change. Skipping notification 'nginx -s reload'
nginx-router-wordpress | nginx.1 | basic.wordpress.test 172.26.0.1 - - [21/Apr/2020:09:26:23 +0000] "HEAD / HTTP/1.1" 200 0 "-" "curl/7.54.0"
nginx-router-wordpress | nginx.1 | 127.0.0.1 172.26.0.1 - - [21/Apr/2020:09:26:23 +0000] "HEAD / HTTP/1.1" 503 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) DockerDesktop/2.2.0 Chrome/78.0.3904.94 Electron/7.1.0 Safari/537.36"
nginx-router-wordpress | nginx.1 | 127.0.0.1 172.26.0.1 - - [21/Apr/2020:09:26:23 +0000] "HEAD / HTTP/1.1" 503 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) DockerDesktop/2.2.0 Chrome/78.0.3904.94 Electron/7.1.0 Safari/537.36"
nginx-router-wordpress | nginx.1 | 127.0.0.1 172.26.0.1 - - [21/Apr/2020:09:26:23 +0000] "HEAD / HTTP/1.1" 503 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) DockerDesktop/2.2.0 Chrome/78.0.3904.94 Electron/7.1.0 Safari/537.36"
nginx-router-wordpress | nginx.1 | basic.wordpress.test 172.26.0.1 - - [21/Apr/2020:09:26:23 +0000] "GET / HTTP/1.1" 200 6962 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36"
wordpress-basic-database | 2020-04-21T09:23:34.467227Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
wordpress-basic-database | 2020-04-21T09:23:34.467328Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
wordpress-basic-database | 2020-04-21T09:23:34.467538Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
wordpress-basic-database | 2020-04-21T09:23:34.467589Z 0 [Note] Shutting down plugin 'INNODB_CMP'
wordpress-basic-database | 2020-04-21T09:23:34.467605Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
wordpress-basic-database | 2020-04-21T09:23:34.467776Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
wordpress-basic-database | 2020-04-21T09:23:34.467947Z 0 [Note] Shutting down plugin 'INNODB_TRX'
wordpress-basic-database | 2020-04-21T09:23:34.468032Z 0 [Note] Shutting down plugin 'InnoDB'
wordpress-basic-database | 2020-04-21T09:23:34.468141Z 0 [Note] InnoDB: FTS optimize thread exiting.
wordpress-basic-database | 2020-04-21T09:23:34.468555Z 0 [Note] InnoDB: Starting shutdown...
wordpress-basic-database | 2020-04-21T09:23:34.569030Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
wordpress-basic-database | 2020-04-21T09:23:34.569777Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 200421 9:23:34
wordpress-basic-database | 2020-04-21T09:23:35.879805Z 0 [Note] InnoDB: Shutdown completed; log sequence number 12441796
wordpress-basic-database | 2020-04-21T09:23:35.882835Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
wordpress-basic-database | 2020-04-21T09:23:35.882981Z 0 [Note] Shutting down plugin 'MEMORY'
wordpress-basic-database | 2020-04-21T09:23:35.883032Z 0 [Note] Shutting down plugin 'CSV'
wordpress-basic-database | 2020-04-21T09:23:35.883049Z 0 [Note] Shutting down plugin 'sha256_password'
wordpress-basic-database | 2020-04-21T09:23:35.883167Z 0 [Note] Shutting down plugin 'mysql_native_password'
wordpress-basic-database | 2020-04-21T09:23:35.883332Z 0 [Note] Shutting down plugin 'binlog'
wordpress-basic-database | 2020-04-21T09:23:35.886457Z 0 [Note] mysqld: Shutdown complete
wordpress-basic-database |
wordpress-basic-database | 2020-04-21 09:23:36+00:00 [Note] [Entrypoint]: Temporary server stopped
wordpress-basic-database |
wordpress-basic-database | 2020-04-21 09:23:36+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.
wordpress-basic-database |
wordpress-basic-database | 2020-04-21T09:23:36.682544Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
wordpress-basic-database | 2020-04-21T09:23:36.684203Z 0 [Note] mysqld (mysqld 5.7.29) starting as process 1 ...
wordpress-basic-database | 2020-04-21T09:23:36.688182Z 0 [Note] InnoDB: PUNCH HOLE support available
wordpress-basic-database | 2020-04-21T09:23:36.688236Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
wordpress-basic-database | 2020-04-21T09:23:36.688242Z 0 [Note] InnoDB: Uses event mutexes
wordpress-basic-database | 2020-04-21T09:23:36.688245Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
wordpress-basic-database | 2020-04-21T09:23:36.688248Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
wordpress-basic-database | 2020-04-21T09:23:36.688251Z 0 [Note] InnoDB: Using Linux native AIO
wordpress-basic-database | 2020-04-21T09:23:36.688612Z 0 [Note] InnoDB: Number of pools: 1
wordpress-basic-database | 2020-04-21T09:23:36.688839Z 0 [Note] InnoDB: Using CPU crc32 instructions
wordpress-basic-database | 2020-04-21T09:23:36.690607Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
wordpress-basic-database | 2020-04-21T09:23:36.701871Z 0 [Note] InnoDB: Completed initialization of buffer pool
wordpress-basic-database | 2020-04-21T09:23:36.704234Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
wordpress-basic-database | 2020-04-21T09:23:36.716417Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
wordpress-basic-database | 2020-04-21T09:23:36.725182Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
wordpress-basic-database | 2020-04-21T09:23:36.725276Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
wordpress-basic-database | 2020-04-21T09:23:36.756229Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
wordpress-basic-database | 2020-04-21T09:23:36.757224Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
wordpress-basic-database | 2020-04-21T09:23:36.757264Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
wordpress-basic-database | 2020-04-21T09:23:36.757941Z 0 [Note] InnoDB: Waiting for purge to start
wordpress-basic-database | 2020-04-21T09:23:36.809743Z 0 [Note] InnoDB: 5.7.29 started; log sequence number 12441796
wordpress-basic-database | 2020-04-21T09:23:36.810392Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
wordpress-basic-database | 2020-04-21T09:23:36.811236Z 0 [Note] Plugin 'FEDERATED' is disabled.
wordpress-basic-database | 2020-04-21T09:23:36.815592Z 0 [Note] InnoDB: Buffer pool(s) load completed at 200421 9:23:36
wordpress-basic-database | 2020-04-21T09:23:36.817870Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
wordpress-basic-database | 2020-04-21T09:23:36.817906Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
wordpress-basic-database | 2020-04-21T09:23:36.818525Z 0 [Warning] CA certificate ca.pem is self signed.
wordpress-basic-database | 2020-04-21T09:23:36.818587Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
wordpress-basic-database | 2020-04-21T09:23:36.819076Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
wordpress-basic-database | 2020-04-21T09:23:36.819157Z 0 [Note] IPv6 is available.
wordpress-basic-database | 2020-04-21T09:23:36.819170Z 0 [Note] - '::' resolves to '::';
wordpress-basic-database | 2020-04-21T09:23:36.819184Z 0 [Note] Server socket created on IP: '::'.
wordpress-basic-database | 2020-04-21T09:23:36.822458Z 0 [Warning] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
wordpress-basic-database | 2020-04-21T09:23:36.829872Z 0 [Note] Event Scheduler: Loaded 0 events
wordpress-basic-database | 2020-04-21T09:23:36.830263Z 0 [Note] mysqld: ready for connections.
wordpress-basic-database | Version: '5.7.29' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server (GPL)
wordpress-basic-database | 2020-04-21T09:23:46.447502Z 3 [Note] Got packets out of order
wordpress-basic-database | 2020-04-21T09:23:46.447511Z 5 [Note] Got packets out of order
wordpress-basic-database | 2020-04-21T09:23:46.447694Z 4 [Note] Got packets out of order
wordpress-basic-database | 2020-04-21T09:23:54.423179Z 7 [Note] Got packets out of order
wordpress-basic-database | 2020-04-21T09:23:54.423490Z 6 [Note] Got packets out of order
wordpress-basic-database | 2020-04-21T09:23:54.423792Z 8 [Note] Got packets out of order
wordpress-basic-database | 2020-04-21T09:23:58.894875Z 10 [Note] Got packets out of order
wordpress-basic-database | 2020-04-21T09:23:58.894875Z 9 [Note] Got packets out of order
wordpress-basic-database | 2020-04-21T09:23:58.895236Z 11 [Note] Got packets out of order
wordpress-basic-database | 2020-04-21T09:24:25.747759Z 12 [Note] Got packets out of order
wordpress-basic-database | 2020-04-21T09:24:26.189628Z 13 [Note] Got packets out of order
wordpress-basic-database | 2020-04-21T09:24:26.787353Z 14 [Note] Got packets out of order
wordpress-basic-database | 2020-04-21T09:24:27.230062Z 15 [Note] Got packets out of order
wordpress-basic-database | 2020-04-21T09:24:27.791988Z 16 [Note] Got packets out of order
wordpress-basic-database | 2020-04-21T09:24:28.234159Z 17 [Note] Got packets out of order
wordpress-basic-database | 2020-04-21T09:24:28.796498Z 18 [Note] Got packets out of order
wordpress-basic-database | 2020-04-21T09:24:29.239328Z 19 [Note] Got packets out of order
wordpress-basic-database | 2020-04-21T09:24:29.802620Z 20 [Note] Got packets out of order
wordpress-basic-database | 2020-04-21T09:24:30.244502Z 21 [Note] Got packets out of order
wordpress-basic-database | 2020-04-21T09:24:30.806869Z 22 [Note] Got packets out of order
wordpress-basic-database | 2020-04-21T09:24:31.249688Z 23 [Note] Got packets out of order
Until now I only ran the default ./start.sh
on this laptop.
Today I ran ./start.sh woocommerce-wordpress
and while installing it showed a lot of output.
For example:
[22-Oct-2020 11:27:42 UTC] PHP Notice: register_rest_route was called <strong>incorrectly</strong>. The REST API route definition for <code>wc/v3/brands</code> is missing the required <code>permission_callback</code> argument. For REST API routes that are intended to be public, use <code>__return_true</code> as the permission callback. Please see <a href="https://wordpress.org/support/article/debugging-in-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 5.5.0.) in /var/www/html/wp-includes/functions.php on line 5225
[22-Oct-2020 11:27:42 UTC] PHP Stack trace:
[22-Oct-2020 11:27:42 UTC] PHP 1. {main}() /usr/local/bin/wp:0
[22-Oct-2020 11:27:42 UTC] PHP 2. include() /usr/local/bin/wp:4
[22-Oct-2020 11:27:42 UTC] PHP 3. include() phar:///usr/local/bin/wp/php/boot-phar.php:11
[22-Oct-2020 11:27:42 UTC] PHP 4. WP_CLI\bootstrap() phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php:27
[22-Oct-2020 11:27:42 UTC] PHP 5. WP_CLI\Bootstrap\LaunchRunner->process() phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php:74
[22-Oct-2020 11:27:42 UTC] PHP 6. WP_CLI\Runner->start() phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php:23
[22-Oct-2020 11:27:42 UTC] PHP 7. WP_CLI\Runner->load_wordpress() phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php:1158
[22-Oct-2020 11:27:42 UTC] PHP 8. WP_CLI::do_hook() phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php:1263
[22-Oct-2020 11:27:42 UTC] PHP 9. WC_CLI_Runner::after_wp_load() phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/class-wp-cli.php:304
[22-Oct-2020 11:27:42 UTC] PHP 10. do_action() /var/www/html/wp-content/plugins/woocommerce/includes/cli/class-wc-cli-runner.php:59
[22-Oct-2020 11:27:42 UTC] PHP 11. WP_Hook->do_action() /var/www/html/wp-includes/plugin.php:478
[22-Oct-2020 11:27:42 UTC] PHP 12. WP_Hook->apply_filters() /var/www/html/wp-includes/class-wp-hook.php:311
[22-Oct-2020 11:27:42 UTC] PHP 13. Perfect_Woocommerce_Brands\PWB_API_Support->register_endpoints() /var/www/html/wp-includes/class-wp-hook.php:287
[22-Oct-2020 11:27:42 UTC] PHP 14. register_rest_route() /var/www/html/wp-content/plugins/perfect-woocommerce-brands/classes/class-pwb-api-support.php:38
[22-Oct-2020 11:27:42 UTC] PHP 15. _doing_it_wrong() /var/www/html/wp-includes/rest-api.php:103
[22-Oct-2020 11:27:42 UTC] PHP 16. trigger_error() /var/www/html/wp-includes/functions.php:5225
Since I have my history capped I'm not sure what it was doing to cause these, but after those it continued with attachment generation
, product category generation
, etc. (no more spam).
Good to note that it seems to install fine. It just obscures any potential information on the actual installation process.
It would be nice to have the Composer and Yarn come with the build itself. I know that it's not something that everyone would want but I typically try to do everything through Docker containers and I don't have Composer and Yarn installed locally on my machine. So, the build fails when I run ./plugins.sh
as expected since I don't have either of them locally installed.
plugin-development-docker/plugins.sh
Line 48 in 385e537
plugin-development-docker/plugins.sh
Line 52 in 385e537
So, it would be really handy to have the Composer and Yarn in the build itself. When there's no local Composer and Yarn installed, it will use the Docker containers instead.
initial run of start.sh breaks when setting folder permissions:
https://github.com/Yoast/plugin-development-docker/blob/master/containers/wordpress/Dockerfile.template#L10
the usermod command tries to set permissions to user 0 instead of current user
maybe relevant:
in my case, the owner of the wordpress folder was set to root, not current user.
workaround:
once the start script has run, the docker template generates a docker file; type echo $UID
in the terminal and replace the 0 value in the dockerfile with the actual user id.
I suggest making a ./plugins.sh
script which installs and updates these plugins - this should use ./wp.sh
Sourcing a file in which you can locally present which plugins you also want to have installed/updated automatically.
Just having a command to install the plugins + mention in the readme.
I don't think we want to have to wait for WP-CLI to finish installing/checking on every ./start.sh
run.
When Docker installs WordPress in start.sh
, you don't always end up with the latest version of WordPress. Today, I got 5.3.2 whereas 5.4 is the latest. According to @herregroen, this could be because Docker does a lot of caching. Potentially a docker pull
should be added.
By default the WordPress installs in our docker use wp_
. I'd like to change that to a randomized string of 5 a-z chars, followed by an _
, where it's different in each new docker install. This way people can't hardcode wp_
in queries and get it to work :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.