Skip to content

Latest commit

 

History

History
96 lines (69 loc) · 3.18 KB

SPEED_UP_DOCKER_COMPOSE.md

File metadata and controls

96 lines (69 loc) · 3.18 KB

What is this?

This document contains information about how you can speed up Docker Engine usage in development stage.

Table of Contents

Reasons?

Symfony generates quite lot of cache files, because it's using compiled container to make things happen. This means a quite lot of IO traffic and that causes slowness problems within certain environments.

Environments with problems

Basically Windows and Mac; with linux you should not have these problems at all.

Windows

The "most" clean solution to solve this atm is to run eg. Ubuntu desktop within VMware / VirtualBox machines. And this means that you actually run your favorite IDE inside that virtual machine.

Another way is to use docker-sync. Application itself already contains necessary docker-sync.yml configuration file to help with this.

Mac

With Mac there is a bit speed difference versus pure *inux installation, but you could try to speed that up by using Docker for Mac Edge

Some benchmark about Docker for Mac versus Docker for Mac Edge here

And if that Docker for Mac Edge isn't fast enough for you, you could also setup that docker-sync for your environment.

Linux

No need to do anything ¯\_(ツ)_/¯

Installation of docker-sync

Follow install instructions from docker-sync website.

Configuration

Create a compose.override.yaml file with following content:

#
# This file should NOT be added to your VCS, only purpose of this is to
# override those volumes with docker-sync.yml config
#
services:
    php:
        volumes:
            - backend-code:/app:cached
            - /app/var/
    nginx:
        volumes:
            - backend-code:/app:cached
            - /app/var/
volumes:
    backend-code:
        external: true

Startup

To start application you just need to use command docker-sync-stack start

Notes

If / when you want to use Xdebug, you should read this document: Using Xdebug


Back to resources index - Back to main README.md