Code Monkey home page Code Monkey logo

ops-django's Introduction

请结合前端工程 ops-vue 使用

部署

1.安装依赖包:
requirement.txt

需要安装mysql,rabbitmq

2.数据库, mq相关:

初始化数据库:

1). 执行 create database databasename
2). conf目录下写配置

初始化rabbitmq:

1). rabbitmqctl add_user myuser mypassword #创建用户
2). rabbitmqctl set_user_tags myuser administrator #为用户设置管理员标签 3). rabbitmqctl add_vhost vhost #设置虚拟环境
4). rabbitmqctl set_permissions -p vhost myuser "." "." ".*" #为用户在虚拟环境下设置所有权限
2). conf目录下配置服务

sql导入数据

python manage.py runserver

3.celery任务调度配置:

1). 初始化celery: python manage.py migrate djcelery
2). 启动celery调度: python manage.py celery beat
3). 启动celery任务worker: python manage.py celery worker --loglevel=info

注: 整套服务需要跑至少3个进程 django server进程, 任务调度进程, 任务调度worker进程(可多开)

ops-django's People

Contributors

brickqijaylee 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.