Giter VIP home page Giter VIP logo

chipy.org's Introduction

Chipy.org

The code for the Chipy.org website This project is open source and the license can be found in LICENSE.

Installation

To get setup with chipy.org code it is recommended that you use the following:

  • Python 2.7.x
  • virtualenv
  • Autoenv
  • C compiler (for PIL)

Setting up a Local environment

Chipy.org is setup using 12factor, which means that it takes local settings from the environment. For this reason it is recommended that you use autoenv and a .env file. The example .env is::

export DEBUG=True
export ALLOWED_HOSTS="chipy.org,www.chipy.org"
export GITHUB_APP_ID=youridhere
export GITHUB_API_SECRET=supersecretkeyhere
export SECRET_KEY=somesecretkeyfordjangogoeshere
export [email protected]
export [email protected]
export NORECAPTCHA_SITE_KEY=your_recaptcha_public_key
export NORECAPTCHA_SECRET_KEY=your_recaptcha_private_key
export DATABASE_URL=postgres://USER:PASSWORD@HOST:PORT/NAME

# settings needed for social authentication
export GITHUB_API_SECRET=""
export GITHUB_APP_ID=""
export GOOGLE_OAUTH2_CLIENT_ID=""
export GOOGLE_OAUTH2_CLIENT_SECRET=""

# optional email settings and their defaults
export EMAIL_BACKEND='django.core.mail.backends.smtp.EmailBackend'
export EMAIL_HOST='smtp.sendgrid.net'
export EMAIL_PORT=587
export EMAIL_USE_TLS=True
export EMAIL_HOST_USER=""
export EMAIL_HOST_PASSWORD=""

# to enable S3, do the following
export USE_S3="True"
export AWS_ACCESS_KEY_ID=""
export AWS_SECRET_ACCESS_KEY=""
export AWS_STORAGE_BUCKET_NAME=""

Note that the only required config is the github stuff. The secret key will be random by default which will cause your session to wipe on every restart.

If using autoenv, the above will be in your environment when you cd to the project directory

Create a virtual environment where your dependencies will live::

$ virtualenv venv
$ source venv/bin/activate
(venv)$

Clone the repo

(venv)$ git clone git://github.com/chicagopython/chipy.org.git chipy.org

Make the project directory your working directory::

(venv)$ cd chipy.org

Install project dependencies::

(venv)$ pip install -r requirements.txt

Setting up the database

I recommend keeping your development DB as close to production as possible. If you're on a Mac, I recommend using Postgress.app

You will need to run::

(venv)$ python manage.py migrate

Running a web server

In development you should run::

(venv)$ python manage.py runserver

Heroku Commands

# Deploy changes to master
git push heroku master

# Deploy feature branch  
git push heroku feature/mybranch:master

# Collectstatic
heroku run python manage.py collectstatic --noinput

# Set sync and migrate the database
heroku run python manage.py migrate

# Set environment variable on Heroku
heroku config:set DEBUG=True

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.