[英]Deploy Django 1.10 app with python 3.6 on Google Compute Engine
I have created a project using with Django 1.10.5 and python 3.6, now I need to deploy this project on google compute engine.I have googled a lot but couldn't find any clear guide to deploy my Django app on compute engine. 我已经创建了一个使用Django 1.10.5和python 3.6的项目,现在我需要在谷歌计算引擎上部署这个项目。我已经google了很多但是找不到任何明确的指南来在计算引擎上部署我的Django应用程序。
What I have tried: 我尝试过的:
python manage.py runserver
from my directory, it says : python manage.py runserver
,它说: Django version 1.10.5, using settings 'brain.settings'
Django版本1.10.5,使用设置'brain.settings'
Starting development server at
http://127.0.0.1:8000/
在
http://127.0.0.1:8000/
启动开发服务器Quit the server with CONTROL-C.
使用CONTROL-C退出服务器。
http://127.0.0.1:8000/
doesn't load any page. http://127.0.0.1:8000/
没有加载任何页面。 How can I deploy my Django 1.10 & Python 3.6 app on google compute engine? 如何在谷歌计算引擎上部署我的Django 1.10和Python 3.6应用程序? Help me, please!
请帮帮我! Thanks in advance!
提前致谢!
All you need to do is to add a new incoming Firewall rule on Google Cloud Platform (GCP) for TCP:8000
. 您需要做的就是在Google Cloud Platform(GCP)上为
TCP:8000
添加新的传入防火墙规则。
To do so simply connect to your GCP: Console Firewall Rules and add a new rule. 为此,只需连接到您的GCP:控制台防火墙规则并添加新规则。
Also be sure to launch Django to listen on the public interface and you to access with the public IP. 还要确保启动Django以监听公共接口,并使用公共IP进行访问。
python manage.py runserver 0.0.0.0:8000
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.