Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

大佬求助,怎么样可以不部署在服务端的前提下启动整个项目呢 #21

Open
returnfx opened this issue Mar 14, 2022 · 6 comments

Comments

@returnfx
Copy link

大佬求助,怎么样可以不部署在服务端的前提下启动整个项目呢

@1251240000
Copy link
Owner

建议尝试使用nginx( for windows)发布,静态文件、页面、接口需在同一端口下发布,或许可以尝试使用代理方式实现(可能会非常麻烦,不建议尝试)

@returnfx
Copy link
Author

其实比较麻烦在windows系统下,uwsgi安装不了

@1251240000
Copy link
Owner

没有在windows上尝试过,不过runserver也可以配合nginx运行,本地调试可以达到一样的效果。再不济可以使用wsl搭建完整的环境进行部署。

@returnfx
Copy link
Author

server {
listen 80;
server_name 当前域名;

    location /templates {
        root /项目目录/StockVisualization/; 
        index index.html;
    }
    location /static {
        alias /项目目录/StockVisualization/static/;
    }
    location / {
        proxy_pass http://127.0.0.1:8000;
    }
}

nginx用这个配置,把静态资源映用nginx跑起来,代理下接口就可以启动了,大佬,现在除了首页,其他的页面都还有问题,我看页面文件是有的,是里面的逻辑还没写完吗

@1251240000
Copy link
Owner

是的,有时间可能会把坑填上

@xinmans
Copy link

xinmans commented Mar 24, 2022

linux docker版本有么?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants