Giter VIP home page Giter VIP logo

wearhacks-website's Introduction

Wearhacks Montreal 2015 Website Source

Branches

Installation

Requirements

  • pip - instructions here
  • virtualenvwrapper - instructions here
  • npm - instructions here

Quick setup

$ git clone [email protected]:eleyine/WearHacks-Website.git
$ cd WearHacks-Website
$ chmod u+x setup.sh
# The next two steps are optional but strongly recommended
$ mkvirtualenv wearhacks-website
$ workon wearhacks-website
(wearhacks-website) $ ./setup.sh

Note: setup.sh will copy example_private_settings.py to private.py. If you are on your local machine in dev mode, there's no need to edit it. However, if you'd like to deploy, please update wearhacks_website/settings/private.py with your sensitive and deployment-specific settings.

Manual install: what's in setup.sh?

If you don't want to use setup.sh

$ mkvirtualenv wearhacks-website
$ workon wearhacks-website
(wearhacks-website) $ pip install -r requirements.txt
(wearhacks-website) $ bower install
(wearhacks-website) $ cp wearhacks_website/settings/example_private_settings.py wearhacks_website/settings/private.py
(wearhacks-website) $ python manage.py makemigrations
(wearhacks-website) $ python manage.py migrate
(wearhacks-website) $ python manage.py generate_registrations 3
(wearhacks-website) $ python manage.py runserver

Now, open http://127.0.0.1:8000/.

Usage

  • To run on localhost:

    $ workon wearhacks-website
    (wearhacks-website) $ python manage.py runserver
  • By default, you will use the Django settings defined in wearhacks_settings/settings/dev.py.

  • To use production settings defined in wearhacks_settings/settings/prod.py:

    (wearhacks-website) $ export APP_ENV=prod
    (wearhacks-website) $ python manage.py runserver
  • You can edit wearhacks_settings/settings/private.py to enter sensitive and user-specific settings. All settings in private.py will override those defined in dev.py and prod.py. See wearhacks_website/settings/__init__.py for more information.

Stripe settings

The registration app handles payment via Stripe. To test this feature, edit in your Stripe API keys in your private settings files (wearhacks_website/*private.py).

Deployment on Digital Ocean

I wrote a fabric script to automate installation on Digital Ocean droplets using the one-step Django installation. If you are deploying elsewhere, you can have an idea of the steps to take by inspecting server_files/fabfile.py.

Here are the setup instructions if you choose to do it with Digital Ocean.

  • Create a Digital Ocean droplet with a Django installation image

  • Ssh into your droplet to obtain the postgresql database password. It will be displayed in the welcome message.

  • Copy wearhacks_website/settings/private.py to wearhacks_website/settings/server_private.py and uncomment the postgresql settings. Edit in your postgresql password from the step above.

  • Make sure you have fabric installed locally. If you ran setup.sh, you already have it.

  • In wearhacks_website/server_files/, copy fab_config_example.py and rename it to fab_config.py. Edit in in your deployment host address.

  • Then in server_files, run fab all

  • If you'd like a list of fab commands, run fab -l

wearhacks-website's People

Contributors

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