From 49a20c75ed4b0f9d3a66ddf6bd33d8c24bc571c0 Mon Sep 17 00:00:00 2001 From: Brady Wetherington Date: Mon, 21 Sep 2015 13:15:26 -0700 Subject: [PATCH] Fix for #1052 - hopefully make it less brittle in future as well. --- Dockerfile | 6 ++---- docker/app_start.patch | 19 ------------------- 2 files changed, 2 insertions(+), 23 deletions(-) delete mode 100644 docker/app_start.patch diff --git a/Dockerfile b/Dockerfile index adf7e59f8295..fb68bcaa3a69 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,12 +33,10 @@ RUN a2enmod rewrite ############ INITIAL APPLICATION SETUP ##################### -COPY docker/app_start.patch /tmp/app_start.patch - WORKDIR /var/www/html -#Patch bootstrap file -RUN patch -p1 < /tmp/app_start.patch +#Append to bootstrap file (less brittle than 'patch') +RUN sed -i 's/return $app;/$env="production";\nreturn $app;/' bootstrap/start.php #copy all configuration files COPY docker/*.php /var/www/html/app/config/production/ diff --git a/docker/app_start.patch b/docker/app_start.patch deleted file mode 100644 index 93498b1b0f28..000000000000 --- a/docker/app_start.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/bootstrap/start.php b/bootstrap/start.php -index b7862c418dc3..10368dad43bb 100755 ---- a/bootstrap/start.php -+++ b/bootstrap/start.php -@@ -24,11 +24,9 @@ $app = new Illuminate\Foundation\Application; - | - */ - --$env = $app->detectEnvironment(array( -- 'local' => array('homestead','AlisonMBP'), -- 'staging' => array('stagingweb01'), -- 'production' => array('www.yourserver.com') --)); -+$env = $app->detectEnvironment(function () { -+ return "production"; //always be 'production' as environment -+}); - - /* - |--------------------------------------------------------------------------