Skip to content

Instantly share code, notes, and snippets.

import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import peopleActions from './peopleActions';
export class MyComponent extends Component {
componentWillMount() {
this.props.fetchPeople();
}
@mattfordham
mattfordham / gist:5049581
Created February 27, 2013 17:05
ExpressionEngine Capistrano deploy.rb
set :application, "example.com"
server "SERVER_ADDRESS_GOES_HERE", :app, :web, :db, :primary => true
set :address, "SERVER_ADDRESS_GOES_HERE"
set :deploy_to, "/var/www/vhosts/domain.com/#{application}"
set :user, "user_name"
set :use_sudo, false
default_run_options[:pty] = true
web1:
name: my-app
php_version: 5.3.5
document_root: public
shared_writable_dirs:
- backups
php_extensions:
- mysql
- curl
cron:
set :application, "example.com"
server "209.61.142.41", :app, :web, :db, :primary => true
set :deploy_to, "/srv/www/#{application}"
set :user, "root"
default_run_options[:pty] = true
set :repository, "ssh://git@bitbucket.org/mattfordham/capistrano.git"
set :scm, :git
git add .
git commit -m "I changed some stuff"
git push origin master
# The will tell Capistrano to run the custom "create_symlinks" and "set_permissions" tasks after running the normal "deploy" task
after "deploy", "deploy:create_symlinks", "deploy:set_permissions"
# Override and add some deploy tasks in the "deploy namespace"
namespace :deploy do
desc "This is here to override the original :restart"
task :restart, :roles => :app do
# do nothing but override the default
end
cap deploy:check
cd /var/www/example.com
mkdir releases
mkdir shared
# This will end up being the directory things are deployed under
set :application, "example.com"
# Change to your ip address
server "123.123.123.123", :app, :web, :db, :primary => true
# This is the location on the server where things will be deployed to. #{application} will be replaced by whatever your set for :application above.
set :deploy_to, "/var/www/#{application}"
# About the user you created on the server