diff --git a/Dockerfile b/Dockerfile index 4b80a846..8d5f4d27 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,12 +40,6 @@ ENV COMMIT_SHA=${COMMIT} EXPOSE 80 -# Update the default apache site with the config we created. -ADD conf/apache-vhost.conf /etc/apache2/sites-available/cmc-sales -ADD conf/ripmime /bin/ripmime - -RUN chmod +x /bin/ripmime - # Copy site into place. ADD . /var/www/cmc-sales RUN mkdir /var/www/cmc-sales/app/tmp @@ -53,6 +47,11 @@ RUN mkdir /var/www/cmc-sales/app/tmp/logs RUN chmod -R 755 /var/www/cmc-sales/app/tmp +# Update the default apache site with the config we created. +ADD conf/apache-vhost.conf /etc/apache2/sites-available/cmc-sales +ADD conf/ripmime /bin/ripmime + +RUN chmod +x /bin/ripmime RUN chmod +x /var/www/cmc-sales/run_vault.sh RUN a2dissite 000-default RUN a2ensite cmc-sales diff --git a/app/config/core.php b/app/config/core.php index 3d664f37..7353e1c1 100644 --- a/app/config/core.php +++ b/app/config/core.php @@ -41,7 +41,7 @@ error_reporting(E_ALL & ~E_STRICT & ~E_DEPRECATED); * In production mode, flash messages redirect after a time interval. * In development mode, you need to click the flash message to continue. */ -Configure::write('debug', 1); +Configure::write('debug', 0); Configure::write('version', '1.0.1'); diff --git a/app/config/database.php b/app/config/database.php index 1cd9fd99..56f41865 100644 --- a/app/config/database.php +++ b/app/config/database.php @@ -2,35 +2,29 @@ //CakePHP is pretty awful. I was so foolish. -$host = $_SERVER['HTTP_HOST']; -if($host == 'localhost:8888' || $host == 'localhost' || $host == 'cmclocal') { - class DATABASE_CONFIG { - - var $default = array( - 'driver' => 'mysql', - 'persistent' => false, - 'host' => '172.17.0.1', - 'login' => 'cmc', - 'password' => 'cmc', - 'database' => 'cmc', - 'prefix' => '', - ); + class DATABASE_CONFIG { - } + var $default = array( + 'driver' => 'mysql', + 'persistent' => false, + 'host' => '172.17.0.1', + 'login' => 'cmc', + 'password' => 'xVRQI&cA?7AU=hqJ!%au', + 'database' => 'cmc', + 'prefix' => '', + ); -} else { -class DATABASE_CONFIG { - var $default = array( - 'driver' => 'mysql', - 'persistent' => false, - 'host' => '172.17.0.1', - 'login' => 'cmc', - 'password' => 'xVRQI&cA?7AU=hqJ!%au', - 'database' => 'cmc', - 'prefix' => '', - ); -} -} \ No newline at end of file +// there are no tests... + var $test = array( + 'driver' => 'mysql', + 'persistent' => false, + 'host' => 'localhost', + 'login' => 'user', + 'password' => 'password', + 'database' => 'test_database_name', + 'prefix' => '', + ); + } diff --git a/app/controllers/documents_controller.php b/app/controllers/documents_controller.php index 4e3d2028..c8e2b53d 100755 --- a/app/controllers/documents_controller.php +++ b/app/controllers/documents_controller.php @@ -511,7 +511,7 @@ ENDINSTRUCTIONS; } if(isset($this->data['PurchaseOrder']['Job'])) { - //Loop over the submitted Jobs and add them. Fuck CakePHP is a piece of shit. + //Loop over the submitted Jobs and add them. Fuck CakePHP is a piece of shit. //This is easier than using the fucking built in crap that doesnt work. //Fuck everything about this. $po_id = $this->data['PurchaseOrder']['id']; diff --git a/conf/php.ini b/conf/php.ini index 15a17b3c..e8d4b05f 100644 --- a/conf/php.ini +++ b/conf/php.ini @@ -437,7 +437,7 @@ expose_php = On ; Maximum execution time of each script, in seconds ; http://php.net/max-execution-time ; Note: This directive is hardcoded to 0 for the CLI SAPI -max_execution_time = 300 +max_execution_time = 30 ; Maximum amount of time each script may spend parsing request data. It's a good ; idea to limit this time on productions servers in order to eliminate unexpectedly @@ -455,7 +455,7 @@ max_input_time = 60 ; Maximum amount of memory a script may consume (128MB) ; http://php.net/memory-limit -memory_limit = 512M +memory_limit = 256M ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Error handling and logging ;