Skip to content
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.

Sylius/Docker

Repository files navigation

Sylius Docker Environment

🚨This project has been abandoned 🚨

Since Sylius-Standard v1.3.0 we are supporting Docker out of the box. Please use a default configuration for your end projects.

Build Status

This project is intended as boilerplate and for bootstrapping your 100% dockerized Sylius development environment. It can also be used as blueprint to use in an automated deployment pipeline achieving Dev/Prod-Parity.

The development environment consists of 3 containers, running

You can control, customize and extend the behaviour of this environment with make - see make help for details. It is built around the principles and ideas of the Docker Make Stub.

Development

Requirements

Because docker-compose.yml uses Compose file format 2.1 at least Docker version 1.12 ist required for this environment.

Quickstart

git clone https://github.com/sylius/docker sylius-docker
make help
make up
make console CMD=sylius:install

Accessing services and ports

Service Port Internal DNS Exported
Sylius (HTTP) 8000 sylius Yes
MySQL 3606 mysql Yes
MailHog (SMTP) 1025 mailhog No
MailHog (HTTP) 8025 mailhog Yes

Customizing docker-compose.yml

You can create a docker-compose.local.yml to further extend the docker-compose configuration by overloading the existing YAML configuration. If this file exists make up will recognize and add it as -f docker-compose.local.yml when executing docker-compose.

For example:

version: '2'

services:
  sylius:
    environments:
      - ADDITIONAL_ENV=yesplease

Please note array elements (ports, environments, volumes, ...) will get merged and not replaced. If you want to see this happen have a look at docker/compose#3939 and vote for this PR.

To change the e.g. exposed ports for your local environment you have to edit docker-compose.yml for now.

Running Symfony Console

You can always execute Symfony Console either by getting an interactive shell in the application container using make shell. For some a more convenient way might be using make console which is a wrapper for that.

When using the wrapper target you can pass arguments to console by using the CMD variable:

make console CMD=sylius:install
make console CMD="sylius:user:promote [email protected]"
make console CMD="sylius:theme:assets:install web --symlink --relative"

Support for you Deployment Pipeline

TODO

Todo

  • Integrate an Asset Builder
  • Run sylius:install when required
  • Run composer create-project when required (required for volume mount)
  • PR #15: Predefine project and network name (currently docker-compose generates one based on the root directory name)