Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up PHP-fpm container on MacOS #568

Draft
wants to merge 2 commits into
base: 1.12
Choose a base branch
from

Commits on Jun 3, 2021

  1. Speed up PHP-fpm container on MacOS

    Many MacOS users may be facing slow responses from Shop or Admin when
    running the sylius application in the container. The main reason is how
    docker was build in the MacOS architecture. The PHP application has
    thousands of files to be loaded in memory (vendor directory mainly).
    
    So, to decrease the page response time, the vendor directory is not
    synced into the container. It will be ignored by docker-composer.yml
    using the named volume.
    
    Also, was added a health check for the PHP-fpm container to know when it
    is ready. If you want to check healthiness, just run the command
    `docker-compose ps` to see the container State.
    
    The HEALTHCHECK instruction tells Docker how to test a container
    to check that it is still working. This can detect cases such as a
    web server stuck in an infinite loop and unable to handle new
    connections, even though the server process is still running.
    
    The PHP and PHP-FPM configurations received some adjustments to get
    better support development environment experience using containers.
    
    I did pick up these updates from two other contributors that I
    co-authored in this commit.
    
    Co-authored-by: Kévin Dunglas <[email protected]>
    Co-authored-by: arti0090 <[email protected]>
    3 people committed Jun 3, 2021
    Configuration menu
    Copy the full SHA
    ca7781f View commit details
    Browse the repository at this point in the history
  2. Load dotenv into docker composer build args

    The container image was ignoring the dotenv config to build the PHP
    container image.
    tonicospinelli committed Jun 3, 2021
    Configuration menu
    Copy the full SHA
    73e564e View commit details
    Browse the repository at this point in the history