Git Product home page Git Product logo

my_python_book's Introduction

my_python_book

为了更方便的查阅 Python 相关文档、教程而做.

警告: 不要直接 clone, 静态资源异常的大...

curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt install git-lfs
git lfs install
...
git lfs pull

部署

nginx 配置
/etc/nginx/sites-available/default

server {
    charset utf-8;
    listen 80;
    server_name www.sweetpotato.xyz sweetpotato.xyz;
    
    location / {
        proxy_set_header Host $host;
        proxy_pass http://127.0.0.1:8000;
    }

    location /static {
        alias /root/my_python_book/static;
    }
}

注意给 root 文件夹加上可执行权限

chmod +x root

重启 Nginx

nginx -s reload

gunicorn 启动命令

nohup gunicorn django_book.wsgi:application -c gunicorn.conf.py &

定时任务

# 添加定时任务到系统中
python manage.py crontab add

# 显示已经激活的定时任务
python manage.py crontab show

# 移除定时任务
python manage.py crontab remove

my_python_book's People

Contributors

justsweetpotato avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.