production-environment

Laravel 4.1 Deployment - Production .env.php not being recognised

孤街浪徒 提交于 2019-12-03 13:27:22
问题 For some reason, my production laravel app thinks that it is in the local environment. /var/www/appname/.env.php <?php return [ 'APP_ENV' => 'production', 'DB_HOST' => 'HIDDEN', 'DB_NAME' => 'HIDDEN', 'DB_PASSWORD' => 'HIDDEN' ]; /var/www/appname/bootstrap/start.php $env = $app->detectEnvironment(function() { return getenv('APP_ENV') ?: 'local'; }); /var/www/appname/app/config/database.php ... ... 'mysql' => array( 'driver' => 'mysql', 'host' => getenv('DB_HOST'), 'database' => getenv('DB

What is the procedure for debugging a production-only error?

依然范特西╮ 提交于 2019-12-03 10:44:39
Let me say upfront that I'm so ignorant on this topic that I don't even know whether this question has objective answers or not. If it ends up being "not," I'll delete or vote to close the post. Here's the scenario: I just wrote a little web service. It works on my machine. It works on my team lead's machine. It works, as far as I can tell, on every machine except for the production server. The exception that the production server spits out upon failure originates from a third-party JAR file, and is skimpy on information. I search the web for hours, but don't come up with anything useful. So

Rails App Maintenence Without Hindering Visitors

会有一股神秘感。 提交于 2019-12-03 10:17:43
问题 A Phusion Passenger error message isn't what I want my visitors to see if they landed on my site while I'm updating the back end. So how do I get around this? Is my deployment process flawed from the start? or is there something I'm missing out? Here's my process of deployment, so you get the picture: commit new updates to a git repo and push to remote cap deploy ssh [ip] rake gems:install rake db:migrate cucumber The time in between the cap deploy and the db:migrate or gems:install is when

Auto detect internal/external development environment

拟墨画扇 提交于 2019-12-03 09:45:41
问题 We use the following function to auto detect if we are on a machine internally or on a live server and then choose the appropriate configs for various components: function devIsLocal(){ $res=false; $http_host=$_SERVER['HTTP_HOST']; if($http_host=='localhost')$res=true; if($http_host=='127.0.0.1')$res=true; if(substr($http_host,-4)=='.lan')$res=true; if(strpos($http_host, '.')===false)$res=true; return($res); } As you can see it only relies on the HTTP_HOST value. Of course, if you use some

Accessing Meteor Settings in a Self-Owned Production Environment

删除回忆录丶 提交于 2019-12-03 06:20:52
问题 According to Meteor's documentation, we can include a settings file through the command line to provide deployment-specific settings. However, the --settings option seems to only be available through the run and deploy commands. If I am running my Meteor application on my own infrastructure - as outlined in the Running on Your Own Infrastructure section of the documentation - there doesn't seem to be a way to specify a deployment-specific settings file anywhere in the process. Is there a way

How to start passenger in production environment?

房东的猫 提交于 2019-12-03 04:30:50
问题 I'm starting the Rails 3 application with the following command: passenger start -a 0.0.0.0 -p 3000 -d but how do I tell passenger to start the application in production environment? 回答1: passenger start -a 0.0.0.0 -p 3000 -d -e production Side note: always check the help, passenger start --help would have told you the same. 来源: https://stackoverflow.com/questions/7260961/how-to-start-passenger-in-production-environment

Using CoffeeScript in a production environment [closed]

冷暖自知 提交于 2019-12-03 04:24:33
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. I really like using CoffeeScript (1.1.1) for small projects and it worked out great so far. However before using it in a more broad environment I would like to hear second opinions on using it in production. So my questions are: How stable is the language

Laravel 4.1 Deployment - Production .env.php not being recognised

冷暖自知 提交于 2019-12-03 03:30:27
For some reason, my production laravel app thinks that it is in the local environment. /var/www/appname/.env.php <?php return [ 'APP_ENV' => 'production', 'DB_HOST' => 'HIDDEN', 'DB_NAME' => 'HIDDEN', 'DB_PASSWORD' => 'HIDDEN' ]; /var/www/appname/bootstrap/start.php $env = $app->detectEnvironment(function() { return getenv('APP_ENV') ?: 'local'; }); /var/www/appname/app/config/database.php ... ... 'mysql' => array( 'driver' => 'mysql', 'host' => getenv('DB_HOST'), 'database' => getenv('DB_NAME'), 'username' => getenv('DB_USERNAME'), 'password' => getenv('DB_PASSWORD'), 'charset' => 'utf8',

“require_tree argument must be a directory” rails 3.1.1 precompile assets

血红的双手。 提交于 2019-12-03 02:20:18
问题 I've been round and round here with trying to get the assets to pre-compile on my production server (straightforward ubuntu install with ruby 1.9.2 and Rails 3.1.1, and tried 3.1.2RC with the new sprockets 2.10 as well). "require_tree argument must be a directory". I've seen other issues related to this on stack but the situation isn't exactly the same and none of the proposed solutions have helped – like create a stub file in the sub folder, then reference only relatively at that point. No

Canary release strategy vs. Blue/Green

怎甘沉沦 提交于 2019-12-03 01:30:41
问题 My understanding of a canary release is that it's a partial release to a subset of production nodes with sticky sessions turned on. That way you can control and minimize the number of users/customers that get impacted if you end up releasing a bad bug. My understanding of a blue/green release is that you have 2 mirrored production environments ("blue" and "green"), and you push changes out to all the nodes of either blue or green at once, and then use networking magic to control which