-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import conf files from openl10n/openl10n (< 0.2.0)
- Loading branch information
0 parents
commit 736c29d
Showing
12 changed files
with
182 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
BUNDLE_PATH: vendor | ||
BUNDLE_DISABLE_SHARED_GEMS: '1' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = LF | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/stages/* | ||
!/stages/deploy.rb.dist | ||
/vendor/* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Set the global configuration paths | ||
set :deploy_config_path, "config.rb" | ||
set :stage_config_path, "stages/" | ||
|
||
# Load DSL and Setup Up Stages | ||
require 'capistrano/setup' | ||
|
||
# Includes default deployment tasks | ||
require 'capistrano/deploy' | ||
require 'capistrano/composer' | ||
require 'capistrano/symfony' | ||
require 'capistrano/console' | ||
|
||
# Loads custom tasks from `lib/capistrano/tasks' if you have any defined. | ||
Dir.glob('tasks/*.rb').each { |f| import f } |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
source "https://rubygems.org" | ||
|
||
gem 'capistrano', '~> 3.2.1' | ||
gem 'capistrano-composer' | ||
gem 'capistrano-symfony' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
capistrano (3.2.1) | ||
i18n | ||
rake (>= 10.0.0) | ||
sshkit (~> 1.3) | ||
capistrano-composer (0.0.4) | ||
capistrano (>= 3.0.0.pre) | ||
capistrano-file-permissions (0.1.0) | ||
capistrano (>= 3.0.0) | ||
capistrano-symfony (0.4.0) | ||
capistrano (~> 3.1) | ||
capistrano-composer (~> 0.0.3) | ||
capistrano-file-permissions (~> 0.1.0) | ||
i18n (0.6.9) | ||
net-scp (1.2.1) | ||
net-ssh (>= 2.6.5) | ||
net-ssh (2.9.1) | ||
rake (10.3.2) | ||
sshkit (1.4.0) | ||
net-scp (>= 1.1.2) | ||
net-ssh (>= 2.8.0) | ||
term-ansicolor | ||
term-ansicolor (1.3.0) | ||
tins (~> 1.0) | ||
tins (1.3.0) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
capistrano (~> 3.2.1) | ||
capistrano-composer | ||
capistrano-symfony |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Config valid only for Capistrano 3.1 | ||
lock '3.2.1' | ||
|
||
set :application, 'Openl10n' | ||
|
||
# Log level | ||
set :log_level, :info | ||
|
||
# Shared files | ||
set :linked_files, %w{app/config/parameters.yml} | ||
|
||
# Shared directories | ||
set :linked_dirs, %w{app/logs web/uploads node_modules} | ||
|
||
set :permission_method, :chgrp | ||
set :use_set_permissions, true | ||
set :file_permissions_roles, :all | ||
set :file_permissions_paths, ['app/logs', 'app/cache'] | ||
set :file_permissions_users, ['www-data'] | ||
set :file_permissions_groups, ['www-data'] | ||
set :file_permissions_chmod_mode, "0777" | ||
|
||
# How many releases do we keep online | ||
set :keep_releases, 5 | ||
|
||
# Hooks before | ||
before 'deploy:starting', 'composer:install_executable' | ||
|
||
## Hooks after | ||
after 'deploy:finishing', 'deploy:cleanup' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Stage name | ||
set :stage, :production | ||
|
||
# Github repository | ||
set :repo_url, '[email protected]:openl10n/openl10n.git' | ||
set :branch, 'master' | ||
|
||
# Deploy directory | ||
set :deploy_to, '/var/www/translate.mydomain.tld' | ||
|
||
# SSHKit configuration | ||
SSHKit.config.command_map[:composer] = "#{shared_path.join("composer.phar")}" | ||
set :default_env, { | ||
path: ["#{shared_path}/node_modules/.bin", "$PATH"].join(":") | ||
} | ||
|
||
# Define servers | ||
server 'translate.mydomain.tld', user: 'root', roles: %w{php_fpm nginx} | ||
|
||
set :composer_install_flags, '--no-dev --verbose --prefer-dist --optimize-autoloader --no-progress' | ||
|
||
# If you are not using nginx with php-fpm you can remove theses lines an replace it by an apache graceful command | ||
after 'deploy:finishing', 'php_fpm:reload' | ||
after 'deploy:finishing', 'nginx:reload' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
namespace :assets do | ||
|
||
task :install do | ||
on release_roles :all do | ||
within release_path do | ||
execute :npm, "install" | ||
end | ||
end | ||
end | ||
|
||
task :build do | ||
on release_roles :all do | ||
within release_path do | ||
execute :gulp, "build --prod" | ||
end | ||
end | ||
end | ||
|
||
after 'deploy:updated', 'assets:install' | ||
after 'deploy:updated', 'assets:build' | ||
|
||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace :database do | ||
|
||
task :migrate do | ||
invoke 'symfony:console', 'doctrine:schema:update', '--force' | ||
#invoke 'symfony:console', 'doctrine:migrations:migrate', '--no-interaction' | ||
end | ||
|
||
after 'deploy:published', 'database:migrate' | ||
|
||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
namespace :nginx do | ||
|
||
%w[start stop restart reload].each do |command| | ||
desc "#{command.capitalize} nginx service" | ||
task command do | ||
on roles :nginx do | ||
if command === 'stop' || (test "sudo nginx -t") | ||
execute :sudo, "service nginx #{command}" | ||
end | ||
end | ||
end | ||
end | ||
|
||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
namespace :php_fpm do | ||
|
||
%w[start stop restart reload].each do |command| | ||
desc "#{command.capitalize} php5-fpm service" | ||
task command do | ||
on roles :php_fpm do | ||
execute :sudo, "service php5-fpm #{command}" | ||
end | ||
end | ||
end | ||
|
||
end |