【问题标题】:Limesurvey Openshift unwanted reinstallation when git push new filegit push新文件时Limesurvey Openshift不需要重新安装
【发布时间】:2014-04-07 07:30:48
【问题描述】:

问题在于从下面的 git 使用 Limesurvey 时修改 Openshift 上的文件

https://github.com/gshipley/limesurvey-quickstart

安装完成后,我在本地存储库中添加了一个新文件,例如php/front-end.html, git push 它然后在 openshift 访问我的 Limesurvey 应用程序,它再次将我带到安装程序页面。

为什么每次我git push 都会影响和重置石灰测量安装?我该如何解决?

注意:我没有修改任何石灰调查文件,只是添加了新文件。

以下是 git 日志:

>git status
# On branch master
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#       modified:   php/front-end.html
#
no changes added to commit (use "git add" and/or "git commit -a")

>git add php/front-end.html

>git commit -m "Test Front End"
[master dd7f21d] Test Front End
 1 file changed, 1 insertion(+)

>git status
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#   (use "git push" to publish your local commits)
#
nothing to commit, working directory clean

>git push
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 362 bytes, done.
Total 4 (delta 3), reused 0 (delta 0)
remote: Not stopping cartridge mysql because hot deploy is enabled
remote: Not stopping cartridge php because hot deploy is enabled
remote: Not stopping cartridge phpmyadmin because hot deploy is enabled
remote: Building git ref 'master', commit dd7f21d
remote: Checking .openshift/pear.txt for PEAR dependency..
remote: Preparing build for deployment
remote: Deployment id is dc93388e
remote: Activating deployment
remote: Not starting cartridge mysql because hot deploy is enabled
remote: Not starting cartridge phpmyadmin because hot deploy is enabled
remote: Not starting cartridge php because hot deploy is enabled
remote: -------------------------
remote: Git Post-Receive Result: success
remote: Activation status: success
remote: Deployment completed with status: success
To ssh://<long guid>@appname-namespace.rhcloud.com/~/git/appname.g
it/
   91e3033..dd7f21d  HEAD -> master

【问题讨论】:

    标签: git openshift limesurvey


    【解决方案1】:

    当您执行 git push 时,您基本上会覆盖在安装过程中生成的任何配置文件。
    我可以看到两种解决此问题的方法:
    1.) 将安装期间创建的文件复制到您的 OPENSHIFT_DATA_DIR (~/app-root/data) 中,然后在部署操作挂钩 (.openshift/action_hooks/deploy) 中创建指向它们的符号链接
    2.) 在 openshift 上进行安装,然后 ssh 到您的设备并将创建的文件复制回您的本地 git 工作目录并使用 git add && git commit 将它们添加到您的存储库,然后这些文件将在您执行时部署一个 git push 到你的装备上。

    【讨论】:

      猜你喜欢
      • 2013-03-28
      • 1970-01-01
      • 2016-09-01
      • 1970-01-01
      • 2023-03-13
      • 2021-07-20
      • 2023-03-22
      • 1970-01-01
      • 2013-09-18
      相关资源
      最近更新 更多