Commit e3e5538e authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

gitlab needs extra memory -swap added; specified location of temporary go; created temporary home

parent f8bb601d
......@@ -22,6 +22,14 @@ all: database-config
mv -v /etc/gshadow /data/etc/gshadow
ln -sv /data/etc/gshadow /etc/gshadow
dd if=/dev/zero of=swap bs=1048576 count=1024
chmod 600 swap
mkswap swap
swapon swap
mkdir tmp
mount --bind tmp /tmp
mkdir gitlab-home
tar xf gitlab-foss-v13.1.0.tar.bz2 -C /srv/www --strip-components=1
rm -rf /srv/www/index.html
......@@ -30,21 +38,27 @@ all: database-config
mkdir -p /srv/www/public/uploads
chmod 0700 /srv/www/public/uploads
cd /srv/www && mv config/puma.rb.example config/puma.rb
HOME="/tmp" git config --global core.autocrlf input
HOME="/tmp" git config --global gc.auto 0
HOME="/tmp" git config --global repack.writeBitmaps true
HOME="/tmp" git config --global receive.advertisePushOptions true
HOME="/tmp" git config --global core.fsyncObjectFiles true
HOME=$(CURDIR)/gitlab-home git config --global core.autocrlf input
HOME=$(CURDIR)/gitlab-home git config --global gc.auto 0
HOME=$(CURDIR)/gitlab-home git config --global repack.writeBitmaps true
HOME=$(CURDIR)/gitlab-home git config --global receive.advertisePushOptions true
HOME=$(CURDIR)/gitlab-home git config --global core.fsyncObjectFiles true
cd /srv/www && mv config/resque.yml.example config/resque.yml
@echo "$$DATABASE_CONFIG" > /srv/www/config/database.yml
cd /srv/www && HOME="/tmp" bundle install --deployment --without development test mysql aws kerberos
cd /srv/www && HOME="/tmp" GOPATH=$(CURDIR)/../go/go GOCACHE=/tmp/gocache bundle exec rake gitlab:shell:install RAILS_ENV=production
cd /srv/www && HOME="/tmp" bundle exec rake "gitlab:workhorse:install[/srv/www/gitlab-workhorse]" RAILS_ENV=production
cd /srv/www && HOME="/tmp" bundle exec rake "gitlab:gitaly:install[/srv/www/gitaly,/srv/www/repositories]" RAILS_ENV=production
cd /srv/www && HOME="/tmp" yarn install --production --pure-lockfile
cd /srv/www && HOME="/tmp" bundle exec rake gitlab:assets:compile RAILS_ENV=production NODE_ENV=production
cd /srv/www && HOME=$(CURDIR)/gitlab-home bundle install --deployment --without development test mysql aws kerberos
cd /srv/www && HOME=$(CURDIR)/gitlab-home PATH=$$PATH:$(CURDIR)/../go/go/bin GOCACHE=$(CURDIR)/gitlab-home/gocache bundle exec rake gitlab:shell:install RAILS_ENV=production
cd /srv/www && HOME=$(CURDIR)/gitlab-home PATH=$$PATH:$(CURDIR)/../go/go/bin GOCACHE=$(CURDIR)/gitlab-home/gocache bundle exec rake "gitlab:workhorse:install[/srv/www/gitlab-workhorse]" RAILS_ENV=production
cd /srv/www && HOME=$(CURDIR)/gitlab-home bundle exec rake "gitlab:gitaly:install[/srv/www/gitaly,/srv/www/repositories]" RAILS_ENV=production
cd /srv/www && HOME=$(CURDIR)/gitlab-home yarn install --production --pure-lockfile
cd /srv/www && HOME=$(CURDIR)/gitlab-home bundle exec rake gitlab:assets:compile RAILS_ENV=production NODE_ENV=production
rm -rf gitlab-home
umount /tmp
rm -rf tmp
swapoff swap
rm -rf swap
postinstall:
install -v -m775 -o postgres -g postgres -d /run/postgresql
......
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