Usage & Enterprise Capabilities
Key Benefits
- Unrivaled Flexibility: Change any part of the platform without breaking the core logic.
- Developer Happiness: Built with modern PHP best practices and full testing support.
- Headless Ready: Robust REST and GraphQL APIs for the modern frontend stack.
- Enterprise Grade: Scalable, secure, and ready for high-traffic environments.
- Rich Ecosystem: Hundreds of community-contributed plugins for payments, shipping, and more.
Production Architecture Overview
- PHP-FPM: Running the Sylius application core.
- PostgreSQL / MySQL: The primary relational database for orders and products.
- Redis: Used for caching and session storage in distributed setups.
- Elasticsearch: (Optional but recommended) for high-speed faceted search.
- Nginx: The web server and reverse proxy.
- S3 / MinIO: For persistent storage of product images and assets.
Implementation Blueprint
Implementation Blueprint
Prerequisites
sudo apt update && sudo apt upgrade -y
sudo apt install docker.io docker-compose -y
sudo systemctl enable docker
sudo systemctl start dockerDocker Compose Production Setup
version: '3'
services:
php:
image: sylius/sylius-php:latest
environment:
- APP_ENV=prod
- DATABASE_URL=mysql://sylius:password@db/sylius
volumes:
- sylius_public:/srv/sylius/public
restart: always
nginx:
image: sylius/sylius-nginx:latest
ports:
- "80:80"
depends_on:
- php
volumes:
- sylius_public:/srv/sylius/public
restart: always
db:
image: mysql:8
environment:
- MYSQL_USER=sylius
- MYSQL_PASSWORD=password
- MYSQL_DATABASE=sylius
volumes:
- db_data:/var/lib/mysql
restart: always
volumes:
sylius_public:
db_data:Kubernetes Production Deployment (Recommended)
# Deploy PHP-FPM and Nginx sidecars or as separate services
kubectl create deployment sylius --image=your-custom-sylius-image:latest
kubectl expose deployment sylius --port=80- Zero-Downtime Updates: Use rolling deployments for safe updates and security patches.
- Elastic Scaling: Scale your PHP-FPM workers automatically based on traffic peaks.
- Persistent Storage: Use PVCs to manage your
public/mediafolder across multiple pods.
Scaling Strategy
- Faceted Search: Offload complex product searches to a dedicated Elasticsearch or Algolia instance.
- Database Optimization: Use read-replicas for catalog browsing and ensure heavy indexes are optimized.
- Object Storage: Always move your
/mediafolder to S3 or a compatible provider in production. - Session Clustering: Use Redis for sessions to ensure users stay logged in as they move between web pods.
Backup & Safety
- SQL Backups: Automate nightly database dumps and store them securely offsite.
- Media Backups: Ensure your S3 bucket has versioning and cross-region replication.
- Monitoring: Use a tool like New Relic or Sentry to track performance bottlenecks and errors.
- HTTPS Everywhere: Force SSL/TLS for all traffic via your Nginx or ingress controller.
Recommended Hosting for Sylius
For systems like Sylius, we recommend high-performance VPS hosting. Hostinger offers dedicated setups for open-source tools with one-click installer scripts and 24/7 priority support.
Get Started on HostingerExplore Alternative Tools Infrastructure
Kubernetes
Kubernetes is a production-grade, open-source platform for automating deployment, scaling, and operations of application containers.
Supabase
Supabase is the leading open-source alternative to Firebase. It provides a full backend-as-a-service (BaaS) powered by PostgreSQL, including authentication, real-time subscriptions, and storage.