Sylius CE Installation with Docker
Last updated
Was this helpful?
Last updated
Was this helpful?
Docker is an open-source platform for developing, delivering, and running applications. It allows you to separate your application from your infrastructure, simplifying software delivery. With Docker, you can manage infrastructure the same way you manage applications. This platform methodology enables fast code delivery, testing, and implementation, significantly reducing the delay between writing code and running it in the production environment.
Clone the Sylius-Standard repository, or if you are using GitHub, you can use the 'Use this template' button to create a new repository with Sylius-Standard content.
comes with the configuration. You can start the development environment via the make init
command in your favourite terminal. Please note that the speed of building images and initialising containers depends on your local machine and internet connection - it may take some time. Then enter localhost
in your browser or execute open http://localhost/
in your terminal.
If you encounter errors while running make init
, such as services failing to start or exiting unexpectedly, it might be caused by port conflicts with services already running on your host system.
NGINX
80
- "80:80"
MySQL
3306
- "3306:3306"
Mailhog
8025
- "8025:8025"
If a process is already using the port, you have two options:
Stop the conflicting service (e.g. shut down local Apache or MySQL).
To check services that are using current ports just run the command:
Change the default port mappings in compose.override.yml
:
Remember that if you change your nginx port you will need to correct also the address:
Besides the initial make init
command, the Makefile
includes several other useful shortcuts for managing your Docker environment:
make run
Starts the Docker containers (alias for make up
).
make debug
Starts containers using compose.debug.yml
, allowing you to add custom debug tooling or configuration.
make up
Starts all containers in the background using the default Docker configuration.
make down
Stops and removes all containers.
make clean
Stops containers and removes all volumes. This resets your environment.
make install
Runs the Sylius installer in non-interactive mode.
make php-shell
Opens a shell in the PHP container. Useful for running CLI commands like bin/console
.
make node-shell
Opens a shell in a fresh Node.js container. Good for running JS-related tools like npm install
.
make node-watch
Runs npm run watch
inside the Node.js container for automatic frontend asset rebuilding.
make docker-compose-check
Verifies that Docker Compose is available and prints the current version.