Skip to content

Commit

Permalink
Merge pull request #79 from engineyard/php
Browse files Browse the repository at this point in the history
[FB-967] PHP
  • Loading branch information
Dimitris authored Sep 14, 2019
2 parents a2d173f + b8011ae commit bf94d61
Show file tree
Hide file tree
Showing 30 changed files with 3,014 additions and 187 deletions.
8 changes: 8 additions & 0 deletions cookbooks/app-logs/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
recursive true
end

directory "create shared directory to symlink log" do
path "/data/#{app_name}/shared"
owner node["owner_name"]
group node["owner_name"]
mode 0755
recursive true
end

link "/data/#{app_name}/shared/log" do
to "/var/log/engineyard/apps/#{app_name}"
owner node["owner_name"]
Expand Down
1 change: 1 addition & 0 deletions cookbooks/app/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
depends 'ruby'
depends 'ey-db-libs'
depends 'haproxy'
depends 'php'

=begin
depends 'ey-lib'
Expand Down
2 changes: 1 addition & 1 deletion cookbooks/app/recipes/prep.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
end

include_recipe 'app::remove'
include_recipe 'app::create'
include_recipe "app-logs"
include_recipe 'app::create'
include_recipe "ey-db-libs"
include_recipe "haproxy"
18 changes: 14 additions & 4 deletions cookbooks/ey-cron/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,24 @@
only_if node['dna']['crons'].empty?
end

cron_header = <<-CRON
# begin-ey-cron-header This is a delimeter. DO NOT DELETE
cron_header = ""
if node.engineyard.environment.ruby?
cron_header = <<-CRON
# begin-ey-cron-header This is a delimiter. DO NOT DELETE
PATH=/opt/rubies/ruby-#{node['ruby']['version']}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RAILS_ENV="#{node.engineyard.environment['framework_env']}"
RACK_ENV="#{node.engineyard.environment['framework_env']}"
# end-ey-cron-header This is a delimeter. DO NOT DELETE
CRON
# end-ey-cron-header This is a delimiter. DO NOT DELETE
CRON
elsif node.engineyard.environment['stack_name'].match /nginx_fpm/
cron_header = <<-CRON
# begin-ey-cron-header This is a delimiter. DO NOT DELETE
PHP_ENV="#{node.engineyard.environment['framework_env']}"
# end-ey-cron-header This is a delimiter. DO NOT DELETE
CRON
end

file "/tmp/cron_header" do
content cron_header
Expand Down
Loading

0 comments on commit bf94d61

Please sign in to comment.