Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gitlab
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
certo
gitlab
Commits
c9097a5b
Commit
c9097a5b
authored
Aug 16, 2021
by
Vladimir Bashkirtsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved gitlab to /srv
parent
abaed0de
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
59 deletions
+57
-59
Makefile
Makefile
+57
-59
No files found.
Makefile
View file @
c9097a5b
...
@@ -8,7 +8,7 @@ all: database-config resque-yml nginx-conf
...
@@ -8,7 +8,7 @@ all: database-config resque-yml nginx-conf
rm
/etc/gshadow
rm
/etc/gshadow
mv
-v
/data/etc/gshadow /etc/gshadow
mv
-v
/data/etc/gshadow /etc/gshadow
groupadd
-g
101 git
groupadd
-g
101 git
useradd
-c
"GitLab"
-g
git
-u
101
-p
any git
useradd
-c
"GitLab"
-g
git
-u
101
-p
any
-d
/srv/gitlab
git
rm
/etc/passwd-
rm
/etc/passwd-
rm
/etc/group-
rm
/etc/group-
rm
/etc/shadow-
rm
/etc/shadow-
...
@@ -32,62 +32,51 @@ all: database-config resque-yml nginx-conf
...
@@ -32,62 +32,51 @@ all: database-config resque-yml nginx-conf
mkdir
gitlab-home
mkdir
gitlab-home
chown
-R
git.git
gitlab-home
chown
-R
git.git
gitlab-home
install
-v
-m755
-d
/home/git
-o
git
-g
git
install
-v
-m755
-d
/srv/gitlab
-o
git
-g
git
install
-v
-m755
-d
/srv/gitlab
-o
git
-g
git
ln
-s
/srv/gitlab
/home/git/gitlab
install
-v
-m755
-d
/var/lib/gitlab
-o
git
-g
git
install
-v
-m755
-d
/var/lib/gitlab
-o
git
-g
git
sudo
-u
git
-H
tar
xf
gitlab-foss-v13.1.0.tar.bz2
-C
/home/git/gitlab
--strip-components
=
1
sudo
-u
git
-H
tar
xf
gitlab-foss-v13.1.0.tar.bz2
-C
/srv/gitlab
--strip-components
=
1
sudo
-u
git
-H
patch
-Np1
-d
/home/git/gitlab
<
gitlab-foss-v13.1.0-gems_update.patch
sudo
-u
git
-H
patch
-Np1
-d
/srv/gitlab
<
gitlab-foss-v13.1.0-gems_update.patch
chown
-R
git.git
/home/git/gitlab
chown
-R
git.git
/srv/gitlab
cd
/home/git/gitlab
&&
sudo
-u
git
-H
mv
config/gitlab.yml.example
config/gitlab.yml
cd
/srv/gitlab
&&
sudo
-u
git
-H
mv
config/gitlab.yml.example
config/gitlab.yml
cd
/home/git/gitlab
&&
sed
-e
"s|/home/git/repositories/|/var/lib/gitlab/repositories/|"
-i
config/gitlab.yml
cd
/srv/gitlab
&&
sed
-e
"s|/home/git/.ssh/|/srv/gitlab/.ssh/|"
-i
config/gitlab.yml
cd
/home/git/gitlab
&&
sudo
-u
git
-H
mv
config/secrets.yml.example
config/secrets.yml
cd
/srv/gitlab
&&
sed
-e
"s|/home/git/repositories/|/var/lib/gitlab/repositories/|"
-i
config/gitlab.yml
cd
/home/git/gitlab
&&
chown
-R
git
log/
cd
/srv/gitlab
&&
sed
-e
"s|/home/git|/srv|"
-i
config/gitlab.yml
cd
/home/git/gitlab
&&
chown
-R
git
tmp/
cd
/srv/gitlab
&&
sudo
-u
git
-H
mv
config/secrets.yml.example
config/secrets.yml
cd
/home/git/gitlab
&&
chmod
-R
u+rwX,go-w
log/
cd
/srv/gitlab
&&
chown
-R
git
log/
cd
/home/git/gitlab
&&
chmod
-R
u+rwX
tmp/
cd
/srv/gitlab
&&
chown
-R
git
tmp/
cd
/home/git/gitlab
&&
chmod
-R
u+rwX
tmp/pids/
cd
/srv/gitlab
&&
chmod
-R
u+rwX,go-w
log/
cd
/home/git/gitlab
&&
chmod
-R
u+rwX
tmp/sockets/
cd
/srv/gitlab
&&
chmod
-R
u+rwX
tmp/
cd
/home/git/gitlab
&&
sudo
-u
git
-H
mkdir
-p
public/uploads/
cd
/srv/gitlab
&&
chmod
-R
u+rwX
tmp/pids/
cd
/home/git/gitlab
&&
chmod
0700
public/uploads
cd
/srv/gitlab
&&
chmod
-R
u+rwX
tmp/sockets/
cd
/home/git/gitlab
&&
chmod
-R
u+rwX
builds/
cd
/srv/gitlab
&&
sudo
-u
git
-H
mkdir
-p
public/uploads/
cd
/home/git/gitlab
&&
chmod
-R
u+rwX
shared/artifacts/
cd
/srv/gitlab
&&
chmod
0700
public/uploads
cd
/home/git/gitlab
&&
chmod
-R
ug+rwX
shared/pages/
cd
/srv/gitlab
&&
chmod
-R
u+rwX
builds/
cd
/home/git/gitlab
&&
sudo
-u
git
-H
mv
config/puma.rb.example
config/puma.rb
cd
/srv/gitlab
&&
chmod
-R
u+rwX
shared/artifacts/
sudo
-u
git
-H
git
config
--global
core.autocrlf
input
cd
/srv/gitlab
&&
chmod
-R
ug+rwX
shared/pages/
sudo
-u
git
-H
git
config
--global
gc.auto
0
cd
/srv/gitlab
&&
sudo
-u
git
-H
mv
config/puma.rb.example
config/puma.rb
sudo
-u
git
-H
git
config
--global
repack.writeBitmaps
true
cd
/srv/gitlab
&&
sed
-e
"s|/home/git|/srv|"
-i
config/puma.rb
sudo
-u
git
-H
git
config
--global
receive.advertisePushOptions
true
sudo
-u
git
-H
git
config
--global
core.fsyncObjectFiles
true
@echo
"$$DATABASE_CONFIG"
>
/srv/gitlab/config/database.yml
cd
/srv/gitlab
&&
chown
-R
git.git
config/database.yml
@echo
"$$DATABASE_CONFIG"
>
/home/git/gitlab/config/database.yml
cd
/srv/gitlab
&&
sudo
-u
git
-H
chmod
o-rwx
config/database.yml
cd
/home/git/gitlab
&&
chown
-R
git.git
config/database.yml
cd
/home/git/gitlab
&&
sudo
-u
git
-H
chmod
o-rwx
config/database.yml
@echo
"$$RESQUE_YML"
>
/srv/gitlab/config/resque.yml
cd
/srv/gitlab
&&
chown
-R
git.git
config/resque.yml
@echo
"$$RESQUE_YML"
>
/home/git/gitlab/config/resque.yml
cd
/srv/gitlab
&&
sudo
-u
git
-H
chmod
o-rwx
config/resque.yml
cd
/home/git/gitlab
&&
chown
-R
git.git
config/resque.yml
cd
/home/git/gitlab
&&
sudo
-u
git
-H
chmod
o-rwx
config/resque.yml
cd
/home/git/gitlab
&&
sudo
-u
git
-H
HOME
=
$(CURDIR)
/gitlab-home bundle
install
--deployment
--without
development
test
mysql aws kerberos
cd /home/git/gitlab && sudo -u git -H HOME=$(CURDIR)/gitlab-home PATH=$$PATH
:
$(CURDIR)/../go/go/bin GOCACHE=$(CURDIR)/gitlab-home/gocache bundle exec rake gitlab:shell:install RAILS_ENV=production
mv
/home/git/gitlab-shell /srv/gitlab-shell
ln
-s
/srv/gitlab-shell /home/git/gitlab-shell
chown
-R
git.git /home/git/gitlab-shell
chmod
o+w
/srv
chmod
o+w
/srv
cd
/home/git/gitlab
&&
sudo
-u
git
-H
HOME
=
$(CURDIR)
/gitlab-home
PATH
=
$$
PATH:
$(CURDIR)
/../go/go/bin
GOCACHE
=
$(CURDIR)
/gitlab-home/gocache bundle
exec
rake
"gitlab:workhorse:install[/srv/gitlab-workhorse]"
RAILS_ENV
=
production
cd
/srv/gitlab
&&
sudo
-u
git
-H
HOME
=
$(CURDIR)
/gitlab-home bundle
install
--deployment
--without
development
test
mysql aws kerberos
ln
-s
/srv/gitlab-workhorse /home/git/gitlab-workhorse
cd /srv/gitlab && sudo -u git -H HOME=$(CURDIR)/gitlab-home PATH=$$PATH
:
$(CURDIR)/../go/go/bin GOCACHE=$(CURDIR)/gitlab-home/gocache bundle exec rake gitlab:shell:install RAILS_ENV=production
chown
-R
git.git /home/git/gitlab-workhorse
cd
/srv/gitlab
&&
sudo
-u
git
-H
HOME
=
$(CURDIR)
/gitlab-home
PATH
=
$$
PATH:
$(CURDIR)
/../go/go/bin
GOCACHE
=
$(CURDIR)
/gitlab-home/gocache bundle
exec
rake
"gitlab:workhorse:install[/srv/gitlab-workhorse]"
RAILS_ENV
=
production
cd
/home/git/gitlab
&&
sudo
-u
git
-H
HOME
=
$(CURDIR)
/gitlab-home
PATH
=
$$
PATH:
$(CURDIR)
/../go/go/bin
GOCACHE
=
$(CURDIR)
/gitlab-home/gocache
VERBOSE
=
1 bundle
exec
rake
"gitlab:gitaly:install[/srv/gitaly,/var/lib/gitlab/repositories]"
RAILS_ENV
=
production
cd
/srv/gitlab
&&
sudo
-u
git
-H
HOME
=
$(CURDIR)
/gitlab-home
PATH
=
$$
PATH:
$(CURDIR)
/../go/go/bin
GOCACHE
=
$(CURDIR)
/gitlab-home/gocache
VERBOSE
=
1 bundle
exec
rake
"gitlab:gitaly:install[/srv/gitaly,/var/lib/gitlab/repositories]"
RAILS_ENV
=
production
ln
-s
/srv/gitaly /home/git/gitaly
chown
-R
git.git /home/git/gitaly
chmod
o-w /srv
chmod
o-w /srv
chmod
0700 /
home/git
/gitlab/tmp/sockets/private
chmod
0700 /
srv
/gitlab/tmp/sockets/private
chown
git /
home/git
/gitlab/tmp/sockets/private
chown
git /
srv
/gitlab/tmp/sockets/private
cd
/
home/git
/gitlab
&&
sudo
-u
git
-H
HOME
=
$(CURDIR)
/gitlab-home bundle
exec
rake gettext:compile
RAILS_ENV
=
production
cd
/
srv
/gitlab
&&
sudo
-u
git
-H
HOME
=
$(CURDIR)
/gitlab-home bundle
exec
rake gettext:compile
RAILS_ENV
=
production
cd
/
home/git
/gitlab
&&
sudo
-u
git
-H
HOME
=
$(CURDIR)
/gitlab-home yarn
install
--production
--pure-lockfile
cd
/
srv
/gitlab
&&
sudo
-u
git
-H
HOME
=
$(CURDIR)
/gitlab-home yarn
install
--production
--pure-lockfile
cd
/
home/git
/gitlab
&&
sudo
-u
git
-H
HOME
=
$(CURDIR)
/gitlab-home bundle
exec
rake gitlab:assets:compile
RAILS_ENV
=
production
NODE_ENV
=
production
NODE_OPTIONS
=
"--max-old-space-size=3072"
cd
/
srv
/gitlab
&&
sudo
-u
git
-H
HOME
=
$(CURDIR)
/gitlab-home bundle
exec
rake gitlab:assets:compile
RAILS_ENV
=
production
NODE_ENV
=
production
NODE_OPTIONS
=
"--max-old-space-size=3072"
sudo
-u
git
/usr/bin/redis-server
/etc/redis/redis.conf
--daemonize
yes
--supervised
no
sudo
-u
git
/usr/bin/redis-server
/etc/redis/redis.conf
--daemonize
yes
--supervised
no
install
-v
-m775
-o
postgres
-g
postgres
-d
/run/postgresql
install
-v
-m775
-o
postgres
-g
postgres
-d
/run/postgresql
...
@@ -96,19 +85,22 @@ all: database-config resque-yml nginx-conf
...
@@ -96,19 +85,22 @@ all: database-config resque-yml nginx-conf
sudo
-u
postgres
psql
-d
template1
-c
"CREATE EXTENSION IF NOT EXISTS pg_trgm;"
sudo
-u
postgres
psql
-d
template1
-c
"CREATE EXTENSION IF NOT EXISTS pg_trgm;"
sudo
-u
postgres
psql
-d
template1
-c
"CREATE EXTENSION IF NOT EXISTS btree_gist;"
sudo
-u
postgres
psql
-d
template1
-c
"CREATE EXTENSION IF NOT EXISTS btree_gist;"
sudo
-u
postgres
psql
-d
template1
-c
"CREATE DATABASE gitlabhq_production OWNER git;"
sudo
-u
postgres
psql
-d
template1
-c
"CREATE DATABASE gitlabhq_production OWNER git;"
sudo
-u
git
-H
sh
-c
"/
home/git/gitlab/bin/daemon_with_pidfile /home/git/gitlab/tmp/pids/gitaly.pid /home/git/gitaly/gitaly /home/git/gitaly/config.toml >> /home/git
/gitlab/log/gitaly.log 2>&1 &"
sudo
-u
git
-H
sh
-c
"/
srv/gitlab/bin/daemon_with_pidfile /srv/gitlab/tmp/pids/gitaly.pid /srv/gitaly/gitaly /srv/gitaly/config.toml >> /srv
/gitlab/log/gitaly.log 2>&1 &"
cd /
home/git
/gitlab && sudo -u git -H bundle exec rake gitlab
:
setup RAILS_ENV=production force=yes
cd /
srv
/gitlab && sudo -u git -H bundle exec rake gitlab
:
setup RAILS_ENV=production force=yes
cd
/
home/git
/gitlab
&&
sudo
-u
git
-H
HOME
=
$(CURDIR)
/gitlab-home
PATH
=
$$
PATH:
$(CURDIR)
/../go/go/bin
GOCACHE
=
$(CURDIR)
/gitlab-home/gocache bundle
exec
rake gitlab:env:info
RAILS_ENV
=
production
cd
/
srv
/gitlab
&&
sudo
-u
git
-H
HOME
=
$(CURDIR)
/gitlab-home
PATH
=
$$
PATH:
$(CURDIR)
/../go/go/bin
GOCACHE
=
$(CURDIR)
/gitlab-home/gocache bundle
exec
rake gitlab:env:info
RAILS_ENV
=
production
sudo
-u
postgres /usr/bin/pg_ctl
-s
-D
/srv/pgsql/data stop
-m
fast
sudo
-u
postgres /usr/bin/pg_ctl
-s
-D
/srv/pgsql/data stop
-m
fast
sudo
-u
git /usr/bin/redis-cli shutdown nosave
sudo
-u
git /usr/bin/redis-cli shutdown nosave
install
-v
-m644
/home/git/gitlab/lib/support/logrotate/gitlab
/etc/logrotate.d/gitlab
install
-v
-m644
/srv/gitlab/lib/support/logrotate/gitlab
/etc/logrotate.d/gitlab
sed
-e
"s|/home/git|/srv|"
-i
/etc/logrotate.d/gitlab
@echo
"$$NGINX_CONF"
>
/etc/nginx/nginx.conf
@echo
"$$NGINX_CONF"
>
/etc/nginx/nginx.conf
install
-v
-m644
/home/git/gitlab/lib/support/nginx/gitlab
/etc/nginx/gitlab.conf
install
-v
-m644
/srv/gitlab/lib/support/nginx/gitlab
/etc/nginx/gitlab.conf
sed
-e
"s|/home/git|/srv|"
-i
/etc/nginx/gitlab.conf
sed
-e
"s/YOUR_SERVER_FQDN/_/"
-i
/etc/nginx/gitlab.conf
sed
-e
"s/YOUR_SERVER_FQDN/_/"
-i
/etc/nginx/gitlab.conf
install
-v
-m755
/home/git/gitlab/lib/support/init.d/gitlab
/etc/init.d/gitlab
install
-v
-m755
/srv/gitlab/lib/support/init.d/gitlab
/etc/init.d/gitlab
install
-v
-m644
/home/git/gitlab/lib/support/init.d/gitlab.default.example
/etc/default/gitlab
sed
-e
"s/redis-server/redis/"
-i
/etc/init.d/gitlab
sed
-e
"s/redis-server/redis/"
-i
/etc/init.d/gitlab
install
-v
-m644
/srv/gitlab/lib/support/init.d/gitlab.default.example
/etc/default/gitlab
sed
-e
"s/\/home\/\(\$$app_user\|git\)/\/srv/"
-i
/etc/default/gitlab
systemctl
enable
gitlab.service
systemctl
enable
gitlab.service
rm
-rf
/usr/local/share/.yarnrc
rm
-rf
/usr/local/share/.yarnrc
...
@@ -125,7 +117,13 @@ all: database-config resque-yml nginx-conf
...
@@ -125,7 +117,13 @@ all: database-config resque-yml nginx-conf
done
;
\
done
;
\
done
done
ln
-s
/etc/init.d/gitlab
/home/git/gitlab/lib/support/init.d/gitlab
ln
-s
/etc/init.d/gitlab
/srv/gitlab/lib/support/init.d/gitlab
sudo
-u
git
-H
git
config
--global
core.autocrlf
input
sudo
-u
git
-H
git
config
--global
gc.auto
0
sudo
-u
git
-H
git
config
--global
repack.writeBitmaps
true
sudo
-u
git
-H
git
config
--global
receive.advertisePushOptions
true
sudo
-u
git
-H
git
config
--global
core.fsyncObjectFiles
true
rm
-rf
gitlab-home
rm
-rf
gitlab-home
umount
/tmp
umount
/tmp
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment