3 min. read
Categories: Ecosystem News Technical
When a swan meets the whale – Sylius Docker history and future
Zbigniew, Senior PHP Developer, shares our plans to dockerize not only the Sylius Platform, but also the Sylius Community and Sylius Development Team.

Hi Swans! I’m Zbigniew, and I joined Sylius in March this year. I took the responsibility to dockerize not only the Sylius Platform but also the Sylius Community and Sylius Development Team. I would like to share the long and short-term plan that will affect current docker-related files in Sylius. These changes may be radical but we will provide a much better experience from scratch, and most importantly, you will be able to support me through this journey.

Sylius Standard

Personal Goal: Let’s make Docker inside Sylius-Standard work out of the box.

The most annoying part of Sylius-Standard for me, as a newcomer, was that the template project contained Docker that did not work. I wanted to test Sylius locally, but I couldn’t do it!

And so, I spent a lot of time fixing and improving the current Docker solution in small incremental changes. I can proudly say that it is DONE. Both docker-compose.yml and docker-compose.prod.yml configs are working out of the box.

Wanna try it out?

You can see the docker-related pull requests here. What’s left to do is to create testing pipelines to ensure each change preserves the accountability of the Sylius Dockerized environment. For now, we only test if the image builds successfully on linux/amd64 and linux/arm64 architectures. With that, we are sure our Apple Silicone users’ experience is fine.

Sylius Docker Standard

With the fixed Sylius-Standard Docker, I can finally make cleanups. I would like to take care of the old docker repositories. The following repositories will be archived soon:

The reason for that is lack of documentation, contributors, and overall plan.

I created a new place that’s called Sylius-Docker-Standard. Additionally, Sylius will be used internally, which is great because we will eat our dog’s food. If you encounter problems during deployment, they will literally affect Sylius as well..

Sylius-Docker-Standard will be simpler because we will change its target to beginner-friendly. What I’ve noticed is that most of the Sylius Community Experts use their own variations of docker for Sylius or have even created their particular solutions. That’s so cool! ❤️ We could even link them as examples for more advanced members.

Our images are available via Docker Hub Registry.

Roadmap

The most significant difference between now and then is a plan for how and what to do with Sylius and Docker.

For starters, let me tell you about two types of images. First is the headless image for everyone that uses Sylius via API only. The second one is the traditional image with both front and back end. Currently, there is an all-in-one Ubuntu-based image. It is simple and based on a Linux distribution that most developers are familiar with. It has one big disadvantage though – size. Ubuntu Linux adds almost 27 MB to the image size, whereas Alpine Linux – only 3 MB. That’s why the next step is to create an Alpine-based image.

Sylius Docker Standard Roadmap

Sylius Docker Enterprise

There are many ways to deploy Sylius, but let’s be honest – you probably want to SCALE! You can do it either vertically or horizontally. A vertical scale is cool, but you have to do it manually, so downtime may occur. The best practice is to scale horizontally via Kubernetes Cluster or Docker Swarm. Feel free to ask us for assistance!

Experiments

Have you heard about the Roadrunner project? Well, we’re going to test its performance against the classic php-fpm and nginx combo. Besides that, Roadrunner is written in golang; it does not require a reverse proxy like Nginx. Therefore, it minimizes the number of containers to just one.

I hope that with PHP 8.1 and fibers, PHP Community is going to get closer to its process manager without the required reverse proxy.

Share:
Zbigniew Malcherczyk
The Dockerizer, Backend Engineer, Holacracy Enthusiast. In his free time, assembles LEGO sets, rides on roller blades, paints minifigures, and sailing.
More from our blog
Business News Technical 3 min read 28.09.2020
Get ready for global sales & operations with the most advanced payment solution from the famous fintech giant, now available in Sylius out of the box. Read More
Business News 3 min read 14.09.2020
We proudly present to you the latest version of the Sylius eCommerce Platform – 1.8, which comes with a brand new, unified API powered by API Platform, Loyalty points system for Sylius Plus, and as you can probably see, a brand new sylius.com website! Numbers This new release is a… Read More
Business Ecosystem News 3 min read 13.08.2020
Read why the French market leader trusted Sylius in a strategic re-platforming process to get a competitive eCommerce advantage. Read More
Comments