https://github.com/cnych/productaste
基于 django2.0 快速实现一个产品分享的 WEB 应用
https://github.com/cnych/productaste
course django django2 python
Last synced: 4 months ago
JSON representation
基于 django2.0 快速实现一个产品分享的 WEB 应用
- Host: GitHub
- URL: https://github.com/cnych/productaste
- Owner: cnych
- Created: 2018-04-20T07:03:49.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T02:05:35.000Z (over 3 years ago)
- Last Synced: 2025-04-03T23:51:12.822Z (over 1 year ago)
- Topics: course, django, django2, python
- Language: CSS
- Homepage: https://youdianzhishi.com/course/m12jop/
- Size: 4.61 MB
- Stars: 7
- Watchers: 5
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# productaste
基于 django2.0 快速实现一个产品分享的 WEB 应用
[](https://travis-ci.org/cnych/productaste)
课程地址: [https://www.haimaxy.com/course/m12jop/](https://www.haimaxy.com/course/m12jop/?utm_source=github)
每节课的源码和`TAG`是同步的,比如第5节课对应的源码就是`TAG`为**lesson5**对应的源码。
[](https://www.haimaxy.com/course/m12jop/?utm_source=github)
## 构建 Nginx 镜像
首先确保已经安装`Docker`,进入`nginx`目录,将下面的`pt.django.conf`文件内部的**proxy_pass**更改为你本地的`Django`服务地址
```
server {
listen 80;
location / {
proxy_pass http://192.168.31.9:8000;
proxy_redirect default;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
}
}
```
然后执行下面的镜像构建命令:
```
$ docker build -t mynginx:v1 .
```