Docker volumes: cached vs delegated

Docker is amazing tool and can make developer work simpler, faster and more efficient. It has a lot of advantages and I have been using it very actively for some time. Unfortunately, I use it on Mac, and it has some big drawbacks. From my perspective, the biggest is performance. Docker for Mac and Docker of Windows uses small virtual machine in the middle, between your host and your containers. It’s ok and necessary, but always causes some performance degradation, especially on networking and any I/O operations. This post is about volumes cachings methods – we can use them to speed up Docker in any platform and should be used, if we can do this.

Continue reading “Docker volumes: cached vs delegated”

Create development environment on MacOS using Homebrew

I prefer MacOS to develop, because it’s much more stable than Windows 10 – last issues with October update are the best evidence, that something is not ok with this OS development. It’s similar to Linux in many ways, but not exactly Linux like Debian, Ubuntu, RHEL etc. In effect, we can’t just use build-in repositories to install some required software, services and servers. But there is very nice option called Homebrew. Using this, we can make MacOS even closer to Linux system and configuration will be simpler.

Continue reading “Create development environment on MacOS using Homebrew”

Dump and restore all MySQL databases with users

Last time I must reinstall my MacOS and configure all my development environment again. It wasn’t a big issues except MySQL database and users, becase there are a lot of databases, each with different credentials. I had to move all the data, because test app needs it. The question was: how can I dump not only databases using mysqldump, but also all users and all privileges? Fortunately, solution is very simple and mysqldump allows us to get all in only one command, so there is quick tip to dump all data:

mysqldump -uroot -p --flush-privileges --routines --all-databases > backup.sql

And then we can restore whole data on new server using standard mysql command:

mysql -uroot -p < backup.sql

Why you should use Cloudflare

Yes, I know, this blog post title looks like ad. But it isn’t ad, because I use only Cloudflare free version and don’t have any contact with this company (excluding support for services). I decided to write this post, because I’ve used Cloudflare for many years and I’m very happy – please treat this like small review, and also maybe “tutorial”, how you can make your websites faster, provide better security and remove spam. Installation is very easy and you can also use free SSL – it can be great alternative to Let’s Encrypt. Let’s see, what Cloudflare offers.

Continue reading “Why you should use Cloudflare”

PHP-FPM – ondemand spawner mode

In the old, polish version of this blog, there are several posts about nginx server and PHP configuration. These entries are outdated now, but I will be writing them again in english soon. Meanwhile, today I would like to briefly share information on the ondemand mode in PHP-FPM. I have to used it and think it’s the best solution for most configurations.

Continue reading “PHP-FPM – ondemand spawner mode”