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:
More from our blog
Technical 3 min read 04.12.2024
Here’s everything you had to know about the first major release since 2017! Over 7 years after the first major release, on Nov 12, 2024, we have released Sylius 2.0.0. We had a great opportunity to announce it first at SyliusCon in Lyon, but now, as we are back to… Read More
3 min read 22.11.2024
The emotions start to settle after SyliusCon, and it’s time to reflect on this incredible milestone in our journey. Why a milestone? Because SyliusCon exceeded our expectations in every possible way. We broke attendance records and brought together the key figures of our community, numerous partners, freelancers, and simply all… Read More
Cloud 3 min read 17.06.2024
We are thrilled to announce that we just signed a strategic partnership with Platform.sh, and as a result, we are extending our offer with Sylius Cloud powered by Platform.sh. Platform.sh is a modern Platform-as-a-Service (PaaS) solution that allows businesses to leverage the cloud environment without losing access to the code… Read More
Comments