Commit 50793218 authored by Kirill Smelkov's avatar Kirill Smelkov

X start linking to actual config files + gitlab-rails executes in shadow root

parent 4ec7c88e
......@@ -27,12 +27,19 @@ home = $${buildout:directory}
bin = $${:home}/bin
etc = $${:home}/etc
var = $${:home}/var
log = $${:home}/log
log = $${:var}/log
# slapos startup/service/promies scripts live here:
startup = $${:etc}/run
service = $${:etc}/service
promise = $${:etc}/promise
# gitlab: etc/ log/ ...
[gitlab]
recipe = slapos.cookbook:mkdirectory
etc = $${directory:etc}/gitlab
log = $${directory:log}/gitlab
var = $${directory:var}/gitlab
# TODO log: logrotate
......@@ -54,12 +61,16 @@ environment =
[gitlab-rails]
<= gitlab-bin
# NOTE sys.argv[1:] implicityly appended
command-line = ${bundler-4gitlab:bundle} exec rails
command-line =
${bundler-4gitlab:bundle} exec sh -c
'cd $${gitlab-root-shadow:location} && rails "$@"' rails
[gitlab-rake]
<= gitlab-bin
# NOTE sys.argv[1:] implicityly appended
command-line = ${bundler-4gitlab:bundle} exec rake
command-line =
${bundler-4gitlab:bundle} exec sh -c
'cd $${gitlab-root-shadow:location} && rake "$@"' rake
# Gitlab/Rails operation is tighted that config/ lives inside code.
......@@ -80,28 +91,28 @@ command =
for i in ${gitlab-repository:location}/* ${gitlab-repository:location}/.[a-z]* ; do ln -s $i ; done &&
# secret* tmp/ log/
rm -f .secret .gitlab_shell_secret log tmp &&
ln -s AAA/.secret . &&
ln -s $${gitlab:etc}/secret .secret &&
ln -s AAA/.gitlab_shell_secret . &&
ln -s $${directory:log}/gitlab log &&
ln -s AAA/tmp . &&
ln -s $${gitlab:log} log &&
ln -s $${gitlab:var}/tmp . &&
# config/
rm config && mkdir config && cd config &&
for i in ${gitlab-repository:location}/config/* ; do ln -s $i ; done &&
ln -s AAA/unicorn.rb . &&
ln -s AAA/gitlab.yml . &&
ln -s AAA/database.yml . &&
ln -s AAA/resque.yml . &&
ln -s $${gitlab:etc}/unicorn.rb . &&
ln -s $${gitlab:etc}/gitlab.yml . &&
ln -s $${gitlab:etc}/database.yml . &&
ln -s $${gitlab:etc}/resque.yml . &&
# config/initializers/
rm initializers && mkdir initializers && cd initializers &&
for i in ${gitlab-repository:location}/config/initializers/* ; do ln -s $i ; done &&
ln -s AAA/rack_attack.rb . &&
ln -s AAA/smtp_settings.rb . &&
ln -s $${gitlab:etc}/rack_attack.rb . &&
ln -s $${gitlab:etc}/smtp_settings.rb . &&
# public/
cd ../../ &&
rm public && mkdir public && cd public &&
for i in ${gitlab-repository:location}/public/* ; do ln -s $i ; done &&
rm uploads &&
ln -s $${directory:var}/gitlab-uploads uploads &&
ln -s $${gitlab:var}/uploads . &&
true
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment