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
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
Technical 3 min read 11.06.2024
Abstract 1.12 released in Q4 2022 1.13 on Apr 23rd, 2024 (a year later than we anticipated while releasing 1.12) 3859 commits 23 contributors A stabilized Sylius API powered by API Platform It’s been a long and bumpy road. Having it behind our backs was a highway that led Sylius… Read More
Business Ecosystem News 3 min read 06.06.2024
Welcome to the May summary! As an open-source eCommerce framework, Sylius continues to evolve with significant contributions from our vibrant community and valuable product updates. Apart from describing the technical changes, we will also quickly summarize the Sylius Technical Fundamentals & Sylius Polish Community Meetup and eCommerce Day Kaunas, as… Read More
Comments