Created
July 19, 2012 11:47
-
-
Save memphys/3143253 to your computer and use it in GitHub Desktop.
Capifony files templates for Symfony2 deployment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
ErrorDocument 503 /system/maintenance.html | |
RewriteEngine On | |
RewriteCond %{REQUEST_URI} !.(css|gif|jpg|png)$ | |
RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f | |
RewriteCond %{SCRIPT_FILENAME} !maintenance.html | |
RewriteRule ^.*$ - [redirect=503,last] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*)$ app.php [QSA,L] | |
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load 'deploy' if respond_to?(:namespace) # cap2 differentiator | |
Dir['vendor/bundles/*/*/recipes/*.rb'].each { |bundle| load(bundle) } | |
load Gem.find_files('symfony2.rb').last.to_s | |
load 'app/config/deploy' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :stage_dir, 'app/config/deploy' | |
require 'capistrano/ext/multistage' | |
set :stages, %w(production staging) | |
set :default_stage, "staging" | |
set :repository, "[email protected]:EvercodeLab/somerepo.git" | |
set :scm, :git | |
set :git_enable_submodules, false | |
set :group_writable, false | |
set :keep_releases, 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :application, "someapp.evercodelab.com" | |
set :domain, "server domain or ip is here" | |
set :deploy_to, "/var/www/#{application}" | |
set :app_path, "app" | |
default_run_options[:pty] = true | |
set :ssh_options, {:forward_agent => true, :port => 22} | |
set :user, "deployer" | |
set :use_sudo, false | |
set :deploy_via, :remote_cache | |
set :model_manager, "doctrine" | |
role :web, domain | |
role :app, domain | |
role :db, domain, :primary => true | |
set :shared_files, ["app/config/parameters.ini"] | |
set :shared_children, [app_path + "/logs", web_path + "/uploads", "vendor"] | |
set :dump_assetic_assets, false | |
set :update_vendors, true | |
set :symfony_env_prod, "prod" | |
logger.level = Logger::MAX_LEVEL | |
set :writable_dirs, ["app/cache", "app/logs"] | |
set :webserver_user, "www-data" | |
set :permission_method, :acl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment