python - OpenShift 站点推送后未加载

标签 python django openshift

完成以下说明后,我重新加载页面,但仍然看到 Openshift 的默认页面,而不是我网站的页面。

我遵循的 Openshift 说明

 git clone ssh://517f4cdc5973cae128000169@newlocarte-locdada.rhcloud.com/~/git/newlocarte.git/
 cd newlocarte/

这将创建一个包含应用程序源代码的文件夹。进行更改后,添加、提交并推送您的更改。

 git add .
 git commit -m 'My changes'
 git push

在我的 Git 命令中:

Counting objects: 3, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 262 bytes, done.
Total 2 (delta 1), reused 0 (delta 0)
remote: restart_on_add=false
remote: Done
remote: restart_on_add=false
remote: Running .openshift/action_hooks/pre_build
remote: New python executable in /var/lib/openshift/517f4cdc5973cae128000169//py
thon-2.7/virtenv/bin/python
remote: Installing setuptools..................done.
remote: Installing pip...............done.
remote: Running virtualenv with interpreter /var/lib/openshift/517f4cdc5973cae12
  8000169//python-2.7/opt/bin/python
remote:   - Created/Updated virtenv and activated it.
remote:  - Found setup.py. Processing it ...
remote: running develop
remote: running egg_info
remote: creating YourAppName.egg-info
remote: writing requirements to YourAppName.egg-info/requires.txt
remote: writing YourAppName.egg-info/PKG-INFO
remote: writing top-level names to YourAppName.egg-info/top_level.txt
remote: writing dependency_links to YourAppName.egg-info/dependency_links.txt
remote: writing manifest file 'YourAppName.egg-info/SOURCES.txt'
remote: reading manifest file 'YourAppName.egg-info/SOURCES.txt'
remote: writing manifest file 'YourAppName.egg-info/SOURCES.txt'
remote: running build_ext
remote: Creating /var/lib/openshift/517f4cdc5973cae128000169/python-2.7/virtenv/
 lib/python2.7/site-packages/YourAppName.egg-link (link to .)
remote: YourAppName 1.0 is already the active version in easy-install.pth
 remote:
 remote: Installed /var/lib/openshift/517f4cdc5973cae128000169/app-root/runtime/r
   epo
 remote: Processing dependencies for YourAppName==1.0
 remote: Searching for gevent==0.13.8
 remote: Best match: gevent 0.13.8
 remote: Processing gevent-0.13.8-py2.7-linux-x86_64.egg
 remote: gevent 0.13.8 is already the active version in easy-install.pth
 remote:
 remote: Using /var/lib/openshift/517f4cdc5973cae128000169/python-2.7/virtenv/lib
   /python2.7/site-packages/gevent-0.13.8-py2.7-linux-x86_64.egg
 remote: Searching for greenlet==0.4.0
 remote: Best match: greenlet 0.4.0
 remote: Processing greenlet-0.4.0-py2.7-linux-x86_64.egg
 remote: greenlet 0.4.0 is already the active version in easy-install.pth
 remote:
 remote: Using /var/lib/openshift/517f4cdc5973cae128000169/python-2.7/virtenv/lib
   /python2.7/site-packages/greenlet-0.4.0-py2.7-linux-x86_64.egg
 remote: Finished processing dependencies for YourAppName==1.0
 remote:  - Done processing setup.py
 remote: Making script /var/lib/openshift/517f4cdc5973cae128000169//python-2.7/vi
 rtenv/bin/pip relative
 remote: Script /var/lib/openshift/517f4cdc5973cae128000169//python-2.7/virtenv/b
   in/activate.csh cannot be made relative (it's not a normal script that starts wi
  th #!/var/lib/openshift/517f4cdc5973cae128000169/python-2.7/virtenv/bin/python)
  remote: Making script /var/lib/openshift/517f4cdc5973cae128000169//python-2.7/vi
    rtenv/bin/pip-2.7 relative
 remote: Making script /var/lib/openshift/517f4cdc5973cae128000169//python-2.7/vi
    rtenv/bin/easy_install relative
 remote: Script /var/lib/openshift/517f4cdc5973cae128000169//python-2.7/virtenv/b
     in/activate.fish cannot be made relative (it's not a normal script that starts w
     ith #!/var/lib/openshift/517f4cdc5973cae128000169/python-2.7/virtenv/bin/python)

 remote: Making script /var/lib/openshift/517f4cdc5973cae128000169//python-2.7/vi
      rtenv/bin/easy_install-2.7 relative
 remote: Running .openshift/action_hooks/build
 remote: New python executable in /var/lib/openshift/517f4cdc5973cae128000169//py
         thon-2.7/virtenv/bin/python
 remote: Installing setuptools..................done.
 remote: Installing pip...............done.
 remote: Running virtualenv with interpreter /var/lib/openshift/517f4cdc5973cae12
        8000169//python-2.7/opt/bin/python
 remote: Running .openshift/action_hooks/deploy
 remote: hot_deploy_added=false
 remote: MySQL already running
 remote: Done
 remote: Running .openshift/action_hooks/post_deploy
  To ssh://517f4cdc5973cae128000169@newlocarte-locdada.rhcloud.com/~/git/  newlocarte.git/
   cd033bf..95121b4  master -> master
    Skizzy@H43K /c/Python27/Scripts/env/Scripts/art/newlocarte (master)

如何让它加载?

最佳答案

请 ssh 进入应用程序齿轮并确保您的代码已推送到齿轮上。要通过 ssh 登录 gear,请运行命令“rhc ssh -a {appName}”。还要确保您的应用程序相关文件位于 wsgi 目录下。

关于python - OpenShift 站点推送后未加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16294136/

相关文章:

python - 拼写错误的 __future__ 导入会导致脚本稍后出错,而不是导入位置出错

python - 抑制 python-xarray 的警告

django - MultipleObjectsReturned - get() 返回了多个 ContentType - 它返回了 2

java - Spring Boot 应用程序未在 Tomcat openshift 中启动

redis - OpenShift - 导入图像的凭据查找

python - 移动应用程序的 Django Rest 框架中的版本控制编程

python mysql连接器多语句

python - 在 Django 运行脚本中传递命令行参数

python - 在变量名中使用字典(或其他结构)键

mongodb - 如何从本地客户端连接到 Openshift Mongodb(正在转发端口)?