Closed wickedurge closed 7 years ago
Thanks @wickedurge !
We're planning to make this a setting in setup.yml
but for now you can use PHP 7.1 with just a couple of file edits:
provision/wp/Dockerfile
to FROM wordpress:php7.1-fpm
provision/wp/zz-php.ini
to zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so
We're adding this to documentation too while we implement the setting in the setup configuration file.
Hi @wickedurge, further to @tiojoca's instructions and just to clarify: those steps should be taken after cloning the repo and before running ./setup.rb
.
Alternatively, if you'd like to make the swap on the project you've already started to set up, make those changes and then to replace the _wp
container (which contains PHP), run the following commands, replacing <project slug>
as appropriate in the second one:
docker-compose rm --stop wp
docker rmi <project slug>_wp
./setup.rb --reinstall
But as @tiojoca mentioned, we'll shortly implement this as a setup option. Thanks for bringing it to our attention.
Awesome stuff, thanks!
I'm including my steps because it's still not quite working and hopefully someone else will find it useful.
I made the suggested changes to Dockerfile
and zz-php.ini
. No problems there.
It took a little Googling to get the docker commands to work (I'm very new with docker). docker-compose rm --stop
worked fine. But, I ended up using docker rmi <project slug>_wp -f
in order to get it to stop.
I then ran ./setup.rb --reinstall
. Everything looked fine until that last few lines:
WARNING: Image for service wp was built because it did not already exist. To rebuild this image you must use docker-compose build or docker-compose up --build.
fabricaproject_db is up-to-date
Recreating f8d2a2c06c2c_f8d2a2c06c2c_fabricaproject_wp
ERROR: for wp No such image: sha256:ecf5f1399347fcec01d54b257b861029ea195b041bf7cd0dcd24a3942b083e4c
ERROR: Encountered errors while bringing up the project.
[Fabrica] ⚠️ Docker containers provision failed.
Turns out it's a bit trickier than we thought to live-swap the _wp
container on an existing installation, but the following steps should sort it out (NB it'll replace the database).
cd dev
docker-compose down --volumes --rmi local
cd ..
./setup.rb --reinstall
In the meantime we've pushed some changes so that if you set up a new project you'll only have to modify the /provision/wp/Dockerfile
as above between clone and setup (ie. not php.ini
), and we'll shortly add a setup parameter to automate that too.
Thanks!
And we're officially back in business!
Thank you for your help and for making such a cool tool. If you ever need a "WordPress hero" for testing or something, drop me a line.
Glad to hear, thank you @wickedurge !
I'm loving the stack so far, but I'd prefer to use PHP 7.1 instead of 5.6.