Skip to content
This repository has been archived by the owner on Sep 23, 2022. It is now read-only.

Commit

Permalink
Finish capifony configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeniy Guseletov committed Oct 22, 2012
1 parent 7e03db1 commit 9ee266f
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 44 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Expand Up @@ -19,8 +19,6 @@
/app/config/parameters.yml
/app/config/parameters.*.yml
/app/config/deploy/*
!/app/config/deploy/prod.rb.dist
!/app/config/deploy/staging.rb.dist
composer.phar
bin/*
!bin/update-all-bundles.sh
Expand Down
4 changes: 2 additions & 2 deletions Capfile
@@ -1,4 +1,4 @@
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
Dir['vendor/**/Resources/recipes/*.rb'].each { |bundle| load(bundle) }
require 'capifony_symfony2'
load 'app/config/deploy'
load Gem.find_files('symfony2.rb').first.to_s
load 'app/config/deploy'
54 changes: 25 additions & 29 deletions app/config/deploy.rb
@@ -1,38 +1,33 @@
set :mainrepo, "KnpLabs"
set :stages, %w(prod staging)
set :default_stage, "staging"
set :stage_dir, "app/config/deploy"
require 'capistrano/ext/multistage'
set :stages, %w(production staging)
set :default_stage, "staging"
set :stage_dir, "app/config/deploy"

set :application, "KnpBundles.com"
set :app_path, "app"
set :group_writable, false
set :use_sudo, false
require 'capistrano/ext/multistage'

ssh_options[:port] = "22123"
ssh_options[:forward_agent] = true
default_run_options[:pty] = true
set :application, "KnpBundles.com"
set :app_path, "app"
set :symfony_console, "app/console"
set :group_writable, false
set :use_sudo, false

set :repository, "git@github.com:#{mainrepo}/KnpBundles.git"
set :scm, :git
set :deploy_via, :remote_cache
set :repository, "git://github.com/KnpLabs/KnpBundles.git"
set :scm, :git
set :deploy_via, :remote_cache

set :model_manager, "doctrine"
set :admin_runner, nil
set :model_manager, "doctrine"
set :admin_runner, nil
set :keep_releases, 2

set :keep_releases, 2
set :shared_files, ["app/config/parameters.yml", "bin/launch-rabbit-consumers.sh", "app/Resources/java"]
set :shared_children, [app_path + "/logs"]
set :use_composer, true
set :update_vendors, false

set :shared_files, ["app/config/parameters.yml"]
set :shared_children, [app_path + "/logs", web_path + "/uploads", app_path + "/sessions"]
set :use_composer, true
set :update_vendors, true
set :vendors_mode, "install"
set :dump_assetic_assets, true
set :interactive_mode, false
set :use_sudo, false
set :dump_assetic_assets, true
set :interactive_mode, false
set :use_sudo, false

before 'symfony:composer:update', 'symfony:copy_vendors'
before 'symfony:cache:warmup', 'symfony:force_migrate'
before 'symfony:composer:install', 'symfony:copy_vendors'

namespace :symfony do
desc "Copy vendors from previous release"
Expand All @@ -43,4 +38,5 @@
end
end

logger.level = Logger::MAX_LEVEL
# Be more verbose by uncommenting the following line
# logger.level = Logger::MAX_LEVEL
6 changes: 0 additions & 6 deletions app/config/deploy/prod.rb.dist

This file was deleted.

7 changes: 7 additions & 0 deletions app/config/deploy/production.rb.dist
@@ -0,0 +1,7 @@
server 'KnpBundles.com', :app, :web, :db, :primary => true

set :domain, "knpbundles.local"
set :deploy_to, "/path/to/knpbundles/production"
set :user, "production-user"
set :branch, "master"
set :port, 27
11 changes: 6 additions & 5 deletions app/config/deploy/staging.rb.dist
@@ -1,6 +1,7 @@
server 'KnpBundles.com', :app, :web, :db, :primary => true
set :domain, "KnpBundles.com"
set :deploy_to, "/home/knpbundles/sites/KnpBundles-staging/site"
set :branch, "master"
set :user, "user"
set :password, "password"

set :domain, "stage.knpbundles.local"
set :deploy_to, "/path/to/knpbundles/staging"
set :user, "staging-user"
set :branch, "develop"
set :port, 26

0 comments on commit 9ee266f

Please sign in to comment.