This is an automated email from the ASF dual-hosted git repository.
rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new eb3cd07 docker fixes
eb3cd07 is described below
commit eb3cd07d6d418c93d7df9edec3fb9c34d370e132
Author: Sam Ruby <[email protected]>
AuthorDate: Mon Nov 25 21:33:19 2019 -0500
docker fixes
---
Rakefile | 11 ++++++++---
config/setupmymac | 7 +++----
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/Rakefile b/Rakefile
index 95011bc..5c98adb 100644
--- a/Rakefile
+++ b/Rakefile
@@ -275,7 +275,7 @@ namespace :docker do
task :update => :build do
Dir.chdir File.join(__dir__, 'docker') do
sh 'docker-compose run --entrypoint ' +
- %('bash -c "git pull; rake update"') +
+ %('bash -c "rake docker:scaffold; git pull; rake update"') +
' web'
end
end
@@ -292,7 +292,7 @@ namespace :docker do
end
end
- task :entrypoint do
+ task :scaffold do
# set up symlinks from /root to user's home directory
home = ENV['HOST_HOME']
if home and File.exist? home
@@ -325,7 +325,12 @@ namespace :docker do
rescue
end
- sh 'ruby -I lib -r whimsy/asf -e "ASF::LDAP.configure"'
+ unless File.read('/etc/ldap/ldap.conf').include? 'asf-ldap-client.pem'
+ sh 'ruby -I lib -r whimsy/asf -e "ASF::LDAP.configure"'
+ end
+ end
+
+ task :entrypoint => :scaffold do
sh 'apache2ctl -DFOREGROUND'
end
end
diff --git a/config/setupmymac b/config/setupmymac
index 6382142..8bfdaae 100755
--- a/config/setupmymac
+++ b/config/setupmymac
@@ -41,14 +41,14 @@ OptionParser.new do |opts|
end
end.parse!
-user = option != :user ? '_www' : (ENV['SUDO_USER'] || Etc.getlogin)
+user = option == :www ? '_www' : (ENV['SUDO_USER'] || Etc.getlogin)
uid = Etc.getpwnam(user).uid
gid = Etc.getpwnam(user).gid
group = Etc.getgrgid(gid).name
### Install Homebrew
-if Process.uid != 0
+if Process.uid != 0 and option != :docker
if `which brew`.empty?
script =
'https://raw.githubusercontent.com/Homebrew/install/master/install'
eval `curl -fsSL #{script}`
@@ -59,7 +59,7 @@ end
## Install Node.js
-if Process.uid != 0
+if Process.uid != 0 and option != :docker
system 'brew install node' if `which node`.empty?
system 'npm install -g npm' if `which npm`.empty?
@@ -67,7 +67,6 @@ if Process.uid != 0
`svn --version`
# Install passenger
-
if `which passenger`.empty?
system 'brew install passenger'
end