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
5928a554
Commit
5928a554
authored
Apr 02, 2021
by
Vladimir Bashkirtsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
We should install gitlab into /srv/gitlab
parent
300258de
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
477 additions
and
489 deletions
+477
-489
Makefile
Makefile
+48
-60
gitlab.groups
gitlab.groups
+429
-429
No files found.
Makefile
View file @
5928a554
all
:
database-config
httpd-conf
all
:
database-config
rm
/etc/passwd
rm
/etc/passwd
mv
-v
/data/etc/passwd /etc/passwd
mv
-v
/data/etc/passwd /etc/passwd
rm
/etc/group
rm
/etc/group
...
@@ -8,7 +8,7 @@ all: database-config httpd-conf
...
@@ -8,7 +8,7 @@ all: database-config httpd-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"
-d
/srv/
www
-g
git
-s
/bin/false
-u
101 git
useradd
-c
"GitLab"
-d
/srv/
gitlab
-g
git
-s
/bin/false
-u
101 git
rm
/etc/passwd-
rm
/etc/passwd-
rm
/etc/group-
rm
/etc/group-
rm
/etc/shadow-
rm
/etc/shadow-
...
@@ -30,36 +30,52 @@ all: database-config httpd-conf
...
@@ -30,36 +30,52 @@ all: database-config httpd-conf
mount
--bind
tmp
/tmp
mount
--bind
tmp
/tmp
mkdir
gitlab-home
mkdir
gitlab-home
tar
xf
gitlab-foss-v13.1.0.tar.bz2
-C
/srv/www
--strip-components
=
1
install
-v
-m755
-d
/srv/gitlab
-o
git
-g
git
patch
-Np1
-d
/srv/www
<
gitlab-foss-v13.1.0-gems_update.patch
sudo
-u
git
-H
tar
xf
gitlab-foss-v13.1.0.tar.bz2
-C
/srv/gitlab
--strip-components
=
1
rm
-rf
/srv/www/index.html
sudo
-u
git
-H
patch
-Np1
-d
/srv/gitlab
<
gitlab-foss-v13.1.0-gems_update.patch
chown
-R
git.git
/srv/gitlab
cd
/srv/www
&&
mv
config/gitlab.yml.example
config/gitlab.yml
cd
/srv/www
&&
mv
config/secrets.yml.example
config/secrets.yml
cd
/srv/gitlab
&&
sudo
-u
git
-H
mv
config/gitlab.yml.example
config/gitlab.yml
mkdir
-p
/srv/www/public/uploads
cd
/srv/gitlab
&&
sudo
-u
git
-H
mv
config/secrets.yml.example
config/secrets.yml
chmod
0700
/srv/www/public/uploads
cd
/srv/gitlab
&&
chown
-R
git
log/
cd
/srv/www
&&
mv
config/puma.rb.example
config/puma.rb
cd
/srv/gitlab
&&
chown
-R
git
tmp/
HOME
=
$(CURDIR)
/gitlab-home git config
--global
core.autocrlf input
cd
/srv/gitlab
&&
chmod
-R
u+rwX,go-w
log/
HOME
=
$(CURDIR)
/gitlab-home git config
--global
gc.auto 0
cd
/srv/gitlab
&&
chmod
-R
u+rwX
tmp/
HOME
=
$(CURDIR)
/gitlab-home git config
--global
repack.writeBitmaps
true
cd
/srv/gitlab
&&
chmod
-R
u+rwX
tmp/pids/
HOME
=
$(CURDIR)
/gitlab-home git config
--global
receive.advertisePushOptions
true
cd
/srv/gitlab
&&
chmod
-R
u+rwX
tmp/sockets/
HOME
=
$(CURDIR)
/gitlab-home git config
--global
core.fsyncObjectFiles
true
cd
/srv/gitlab
&&
sudo
-u
git
-H
mkdir
-p
public/uploads/
cd
/srv/www
&&
mv
config/resque.yml.example
config/resque.yml
cd
/srv/gitlab
&&
chmod
0700
public/uploads
cd
/srv/gitlab
&&
chmod
-R
u+rwX
builds/
@echo
"$$DATABASE_CONFIG"
>
/srv/www/config/database.yml
cd
/srv/gitlab
&&
chmod
-R
u+rwX
shared/artifacts/
cd
/srv/gitlab
&&
chmod
-R
ug+rwX
shared/pages/
cd
/srv/www
&&
HOME
=
$(CURDIR)
/gitlab-home bundle
install
--deployment
--without
development
test
mysql aws kerberos
cd
/srv/gitlab
&&
sudo
-u
git
-H
mv
config/puma.rb.example
config/puma.rb
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
sudo
-u
git
-H
git
config
--global
core.autocrlf
input
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
sudo
-u
git
-H
git
config
--global
gc.auto
0
cd
/srv/www
&&
HOME
=
$(CURDIR)
/gitlab-home bundle
exec
rake
"gitlab:gitaly:install[/srv/www/gitaly,/srv/www/repositories]"
RAILS_ENV
=
production
sudo
-u
git
-H
git
config
--global
repack.writeBitmaps
true
cd
/srv/www
&&
HOME
=
$(CURDIR)
/gitlab-home yarn
install
--production
--pure-lockfile
sudo
-u
git
-H
git
config
--global
receive.advertisePushOptions
true
cd
/srv/www
&&
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
-H
git
config
--global
core.fsyncObjectFiles
true
cd
/srv/gitlab
&&
sudo
-u
git
-H
mv
config/resque.yml.example
config/resque.yml
@echo
"$$DATABASE_CONFIG"
>
/srv/gitlab/config/database.yml
cd
/srv/gitlab
&&
chown
-R
git.git
config/database.yml
cd
/srv/gitlab
&&
sudo
-u
git
-H
chmod
o-rwx
config/database.yml
cd
/srv/gitlab
&&
sudo
-u
git
-H
bundle
install
--deployment
--without
development
test
mysql
aws
kerberos
cd /srv/gitlab && sudo -u git -H PATH=$$PATH
:
$(CURDIR)/../go/go/bin GOCACHE=$(CURDIR)/gitlab-home/gocache bundle exec rake gitlab:shell:install RAILS_ENV=production
cd
/srv/gitlab
&&
sudo
-u
git
-H
PATH
=
$$
PATH:
$(CURDIR)
/../go/go/bin
GOCACHE
=
$(CURDIR)
/gitlab-home/gocache bundle
exec
rake
"gitlab:workhorse:install[/srv/gitlab/gitlab-workhorse]"
RAILS_ENV
=
production
cd
/srv/gitlab
&&
sudo
-u
git
-H
bundle
exec
rake
"gitlab:gitaly:install[/srv/gitlab/gitaly,/srv/gitlab/repositories]"
RAILS_ENV
=
production
chmod
0700 /srv/gitlab/tmp/sockets/private
chown
git /srv/gitlab/tmp/sockets/private
cd
/srv/gitlab
&&
sudo
-u
git
-H
bundle
exec
rake gitlab:env:info
RAILS_ENV
=
production
cd
/srv/gitlab
&&
sudo
-u
git
-H
bundle
exec
rake gettext:compile
RAILS_ENV
=
production
cd
/srv/gitlab
&&
sudo
-u
git
-H
yarn
install
--production
--pure-lockfile
cd
/srv/gitlab
&&
sudo
-u
git
-H
bundle
exec
rake gitlab:assets:compile
RAILS_ENV
=
production
NODE_ENV
=
production
NODE_OPTIONS
=
"--max-old-space-size=3072"
rm
-rf
/usr/local/share/.yarnrc
rm
-rf
/usr/local/share/.yarnrc
rm
-rf
/srv/
www
/tmp/cache/*
rm
-rf
/srv/
gitlab
/tmp/cache/*
rm
-rf
/srv/
www
/vendor/bundle/ruby/*/gems/nokogumbo-*/ext/nokogumboc/tmp
rm
-rf
/srv/
gitlab
/vendor/bundle/ruby/*/gems/nokogumbo-*/ext/nokogumboc/tmp
rm
-rf
/srv/
www
/vendor/bundle/ruby/*/gems/graphiql-rails-*/test/dummy/tmp
rm
-rf
/srv/
gitlab
/vendor/bundle/ruby/*/gems/graphiql-rails-*/test/dummy/tmp
find
/srv/
www
-name
*.gz
-exec
rm
-f
'{}'
';'
find
/srv/
gitlab
-name
*.gz
-exec
rm
-f
'{}'
';'
find
/
-name
*.gem
-exec
rm
-f
'{}'
';'
find
/
-name
*.gem
-exec
rm
-f
'{}'
';'
find
/
-name
*.pyc
-exec
rm
-f
'{}'
';'
find
/
-name
*.pyc
-exec
rm
-f
'{}'
';'
find
/
-name
*.js.map
-exec
rm
-f
'{}'
';'
find
/
-name
*.js.map
-exec
rm
-f
'{}'
';'
...
@@ -71,11 +87,6 @@ all: database-config httpd-conf
...
@@ -71,11 +87,6 @@ all: database-config httpd-conf
find
/
-depth
-name
.tox
-type
d
-exec
rm
-rf
'{}'
';'
find
/
-depth
-name
.tox
-type
d
-exec
rm
-rf
'{}'
';'
find
/
-depth
-name
node_modules
-type
d
-exec
rm
-rf
'{}'
';'
find
/
-depth
-name
node_modules
-type
d
-exec
rm
-rf
'{}'
';'
chown
-R
apache.apache
/srv/www
rm
-f
/etc/httpd/conf/DocumentRoot.conf
@echo
"$$HTTPD_CONF"
>
/etc/httpd/conf/ruby.conf
rm
-rf
gitlab-home
rm
-rf
gitlab-home
umount
/tmp
umount
/tmp
rm
-rf
tmp
rm
-rf
tmp
...
@@ -89,6 +100,8 @@ postinstall:
...
@@ -89,6 +100,8 @@ postinstall:
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;"
cd
/srv/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
GITLAB_ROOT_PASSWORD
=
password
GITLAB_ROOT_EMAIL
=
email
GITLAB_LICENSE_FILE
=
"/srv/gitlab/license"
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
database-config
:
database-config
:
...
@@ -99,28 +112,3 @@ production:
...
@@ -99,28 +112,3 @@ production:
database
:
gitlabhq_production
database
:
gitlabhq_production
endef
endef
export
DATABASE_CONFIG
export
DATABASE_CONFIG
httpd-conf
:
define
HTTPD_CONF
LoadModule
expires_module
/usr/lib/httpd/modules/mod_expires.so
DocumentRoot
/srv/www/public
<Directory
"/srv/www/public"
>
AllowOverride
all
Options
-MultiViews
Require
all
granted
</Directory>
PassengerAppRoot
"/srv/www"
RailsEnv
production
RailsBaseURI
/
<Location
/assets/>
Header
unset
ETag
FileETag
None
ExpiresActive
On
ExpiresDefault
"access plus 1 year"
</Location>
endef
export
HTTPD_CONF
gitlab.groups
View file @
5928a554
This diff is collapsed.
Click to expand it.
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