Homeland 部署完后,如需修改部分代码,从哪入手

W3INFO · 2016年12月07日 · 最后由 W3INFO 回复于 2016年12月15日 · 2565 次阅读

想修改原文件,find 了一下 404.html 发现生成的有很多

/var/lib/docker/aufs/mnt/b56ff9d1180c0f04ae7fe029f92c6793a4342ada24539e37a12b53919ff84c8c/var/www/homeland/vendor/bundle/ruby/2.3.0/gems/bulk_insert-1.2.1/test/dummy/public/404.html
/var/lib/docker/aufs/mnt/b56ff9d1180c0f04ae7fe029f92c6793a4342ada24539e37a12b53919ff84c8c/var/www/homeland/vendor/bundle/ruby/2.3.0/gems/doorkeeper-4.2.0/spec/dummy/public/404.html
/var/lib/docker/aufs/mnt/b56ff9d1180c0f04ae7fe029f92c6793a4342ada24539e37a12b53919ff84c8c/var/www/homeland/vendor/bundle/ruby/2.3.0/gems/derailed_benchmarks-1.3.1/test/rails_app/public/404.html
/var/lib/docker/aufs/mnt/b56ff9d1180c0f04ae7fe029f92c6793a4342ada24539e37a12b53919ff84c8c/var/www/homeland/vendor/bundle/ruby/2.3.0/gems/devise-4.2.0/test/rails_app/public/404.html
/var/lib/docker/aufs/mnt/b56ff9d1180c0f04ae7fe029f92c6793a4342ada24539e37a12b53919ff84c8c/var/www/homeland/vendor/bundle/ruby/2.3.0/gems/exception_notification-4.2.1/test/dummy/public/404.html
/var/lib/docker/aufs/mnt/b56ff9d1180c0f04ae7fe029f92c6793a4342ada24539e37a12b53919ff84c8c/var/www/homeland/vendor/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/generators/rails/app/templates/public/404.html
/var/lib/docker/aufs/mnt/b2fea450f6cc0928ecb3a49605eac0dac7992799da8963875b5a3f9155cbf8f2/var/www/homeland/public/404.html
/var/lib/docker/aufs/mnt/b2fea450f6cc0928ecb3a49605eac0dac7992799da8963875b5a3f9155cbf8f2/var/www/homeland/vendor/bundle/ruby/2.3.0/gems/bulk_insert-1.2.1/test/dummy/public/404.html
/var/lib/docker/aufs/mnt/b2fea450f6cc0928ecb3a49605eac0dac7992799da8963875b5a3f9155cbf8f2/var/www/homeland/vendor/bundle/ruby/2.3.0/gems/doorkeeper-4.2.0/spec/dummy/public/404.html
/var/lib/docker/aufs/mnt/b2fea450f6cc0928ecb3a49605eac0dac7992799da8963875b5a3f9155cbf8f2/var/www/homeland/vendor/bundle/ruby/2.3.0/gems/derailed_benchmarks-1.3.1/test/rails_app/public/404.html
/var/lib/docker/aufs/mnt/b2fea450f6cc0928ecb3a49605eac0dac7992799da8963875b5a3f9155cbf8f2/var/www/homeland/vendor/bundle/ruby/2.3.0/gems/devise-4.2.0/test/rails_app/public/404.html
/var/lib/docker/aufs/mnt/b2fea450f6cc0928ecb3a49605eac0dac7992799da8963875b5a3f9155cbf8f2/var/www/homeland/vendor/bundle/ruby/2.3.0/gems/exception_notification-4.2.1/test/dummy/public/404.html
/var/lib/docker/aufs/mnt/b2fea450f6cc0928ecb3a49605eac0dac7992799da8963875b5a3f9155cbf8f2/var/www/homeland/vendor/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/generators/rails/app/templates/public/404.html
/var/lib/docker/aufs/mnt/7f76366887f1d1ec2f6a5eaa12538d14c18aadcf534086d8a5c13a1f787b016c/var/www/homeland/public/404.html
/var/lib/docker/aufs/mnt/7f76366887f1d1ec2f6a5eaa12538d14c18aadcf534086d8a5c13a1f787b016c/var/www/homeland/vendor/bundle/ruby/2.3.0/gems/bulk_insert-1.2.1/test/dummy/public/404.html
/var/lib/docker/aufs/mnt/7f76366887f1d1ec2f6a5eaa12538d14c18aadcf534086d8a5c13a1f787b016c/var/www/homeland/vendor/bundle/ruby/2.3.0/gems/doorkeeper-4.2.0/spec/dummy/public/404.html
/var/lib/docker/aufs/mnt/7f76366887f1d1ec2f6a5eaa12538d14c18aadcf534086d8a5c13a1f787b016c/var/www/homeland/vendor/bundle/ruby/2.3.0/gems/derailed_benchmarks-1.3.1/test/rails_app/public/404.html
/var/lib/docker/aufs/mnt/7f76366887f1d1ec2f6a5eaa12538d14c18aadcf534086d8a5c13a1f787b016c/var/www/homeland/vendor/bundle/ruby/2.3.0/gems/devise-4.2.0/test/rails_app/public/404.html
/var/lib/docker/aufs/mnt/7f76366887f1d1ec2f6a5eaa12538d14c18aadcf534086d8a5c13a1f787b016c/var/www/homeland/vendor/bundle/ruby/2.3.0/gems/exception_notification-4.2.1/test/dummy/public/404.html
/var/lib/docker/aufs/mnt/7f76366887f1d1ec2f6a5eaa12538d14c18aadcf534086d8a5c13a1f787b016c/var/www/homeland/vendor/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/generators/rails/app/templates/public/404.html
/var/lib/docker/aufs/diff/4288cbd715bef3891899fe25417f151fe7c1894c4306817fa2b78b877450833f/var/www/homeland/public/404.html
/var/lib/docker/aufs/diff/4288cbd715bef3891899fe25417f151fe7c1894c4306817fa2b78b877450833f/var/www/homeland/vendor/bundle/ruby/2.3.0/gems/bulk_insert-1.2.1/test/dummy/public/404.html
/var/lib/docker/aufs/diff/4288cbd715bef3891899fe25417f151fe7c1894c4306817fa2b78b877450833f/var/www/homeland/vendor/bundle/ruby/2.3.0/gems/doorkeeper-4.2.0/spec/dummy/public/404.html
/var/lib/docker/aufs/diff/4288cbd715bef3891899fe25417f151fe7c1894c4306817fa2b78b877450833f/var/www/homeland/vendor/bundle/ruby/2.3.0/gems/derailed_benchmarks-1.3.1/test/rails_app/public/404.html
/var/lib/docker/aufs/diff/4288cbd715bef3891899fe25417f151fe7c1894c4306817fa2b78b877450833f/var/www/homeland/vendor/bundle/ruby/2.3.0/gems/devise-4.2.0/test/rails_app/public/404.html
/var/lib/docker/aufs/diff/4288cbd715bef3891899fe25417f151fe7c1894c4306817fa2b78b877450833f/var/www/homeland/vendor/bundle/ruby/2.3.0/gems/exception_notification-4.2.1/test/dummy/public/404.html
/var/lib/docker/aufs/diff/4288cbd715bef3891899fe25417f151fe7c1894c4306817fa2b78b877450833f/var/www/homeland/vendor/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/generators/rails/app/templates/public/404.html
/var/lib/docker/aufs/diff/353d1faf241d4d9d79c596d2014757abd512748c9a696f9a35de7d11b57f0eda/var/www/homeland/public/404.html
/var/lib/docker/aufs/diff/7f76366887f1d1ec2f6a5eaa12538d14c18aadcf534086d8a5c13a1f787b016c/var/www/homeland/public/404.html

