From 308ea64e00436f3cc5a51a79df4fa6fa513bbd48 Mon Sep 17 00:00:00 2001 From: Pierre PLAZANET Date: Wed, 4 Nov 2020 11:49:25 +0100 Subject: [PATCH] refactor: move index.php file --- .dockerignore | 3 ++- .php_cs.dist | 2 +- Dockerfile | 12 ++++++------ behat.yaml.dist | 11 ++++++----- index.php => html/index.php | 2 +- 5 files changed, 16 insertions(+), 14 deletions(-) rename index.php => html/index.php (98%) diff --git a/.dockerignore b/.dockerignore index 3656303..fb4f9c3 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,7 +1,8 @@ * !/Gemfile* +!/behat.yaml.dist !/composer* !/features/ -!/index.php +!/html/ !/package* diff --git a/.php_cs.dist b/.php_cs.dist index e8616b3..f0bba62 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -27,7 +27,7 @@ return PhpCsFixer\Config::create() ->registerCustomFixers(new Fixers()) ->setFinder( PhpCsFixer\Finder::create() - ->in(__DIR__) + ->in(__DIR__ . '/html') ->append([__FILE__]) ) ; diff --git a/Dockerfile b/Dockerfile index 5bec88d..bb86d34 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,19 +30,19 @@ RUN echo en_US.UTF-8 UTF-8 > /etc/locale.gen && \ locale -a ENV LANG=en_US.UTF-8 -ENV PATH /var/www/html/node_modules/.bin:$PATH +ENV PATH /var/www/node_modules/.bin:$PATH -WORKDIR /var/www/html +WORKDIR /var/www -COPY Gemfile* /var/www/html/ -COPY composer.* /var/www/html/ -COPY package* /var/www/html/ +COPY Gemfile* /var/www/ +COPY composer.* /var/www/ +COPY package* /var/www/ RUN bundler install --jobs $(($(nproc) * 2)) \ && composer install --no-scripts --no-dev \ && npm install -COPY . /var/www/html +COPY . /var/www ######################################## diff --git a/behat.yaml.dist b/behat.yaml.dist index c0ad8aa..3273e09 100644 --- a/behat.yaml.dist +++ b/behat.yaml.dist @@ -1,6 +1,7 @@ +--- default: - suites: - default: - contexts: - - FeatureContext: - host: "http://prod/" + suites: + default: + contexts: + - FeatureContext: + host: "http://prod/" diff --git a/index.php b/html/index.php similarity index 98% rename from index.php rename to html/index.php index d9f6266..8e41c80 100644 --- a/index.php +++ b/html/index.php @@ -9,7 +9,7 @@ use React\Promise\Deferred; use React\Promise\Promise; -require_once __DIR__.'/vendor/autoload.php'; +require_once dirname(__DIR__).'/vendor/autoload.php'; $app = new App();