django项目如何部署到阿里云服务器
现在我们先默认项目长这样:
你的项目名/
├── 你的项目名
│ ├── __init__.py
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
├── manage.py
├── 文件夹
│
├── static
│ ├── 文件夹
│ └── 文件夹
└── templates
├── 文件夹
└── 文件夹
阿里云服务器购买
购买云服务器的镜像推荐使用ubuntu18.04
安全组可以勾选HTTP 80端口
在阿里云上搭建项目及安装数据库
使用Git bash将本地项目文件推送到github远程仓库
- 先在github建立repository(假设起名叫abc),初始化一个readme.md
- 在本地在一个空文件夹内用Git bash将项目克隆过来
git clone https://github.com/xxx/a