或者我每次 make install 的时候 都会从 github 上拉取,然后重新编译

你想修改什么?

#3 楼 @huacnlee 比如个人资料页的排版

#4 楼 @W3INFO Docker 部署的方式不提供定制,如果你想定制,请从源代码 Fork 出去修改,并独立部署。

至于怎么改,怎么部署得你自己研究了。

#5 楼 @huacnlee 各种踩坑,求文档啊~~~

#7 楼 @W3INFO Ruby / Rails 你熟悉么?不熟悉还定制什么呢?安安心心用标准的 Docker 安装吧。

要定制花钱雇人

#8 楼 @huacnlee 不熟悉。。不过找到了笨方法,数据实际储存与 diff 文件内,修改相应文件即可。方法有点笨~~

W3INFO 关闭了讨论。 12月07日 15:24
W3INFO 重新开启了讨论。 12月07日 18:06

@huacnlee 我又厚着脸皮开启了该问题,请问一下,会员发帖时间限制参数在哪里修改,一个月太久了。看了文档,可是没有这个的说明

#12 楼 @W3INFO 和你一样最近也在部署 homeland,越来越多人喜欢这个开源程序了,你是指新会员发帖限制么?如果是,其实可以不用修改代码,在控制台 - 用户 - 修改 招聘人员 前面打勾,招聘人员角色可以忽略新手限制直接发帖,如果不是,当我没说。😎

#13 楼 @id 不过我说的是注册的普通会员,我在models/user.rb发现了这么一个代码

def newbie?
    return false if verified? || hr?
    created_at > 1.week.ago
  end

不知道是不是这段代码在控制

#14 楼 @W3INFO 这个已经新增可配置项了

#15 楼 @huacnlee 昨天提了一个 xss 的 bug,社区将iframe 标签给去掉了,那么改如何插入视频了?或者可以自动解析,一旦识别用户留下的网址为https://www.youtube.com/xxxxxxx 就自动调用iframe 来插入,不知道描述是否清楚

#16 楼 @W3INFO 今天已经调整了,可以插入 YouTube 了,方法还是和之前的一样,iframe 的 src 增加了白名单

#17 楼 @huacnlee css 也要改下一,如下实例子:

#19 楼 @huacnlee 额~~ 发现竟然还是使用的 http1,什么情况~~ 这个 docker 启用后不是默认使用 http2 的吗,证书什么的已经 ok 了

需要 登录 后方可回复, 如果你还没有账号请 注册新账号