Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
35fd988c
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
35fd988c
编写于
10月 21, 2011
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cleaning
上级
1b162bdb
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
23 addition
and
80 deletion
+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
未找到文件。
README.rdoc
浏览文件 @
35fd988c
...
...
@@ -34,18 +34,19 @@ sqlite as default db
sudo easy_install pygments
sudo gem install bundler
bundle
RAILS_ENV=production rake db:setup
bundle exec rake db:setup RAILS_ENV=production
# create admin user
# login....admin@local.host
# 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
rails s
rails s
-e production
== Install Gitosis
sudo aptitude install gitosis
...
...
@@ -63,6 +64,7 @@ Install gitosis, edit conf/gitosis.yml & start server
ssh-keygen -t rsa
sudo -H -u git gitosis-init < ~/.ssh/id_rsa.pub
sudo chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update
...
...
db/fixtures/development/001_admin.rb
浏览文件 @
35fd988c
# Admin account
admin
=
User
.
create
(
:email
=>
"admin@local.host"
,
:name
=>
"Administrator"
,
...
...
@@ -9,3 +8,12 @@ admin = User.create(
admin
.
projects_limit
=
10000
admin
.
admin
=
true
admin
.
save!
if
admin
.
valid?
puts
%q[
Administrator account created:
login.........admin@local.host
password......5iveL!fe
]
end
db/fixtures/production/001_admin.rb
浏览文件 @
35fd988c
...
...
@@ -8,3 +8,12 @@ admin = User.create(
admin
.
projects_limit
=
10000
admin
.
admin
=
true
admin
.
save!
if
admin
.
valid?
puts
%q[
Administrator account created:
login.........admin@local.host
password......5iveL!fe
]
end
install.rb
已删除
100644 → 0
浏览文件 @
1b162bdb
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
已删除
100644 → 0
浏览文件 @
1b162bdb
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
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录