diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..6c13d444c9 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,37 @@ +**/*.log +**/*.md +**/*.php~ +**/._* +**/.dockerignore +**/.DS_Store +**/.git/ +**/.gitattributes +**/.gitignore +**/.gitkeep +**/.gitmodules +**/Dockerfile +**/Thumbs.db +.editorconfig +.env* +.php_cs.cache +.travis.yml +app/config/parameters.yml +app/config/*.local.yml +bin/* +!bin/console +!bin/symfony_requirements +composer.phar +docker-compose.override.yaml +docker-compose.override.yml +docker-compose.yaml +docker-compose.yml +docker/mysql/data/ +etc/build/* +node_modules/ +var/* +vendor/ +web/assets/ +web/bundles/ +web/css/ +web/js/ +web/media/ diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..b95f460c3d --- /dev/null +++ b/.editorconfig @@ -0,0 +1,86 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org + +root = true + +[*] +# Change these settings to your own preference +indent_style = space +indent_size = 4 + +# We recommend you to keep these unchanged +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.feature] +indent_style = space +indent_size = 2 + +[*.js] +indent_style = space +indent_size = 2 + +[*.json] +indent_style = space +indent_size = 2 + +[*.md] +indent_style = space +indent_size = 4 +trim_trailing_whitespace = false + +[*.neon] +indent_style = tab +indent_size = 4 + +[*.php] +indent_style = space +indent_size = 4 + +[*.sh] +indent_style = tab +indent_size = 4 + +[*.{yaml,yml}] +indent_style = space +indent_size = 4 +trim_trailing_whitespace = false + +[.gitmodules] +indent_style = tab +indent_size = 4 + +[.php_cs{,.dist}] +indent_style = space +indent_size = 4 + +[composer.json] +indent_style = space +indent_size = 4 + +[docker-compose{,.override}.{yaml,yml}] +indent_style = space +indent_size = 2 + +[Dockerfile] +indent_style = tab +indent_size = 4 + +[package.json] +indent_style = space +indent_size = 2 + +[phpspec.yml{,.dist}] +indent_style = space +indent_size = 4 + +[phpstan.neon] +indent_style = tab +indent_size = 4 + +[phpunit.xml{,.dist}] +indent_style = space +indent_size = 4 diff --git a/.env.dist b/.env.dist new file mode 100644 index 0000000000..5cb1262d63 --- /dev/null +++ b/.env.dist @@ -0,0 +1,8 @@ +MYSQL_PASSWORD=!ChangeMe! +MYSQL_ROOT_PASSWORD=!ChangeMe! +PHP_DATE_TIMEZONE=UTC +SYLIUS_MAILER_HOST=mailhog +SYLIUS_MAILER_PASSWORD= +SYLIUS_MAILER_PORT=1025 +SYLIUS_MAILER_USER= +SYLIUS_SECRET=!ChangeMe! diff --git a/.gitignore b/.gitignore index 88aba9c46a..a99c5fcd11 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ /vendor /node_modules +/yarn-error.log /etc/build/* !/etc/build/.gitkeep @@ -26,3 +27,8 @@ /behat.yml /phpunit.xml /phpspec.yml + +/.env +/docker-compose.override.yaml +/docker-compose.override.yml +/docker/mysql/data/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..13f6ed69ed --- /dev/null +++ b/Dockerfile @@ -0,0 +1,151 @@ +ARG PHP_VERSION=7.2 +ARG NODE_VERSION=10 +ARG NGINX_VERSION=1.14 + +FROM php:${PHP_VERSION}-fpm-alpine AS sylius_php + +# persistent / runtime deps +RUN apk add --no-cache \ + acl \ + file \ + gettext \ + git \ + mariadb-client \ + ; + +ARG APCU_VERSION=5.1.11 +RUN set -eux; \ + apk add --no-cache --virtual .build-deps \ + $PHPIZE_DEPS \ + freetype-dev \ + icu-dev \ + libjpeg-turbo-dev \ + libpng-dev \ + libtool \ + libwebp-dev \ + libzip-dev \ + mariadb-dev \ + zlib-dev \ + ; \ + \ + docker-php-ext-configure gd --with-jpeg-dir=/usr/include/ --with-png-dir=/usr/include --with-webp-dir=/usr/include --with-freetype-dir=/usr/include/; \ + docker-php-ext-configure zip --with-libzip; \ + docker-php-ext-install -j$(nproc) \ + exif \ + gd \ + intl \ + pdo_mysql \ + zip \ + ; \ + pecl install \ + apcu-${APCU_VERSION} \ + ; \ + pecl clear-cache; \ + docker-php-ext-enable \ + apcu \ + opcache \ + ; \ + \ + runDeps="$( \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ + | tr ',' '\n' \ + | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ + )"; \ + apk add --no-cache --virtual .sylius-phpexts-rundeps $runDeps; \ + \ + apk del .build-deps + +COPY --from=composer:latest /usr/bin/composer /usr/bin/composer +COPY docker/php/php.ini /usr/local/etc/php/php.ini + +ARG COMPOSER_AUTH= +# https://getcomposer.org/doc/03-cli.md#composer-allow-superuser +ENV COMPOSER_ALLOW_SUPERUSER=1 +RUN set -eux; \ + composer global require "hirak/prestissimo:^0.3" --prefer-dist --no-progress --no-suggest --classmap-authoritative; \ + composer clear-cache +ENV PATH="${PATH}:/root/.composer/vendor/bin" + +WORKDIR /srv/sylius + +# Build for production +ARG SYMFONY_ENV=prod + +# Prevent the reinstallation of vendors at every changes in the source code +COPY composer.json composer.lock ./ +RUN set -eux; \ + composer install --prefer-dist --no-dev --no-autoloader --no-scripts --no-progress --no-suggest; \ + composer clear-cache + +COPY . ./ + +RUN set -eux; \ + mkdir -p var/cache var/logs; \ + composer dump-autoload --classmap-authoritative --no-dev; \ + composer run-script --no-dev post-install-cmd; \ + chmod +x bin/console; sync; \ + bin/console sylius:install:assets; \ + bin/console sylius:theme:assets:install +VOLUME /srv/sylius/var + +VOLUME /srv/sylius/web/media + +COPY docker/php/docker-entrypoint.sh /usr/local/bin/docker-entrypoint +RUN chmod +x /usr/local/bin/docker-entrypoint + +ENTRYPOINT ["docker-entrypoint"] +CMD ["php-fpm"] + +FROM node:${NODE_VERSION}-alpine AS sylius_nodejs + +WORKDIR /srv/sylius + +# Build for production +ARG NODE_ENV=production +ARG GULP_ENV=prod + +RUN set -eux; \ + apk add --no-cache --virtual .build-deps \ + g++ \ + gcc \ + make \ + python \ + ; + +# Prevent the reinstallation of vendors at every changes in the source code +COPY package.json yarn.lock ./ +RUN set -eux; \ + yarn install; \ + yarn cache clean + +COPY --from=sylius_php /srv/sylius/vendor/sylius/sylius/src/Sylius/Bundle/UiBundle/Resources/private vendor/sylius/sylius/src/Sylius/Bundle/UiBundle/Resources/private/ +COPY --from=sylius_php /srv/sylius/vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/Resources/private vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/Resources/private/ +COPY --from=sylius_php /srv/sylius/vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/Resources/private vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/Resources/private/ + +COPY --from=sylius_php /srv/sylius/vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/gulpfile.babel.js vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/gulpfile.babel.js +COPY --from=sylius_php /srv/sylius/vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/gulpfile.babel.js vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/gulpfile.babel.js + +COPY gulpfile.babel.js .babelrc ./ +RUN set -eux; \ + if [ "${NODE_ENV}" = 'production' ]; then \ + NODE_ENV=development yarn install; \ + yarn build; \ + yarn install; \ + yarn cache clean; \ + fi + +COPY docker/nodejs/docker-entrypoint.sh /usr/local/bin/docker-entrypoint +RUN chmod +x /usr/local/bin/docker-entrypoint + +ENTRYPOINT ["docker-entrypoint"] +CMD ["node"] + +FROM nginx:${NGINX_VERSION}-alpine AS sylius_nginx + +COPY docker/nginx/conf.d/default.conf /etc/nginx/conf.d/ + +WORKDIR /srv/sylius + +COPY --from=sylius_php /srv/sylius/web web/ +COPY --from=sylius_nodejs /srv/sylius/web web/ diff --git a/app/config/config.yml b/app/config/config.yml index 0e5744a731..389181b141 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -31,12 +31,12 @@ framework: doctrine: dbal: - driver: '%database_driver%' host: '%database_host%' port: '%database_port%' dbname: '%database_name%' user: '%database_user%' password: '%database_password%' + driver: pdo_mysql server_version: '5.5' charset: UTF8 @@ -49,6 +49,7 @@ doctrine_migrations: swiftmailer: transport: '%mailer_transport%' host: '%mailer_host%' + port: '%mailer_port%' username: '%mailer_user%' password: '%mailer_password%' diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index f6a60eee79..74b2665ff1 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -1,5 +1,4 @@ parameters: - database_driver: '%env(SYLIUS_DATABASE_DRIVER)%' database_host: '%env(SYLIUS_DATABASE_HOST)%' database_port: '%env(SYLIUS_DATABASE_PORT)%' database_name: '%env(SYLIUS_DATABASE_NAME)%' @@ -10,13 +9,13 @@ parameters: mailer_transport: '%env(SYLIUS_MAILER_TRANSPORT)%' mailer_host: '%env(SYLIUS_MAILER_HOST)%' + mailer_port: '%env(SYLIUS_MAILER_PORT)%' mailer_user: '%env(SYLIUS_MAILER_USER)%' mailer_password: '%env(SYLIUS_MAILER_PASSWORD)%' secret: '%env(SYLIUS_SECRET)%' # Fallback values (used if environmental variables are not set) - env(SYLIUS_DATABASE_DRIVER): pdo_mysql env(SYLIUS_DATABASE_HOST): 127.0.0.1 env(SYLIUS_DATABASE_PORT): ~ env(SYLIUS_DATABASE_NAME): sylius @@ -25,6 +24,7 @@ parameters: env(SYLIUS_MAILER_TRANSPORT): smtp env(SYLIUS_MAILER_HOST): 127.0.0.1 + env(SYLIUS_MAILER_PORT): ~ env(SYLIUS_MAILER_USER): ~ env(SYLIUS_MAILER_PASSWORD): ~ diff --git a/composer.json b/composer.json index 0e75887277..7f9e41531c 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "require": { "php": "^7.1", - "sylius/sylius": "1.2.*", + "sylius/sylius": "1.3.*@dev", "symfony/symfony": "^3.4|^4.1" }, "require-dev": { @@ -80,12 +80,12 @@ "symfony-var-dir": "var", "symfony-web-dir": "web", "symfony-tests-dir": "tests", - "symfony-assets-install": "relative", + "symfony-assets-install": "copy", "incenteev-parameters": { "file": "app/config/parameters.yml" }, "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.3-dev" } } } diff --git a/composer.lock b/composer.lock index 29ea0fed6c..081b5a19f1 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c67d8623e21a0447100f659ab2e90e05", + "content-hash": "01cddba0b9478c382de742c82d7d42fe", "packages": [ { "name": "behat/transliterator", @@ -5315,16 +5315,16 @@ }, { "name": "sylius/sylius", - "version": "v1.2.0", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/Sylius/Sylius.git", - "reference": "fe61f5c3aee73754e2e3df0cdc7558237ee0f8aa" + "reference": "dcc532b91e4ec2ba1aca08b13a4a51987b42e1fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Sylius/Sylius/zipball/fe61f5c3aee73754e2e3df0cdc7558237ee0f8aa", - "reference": "fe61f5c3aee73754e2e3df0cdc7558237ee0f8aa", + "url": "https://api.github.com/repos/Sylius/Sylius/zipball/dcc532b91e4ec2ba1aca08b13a4a51987b42e1fb", + "reference": "dcc532b91e4ec2ba1aca08b13a4a51987b42e1fb", "shasum": "" }, "require": { @@ -5476,7 +5476,7 @@ "file": "app/config/parameters.yml" }, "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.3-dev" } }, "autoload": { @@ -5509,7 +5509,7 @@ ], "description": "E-Commerce platform for PHP, based on Symfony framework.", "homepage": "http://sylius.com", - "time": "2018-06-12T12:21:18+00:00" + "time": "2018-06-12T12:44:39+00:00" }, { "name": "symfony/class-loader", @@ -10575,6 +10575,7 @@ "aliases": [], "minimum-stability": "stable", "stability-flags": { + "sylius/sylius": 20, "behat/mink": 20 }, "prefer-stable": true, diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000000..59c5d171e1 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,105 @@ +version: '3.4' + +services: + php: + build: + context: . + target: sylius_php + depends_on: + - mysql + environment: + - PHP_DATE_TIMEZONE + # Comment out the following line in production + - SYMFONY_ENV=dev + # Uncomment the following line in production + # - SYMFONY_ENV=prod + # Comment out the following line in production + - SYLIUS_APP_DEV_PERMITTED=1 + - SYLIUS_DATABASE_HOST=mysql + - SYLIUS_DATABASE_PORT=3306 + # Sylius will append SYMFONY_ENV to the database name, e.g. sylius -> sylius_dev + - SYLIUS_DATABASE_NAME=sylius + - SYLIUS_DATABASE_USER=sylius + - SYLIUS_DATABASE_PASSWORD=${MYSQL_PASSWORD-!NotSet!} + - SYLIUS_MAILER_TRANSPORT=smtp + - SYLIUS_MAILER_HOST=${SYLIUS_MAILER_HOST-mailhog} + - SYLIUS_MAILER_PORT=${SYLIUS_MAILER_PORT-1025} + - SYLIUS_MAILER_USER=${SYLIUS_MAILER_USER-} + - SYLIUS_MAILER_PASSWORD=${SYLIUS_MAILER_PASSWORD-} + - SYLIUS_SECRET=${SYLIUS_SECRET-!NotSet!} + volumes: + # Comment out the following line in production + - .:/srv/sylius:rw,cached + # If you develop on Linux, uncomment the following line to use a bind-mounted host directory instead + # - ./var:/srv/sylius/var:rw + # Comment out the following line in production + - ./web:/srv/sylius/web:rw,delegated + # If you develop on Linux, uncomment the following line to use a bind-mounted host directory instead + # - ./web/media:/srv/sylius/web/media:rw + # If you develop on Linux, comment out the following line + - web-media:/srv/sylius/web/media:rw + + mysql: + # In production, you may want to use a managed database service + image: percona:5.7 + environment: + - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD-!NotSet!} + # Sylius will append SYMFONY_ENV to the database name, e.g. sylius -> sylius_dev + - MYSQL_DATABASE=sylius_dev + - MYSQL_USER=sylius + - MYSQL_PASSWORD=${MYSQL_PASSWORD-!NotSet!} + volumes: + - mysql-db-data:/var/lib/mysql:rw + # You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data! + # - ./docker/mysql/data:/var/lib/mysql:rw,delegated + ports: + - "3306:3306" + + nodejs: + # You don't need to deploy this in production, but it's still used in the build stage + build: + context: . + target: sylius_nodejs + # Comment out this following section in production + command: ["yarn", "watch"] + environment: + - GULP_ENV=dev + volumes: + - .:/srv/sylius:rw,cached + - ./web:/srv/sylius/web:rw,delegated + ports: + - "35729:35729" + # Comment out until here in production + + nginx: + # In production, you may want to use a static website hosting service + build: + context: . + target: sylius_nginx + depends_on: + - php + volumes: + # Comment out the following line in production + - ./docker/nginx/conf.d/default_dev.conf:/etc/nginx/conf.d/default.conf + # Comment out the following line in production + - ./web:/srv/sylius/web:ro + # If you develop on Linux, uncomment the following line to use a bind-mounted host directory instead + # - ./web/media:/srv/sylius/web/media:rw + # If you develop on Linux, comment out the following line + - web-media:/srv/sylius/web/media:ro,nocopy + ports: + - "80:80" + + mailhog: + # Do not use in production! + image: mailhog/mailhog:latest + environment: + - MH_STORAGE=maildir + volumes: + - ./docker/mailhog/maildir:/maildir:rw,delegated + ports: + - "8025:8025" + +volumes: + mysql-db-data: + web-media: diff --git a/docker/nginx/conf.d/default.conf b/docker/nginx/conf.d/default.conf new file mode 100644 index 0000000000..d8d03ee915 --- /dev/null +++ b/docker/nginx/conf.d/default.conf @@ -0,0 +1,39 @@ +server { + root /srv/sylius/web; + + location / { + # try to serve file directly, fallback to app.php + try_files $uri /app.php$is_args$args; + } + + # PROD + location ~ ^/app\.php(/|$) { + # Comment the next line and uncomment the lines after to enable dynamic resolution (incompatible with Kubernetes) + fastcgi_pass php:9000; + #resolver 127.0.0.11; + #set $upstream_host php; + #fastcgi_pass $upstream_host:9000; + + fastcgi_split_path_info ^(.+\.php)(/.*)$; + include fastcgi_params; + # When you are using symlinks to link the document root to the + # current version of your application, you should pass the real + # application path instead of the path to the symlink to PHP + # FPM. + # Otherwise, PHP's OPcache may not properly detect changes to + # your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126 + # for more information). + fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; + fastcgi_param DOCUMENT_ROOT $realpath_root; + # Prevents URIs that include the front controller. This will 404: + # http://domain.tld/app.php/some-path + # Remove the internal directive to allow URIs like this + internal; + } + + # return 404 for all other php files not matching the front controller + # this prevents access to other php files you don't want to be accessible. + location ~ \.php$ { + return 404; + } +} diff --git a/docker/nginx/conf.d/default_dev.conf b/docker/nginx/conf.d/default_dev.conf new file mode 100644 index 0000000000..2442c9302d --- /dev/null +++ b/docker/nginx/conf.d/default_dev.conf @@ -0,0 +1,62 @@ +server { + root /srv/sylius/web; + + location / { + # try to serve file directly, fallback to app.php + try_files $uri /app.php$is_args$args; + } + + # DEV + # This rule should only be placed on your development environment + # In production, don't include this and don't deploy app_dev.php or config.php + location ~ ^/(app_dev|config)\.php(/|$) { + # Comment the next line and uncomment the lines after to enable dynamic resolution (incompatible with Kubernetes) + fastcgi_pass php:9000; + #resolver 127.0.0.11; + #set $upstream_host php; + #fastcgi_pass $upstream_host:9000; + + fastcgi_split_path_info ^(.+\.php)(/.*)$; + include fastcgi_params; + # When you are using symlinks to link the document root to the + # current version of your application, you should pass the real + # application path instead of the path to the symlink to PHP + # FPM. + # Otherwise, PHP's OPcache may not properly detect changes to + # your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126 + # for more information). + fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; + fastcgi_param DOCUMENT_ROOT $realpath_root; + } + + # PROD + location ~ ^/app\.php(/|$) { + # Comment the next line and uncomment the lines after to enable dynamic resolution (incompatible with Kubernetes) + fastcgi_pass php:9000; + #resolver 127.0.0.11; + #set $upstream_host php; + #fastcgi_pass $upstream_host:9000; + + fastcgi_split_path_info ^(.+\.php)(/.*)$; + include fastcgi_params; + # When you are using symlinks to link the document root to the + # current version of your application, you should pass the real + # application path instead of the path to the symlink to PHP + # FPM. + # Otherwise, PHP's OPcache may not properly detect changes to + # your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126 + # for more information). + fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; + fastcgi_param DOCUMENT_ROOT $realpath_root; + # Prevents URIs that include the front controller. This will 404: + # http://domain.tld/app.php/some-path + # Remove the internal directive to allow URIs like this + internal; + } + + # return 404 for all other php files not matching the front controller + # this prevents access to other php files you don't want to be accessible. + location ~ \.php$ { + return 404; + } +} diff --git a/docker/nodejs/docker-entrypoint.sh b/docker/nodejs/docker-entrypoint.sh new file mode 100755 index 0000000000..97c4da8cea --- /dev/null +++ b/docker/nodejs/docker-entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/sh +set -e + +# first arg is `-f` or `--some-option` +if [ "${1#-}" != "$1" ]; then + set -- node "$@" +fi + +if [ "$1" = 'node' ] || [ "$1" = 'yarn' ]; then + if [ "$GULP_ENV" != 'prod' ]; then + yarn install + yarn build + fi +fi + +exec "$@" diff --git a/docker/php/docker-entrypoint.sh b/docker/php/docker-entrypoint.sh new file mode 100755 index 0000000000..39dca0e206 --- /dev/null +++ b/docker/php/docker-entrypoint.sh @@ -0,0 +1,26 @@ +#!/bin/sh +set -e + +# first arg is `-f` or `--some-option` +if [ "${1#-}" != "$1" ]; then + set -- php-fpm "$@" +fi + +if [ "$1" = 'php-fpm' ] || [ "$1" = 'bin/console' ]; then + mkdir -p var/cache var/logs web/media + setfacl -R -m u:www-data:rwX -m u:"$(whoami)":rwX var web/media + setfacl -dR -m u:www-data:rwX -m u:"$(whoami)":rwX var web/media + + if [ "$SYMFONY_ENV" != 'prod' ]; then + composer install --prefer-dist --no-progress --no-suggest --no-interaction + bin/console sylius:install:assets --no-interaction + bin/console sylius:theme:assets:install --no-interaction + >&2 echo "Waiting for MySQL to be ready..." + until select="$(echo 'SELECT 1' | mysql --host="${SYLIUS_DATABASE_HOST}" --database="${SYLIUS_DATABASE_NAME}_${SYMFONY_ENV}" --user="${SYLIUS_DATABASE_USER}" --password="${SYLIUS_DATABASE_PASSWORD}" --silent)" && [ "$select" = '1' ]; do + sleep 1 + done + bin/console sylius:install:database --no-interaction + fi +fi + +exec docker-php-entrypoint "$@" diff --git a/docker/php/php.ini b/docker/php/php.ini new file mode 100644 index 0000000000..3967e62972 --- /dev/null +++ b/docker/php/php.ini @@ -0,0 +1,10 @@ +apc.enable_cli = 1 +date.timezone = ${PHP_DATE_TIMEZONE} +opcache.enable_cli = 1 +session.auto_start = Off +short_open_tag = Off + +# http://symfony.com/doc/current/performance.html +opcache.max_accelerated_files = 20000 +realpath_cache_size = 4096K +realpath_cache_ttl = 600