[关闭]
@fuyb1986 2017-05-11T10:05:10.000000Z 字数 677 阅读 731

README

金色童年


  1. 框架
    使用 Django reset framework

    • 配置文件
      golden_childhood/settings.py
    • 安装
      pip install djangorestframework
      pip install markdown
      pip install django-filter # Filtering support
      pip install djangorestframework-filters
    • 文档
      http://www.django-rest-framework.org/
  2. 运行
    使用 python gunicorn.

  3. 其它依赖
    requirements.txt1.1kB

  4. 启动与停止 web 服务

    • 管理
      使用 systemd 管理服务
    • 启动服务
      sudo server.sh restart
    • 重启服务
      sudo server.sh restart
    • 停止服务
      sudo server.sh stop
  5. 启动与停止 task 服务

    • task 用于发送短信、消息、缓存数据等等
    • 这些数据都存放在 redis 里,使用 redis 的消息从其它主机接收数据
    • 只有一台主机运行这个服务
    • 管理
      使用 systemd 管理服务
    • 启动服务
      sudo task.sh start
    • 重启服务
      sudo task.sh restart
    • 停止服务
      sudo task.sh stop
  6. 上线方法

    • 上线 html5
      /opt/uptime/uptime_html_remote.sh
    • 上线 web server
      /opt/uptime/uptime_remote.sh
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注