Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
6d0175e1
Commit
6d0175e1
authored
Oct 21, 2011
by
gitlabhq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaning
parent
86021a7d
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
80 deletions
+23
-80
README.rdoc
README.rdoc
+5
-3
db/fixtures/development/001_admin.rb
db/fixtures/development/001_admin.rb
+9
-1
db/fixtures/production/001_admin.rb
db/fixtures/production/001_admin.rb
+9
-0
install.rb
install.rb
+0
-32
update.rb
update.rb
+0
-44
No files found.
README.rdoc
View file @
6d0175e1
...
@@ -34,18 +34,19 @@ sqlite as default db
...
@@ -34,18 +34,19 @@ sqlite as default db
sudo easy_install pygments
sudo easy_install pygments
sudo gem install bundler
sudo gem install bundler
bundle
bundle
RAILS_ENV=production rake db:setup
bundle exec rake db:setup RAILS_ENV=production
# create admin user
# create admin user
# login....admin@local.host
# login....admin@local.host
# pass.....5iveL!fe
# pass.....5iveL!fe
RAILS_ENV=production rake db:seed_fu
bundle exec rake db:seed_fu RAILS_ENV=production
Install gitosis, edit conf/gitosis.yml & start server
Install gitosis, edit conf/gitosis.yml & start server
rails s
rails s
-e production
== Install Gitosis
== Install Gitosis
sudo aptitude install gitosis
sudo aptitude install gitosis
...
@@ -63,6 +64,7 @@ Install gitosis, edit conf/gitosis.yml & start server
...
@@ -63,6 +64,7 @@ Install gitosis, edit conf/gitosis.yml & start server
ssh-keygen -t rsa
ssh-keygen -t rsa
sudo -H -u git gitosis-init < ~/.ssh/id_rsa.pub
sudo -H -u git gitosis-init < ~/.ssh/id_rsa.pub
sudo chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update
sudo chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update
...
...
db/fixtures/development/001_admin.rb
View file @
6d0175e1
# Admin account
admin
=
User
.
create
(
admin
=
User
.
create
(
:email
=>
"admin@local.host"
,
:email
=>
"admin@local.host"
,
:name
=>
"Administrator"
,
:name
=>
"Administrator"
,
...
@@ -9,3 +8,12 @@ admin = User.create(
...
@@ -9,3 +8,12 @@ admin = User.create(
admin
.
projects_limit
=
10000
admin
.
projects_limit
=
10000
admin
.
admin
=
true
admin
.
admin
=
true
admin
.
save!
admin
.
save!
if
admin
.
valid?
puts
%q[
Administrator account created:
login.........admin@local.host
password......5iveL!fe
]
end
db/fixtures/production/001_admin.rb
View file @
6d0175e1
...
@@ -8,3 +8,12 @@ admin = User.create(
...
@@ -8,3 +8,12 @@ admin = User.create(
admin
.
projects_limit
=
10000
admin
.
projects_limit
=
10000
admin
.
admin
=
true
admin
.
admin
=
true
admin
.
save!
admin
.
save!
if
admin
.
valid?
puts
%q[
Administrator account created:
login.........admin@local.host
password......5iveL!fe
]
end
install.rb
deleted
100644 → 0
View file @
86021a7d
root_path
=
File
.
expand_path
(
File
.
dirname
(
__FILE__
))
require
File
.
join
(
root_path
,
"lib"
,
"color"
)
include
Color
#
# ruby ./update.rb development # or test or production (default)
#
envs
=
[
"production"
,
"test"
,
"development"
]
env
=
if
envs
.
include?
(
ARGV
[
0
])
ARGV
[
0
]
else
"production"
end
puts
green
" == Install for ENV=
#{
env
}
..."
# bundle install
`bundle install`
# migrate db
`bundle exec rake db:create RAILS_ENV=
#{
env
}
`
`bundle exec rake db:schema:load RAILS_ENV=
#{
env
}
`
`bundle exec rake db:seed_fu RAILS_ENV=
#{
env
}
`
puts
green
%q[
Administrator account created:
login.........admin@local.host
password......5iveL!fe
]
puts
green
" == Done! Now you can start server"
update.rb
deleted
100644 → 0
View file @
86021a7d
root_path
=
File
.
expand_path
(
File
.
dirname
(
__FILE__
))
require
File
.
join
(
root_path
,
"lib"
,
"color"
)
include
Color
def
version
File
.
read
(
"VERSION"
)
end
#
# ruby ./update.rb development # or test or production (default)
#
envs
=
[
"production"
,
"test"
,
"development"
]
env
=
if
envs
.
include?
(
ARGV
[
0
])
ARGV
[
0
]
else
"production"
end
puts
yellow
"== RAILS ENV |
#{
env
}
"
current_version
=
version
puts
yellow
"Your version is
#{
current_version
}
"
puts
yellow
"Check for new version: $ git pull origin 1x"
`git pull origin 1x`
# pull from origin
# latest version
if
version
==
current_version
puts
yellow
"You have a latest version"
else
puts
green
"Update to
#{
version
}
"
`bundle install`
# migrate db
if
env
==
"development"
`bundle exec rake db:migrate RAILS_ENV=development`
`bundle exec rake db:migrate RAILS_ENV=test`
else
`bundle exec rake db:migrate RAILS_ENV=
#{
env
}
`
end
puts
green
"== Done! Now you can start/restart server"
end
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