Code Monkey home page Code Monkey logo

default_django_project's Introduction

Development Install

@todo

Deploy

First time

  1. Install your key in the server.
  2. Enable your key in the project repository.
  3. Set config/deploy.rb variables properly.
  4. Change files configuration: Rename config/deploy_config/*_nginx.conf files to match config_application_name variable set in config/deploy.rb
  5. Config database in the server.
    $ su - postgres
    $ psql
    psql$ CREATE DATABASE databasename;
    psql$ CREATE USER username WITH PASSWORD userpassword;
    psql$ GREANT ALL PRIVILEGES ON DATABASE databasename TO username;
    psql$ \q
    $ exit
  6. Run make initial_deploy stage=production or whatever stage you eant deploy to.

Config Celery

  1. Install rabbitmq

    • Linux: sudo apt-get install rabbitmq-server
    • Mac: brew install rabbitmq
  2. Add user rabbitmq

    • sudo rabbitmqctl add_user myuser mypassword
    • sudo rabbitmqctl add_vhost myvhost
    • sudo rabbitmqctl set_permissions -p myvhost myuser "." "." ".*"
  3. Add broker url in settings

    • BROKER_URL = 'amqp://myuser:mypassword@localhost:5672/myvhost'
  4. Install celery

    • pip install celery

Celery Local

  1. Run rabbitmq

    • sudo rabbitmq-server
  2. Run celery

    • celery worker -l info --beat --app=default.celery:app

Celery Production

  1. Create symlink: ../default/config/deploy_config/default_celery_supervisor.conf >> /etc/supervisor/conf.d/default_celery_supervisor.conf

  2. Restart supervisorctl

default_django_project's People

Contributors

irapoam avatar

Stargazers

Rodrigo Boniatti avatar

Watchers

James Cloos avatar  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.