-
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.
Merge pull request #7 from rotati/configure-asset-sync
configured asset sync
- Loading branch information
Showing
7 changed files
with
64 additions
and
124 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 |
---|---|---|
|
@@ -13,5 +13,13 @@ OSCAR_M_E_DASHBOARD_DATABASE_NAME='' | |
OSCAR_M_E_DASHBOARD_DATABASE_USERNAME='' | ||
OSCAR_M_E_DASHBOARD_DATABASE_PASSWORD='' | ||
|
||
FOG_DIRECTORY= | ||
AWS_ACCESS_KEY_ID= | ||
AWS_SECRET_ACCESS_KEY= | ||
FOG_REGION= | ||
|
||
AWS_SES_USER_NAME= | ||
AWS_SES_PASSWORD= | ||
|
||
SENDER_EMAIL=[email protected] | ||
BROWSER=/usr/local/bin/firefox-bin -new-tab '%s':/usr/local/bin/google-chrome-stable |
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
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
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 |
---|---|---|
@@ -1,61 +1,2 @@ | ||
# server-based syntax | ||
# ====================== | ||
# Defines a single server with a list of roles and multiple properties. | ||
# You can define all roles on a single server, or split them: | ||
|
||
# server "example.com", user: "deploy", roles: %w{app db web}, my_property: :my_value | ||
# server "example.com", user: "deploy", roles: %w{app web}, other_property: :other_value | ||
# server "db.example.com", user: "deploy", roles: %w{db} | ||
|
||
|
||
|
||
# role-based syntax | ||
# ================== | ||
|
||
# Defines a role with one or multiple servers. The primary server in each | ||
# group is considered to be the first unless any hosts have the primary | ||
# property set. Specify the username and a domain or IP for the server. | ||
# Don't use `:all`, it's a meta role. | ||
|
||
# role :app, %w{[email protected]}, my_property: :my_value | ||
# role :web, %w{[email protected] [email protected]}, other_property: :other_value | ||
# role :db, %w{[email protected]} | ||
|
||
|
||
|
||
# Configuration | ||
# ============= | ||
# You can set any configuration variable like in config/deploy.rb | ||
# These variables are then only loaded and set in this stage. | ||
# For available Capistrano configuration variables see the documentation page. | ||
# http://capistranorb.com/documentation/getting-started/configuration/ | ||
# Feel free to add new variables to customise your setup. | ||
|
||
|
||
|
||
# Custom SSH Options | ||
# ================== | ||
# You may pass any option but keep in mind that net/ssh understands a | ||
# limited set of options, consult the Net::SSH documentation. | ||
# http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start | ||
# | ||
# Global options | ||
# -------------- | ||
# set :ssh_options, { | ||
# keys: %w(/home/rlisowski/.ssh/id_rsa), | ||
# forward_agent: false, | ||
# auth_methods: %w(password) | ||
# } | ||
# | ||
# The server-based syntax can be used to override options: | ||
# ------------------------------------ | ||
# server "example.com", | ||
# user: "user_name", | ||
# roles: %w{web app}, | ||
# ssh_options: { | ||
# user: "user_name", # overrides user setting above | ||
# keys: %w(/home/user_name/.ssh/id_rsa), | ||
# forward_agent: false, | ||
# auth_methods: %w(publickey password) | ||
# # password: "please use keys" | ||
# } | ||
set :stage, :production | ||
server '18.136.64.117', user: 'deployer', roles: %w{app web db} |
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 |
---|---|---|
@@ -1,61 +1,2 @@ | ||
# server-based syntax | ||
# ====================== | ||
# Defines a single server with a list of roles and multiple properties. | ||
# You can define all roles on a single server, or split them: | ||
|
||
# server "example.com", user: "deploy", roles: %w{app db web}, my_property: :my_value | ||
# server "example.com", user: "deploy", roles: %w{app web}, other_property: :other_value | ||
# server "db.example.com", user: "deploy", roles: %w{db} | ||
|
||
|
||
|
||
# role-based syntax | ||
# ================== | ||
|
||
# Defines a role with one or multiple servers. The primary server in each | ||
# group is considered to be the first unless any hosts have the primary | ||
# property set. Specify the username and a domain or IP for the server. | ||
# Don't use `:all`, it's a meta role. | ||
|
||
# role :app, %w{[email protected]}, my_property: :my_value | ||
# role :web, %w{[email protected] [email protected]}, other_property: :other_value | ||
# role :db, %w{[email protected]} | ||
|
||
|
||
|
||
# Configuration | ||
# ============= | ||
# You can set any configuration variable like in config/deploy.rb | ||
# These variables are then only loaded and set in this stage. | ||
# For available Capistrano configuration variables see the documentation page. | ||
# http://capistranorb.com/documentation/getting-started/configuration/ | ||
# Feel free to add new variables to customise your setup. | ||
|
||
|
||
|
||
# Custom SSH Options | ||
# ================== | ||
# You may pass any option but keep in mind that net/ssh understands a | ||
# limited set of options, consult the Net::SSH documentation. | ||
# http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start | ||
# | ||
# Global options | ||
# -------------- | ||
# set :ssh_options, { | ||
# keys: %w(/home/rlisowski/.ssh/id_rsa), | ||
# forward_agent: false, | ||
# auth_methods: %w(password) | ||
# } | ||
# | ||
# The server-based syntax can be used to override options: | ||
# ------------------------------------ | ||
# server "example.com", | ||
# user: "user_name", | ||
# roles: %w{web app}, | ||
# ssh_options: { | ||
# user: "user_name", # overrides user setting above | ||
# keys: %w(/home/user_name/.ssh/id_rsa), | ||
# forward_agent: false, | ||
# auth_methods: %w(publickey password) | ||
# # password: "please use keys" | ||
# } | ||
set :stage, :staging | ||
server '18.136.64.117', user: 'deployer', roles: %w{app web db} |
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
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 @@ | ||
if defined?(AssetSync) | ||
if Rails.env.production? || Rails.env.staging? | ||
AssetSync.configure do |config| | ||
config.fog_provider = 'AWS' | ||
config.fog_directory = ENV['FOG_DIRECTORY'] | ||
config.aws_access_key_id = ENV['AWS_ACCESS_KEY_ID'] | ||
config.aws_secret_access_key = ENV['AWS_SECRET_ACCESS_KEY'] | ||
config.existing_remote_files = 'delete' | ||
config.fog_region = ENV['FOG_REGION'] | ||
config.gzip_compression = true | ||
config.custom_headers = { '.*' => { cache_control: 'max-age=315576000', expires: 1.year.from_now.httpdate } } | ||
end | ||
end | ||
end |