/techtonica

This repo is for the Techtonica website: techtonica.org

Primary LanguageHTML

Techtonica

This repo is for the Techtonica website, which is currently hosted on DreamHost.

Who

The audience of the website is made up of (potential) volunteers and sponsors. (Apprentices will be contacted via local organizations.)

What

We need to effectively communicate that Techtonica and its apprentices are worth supporting.

How

There should be a good understanding of how the program works with vetting, training, mentoring, and hiring.

Getting Started

This app uses Python 2.7; please stick to this version.

Running Locally

It is recommended you use a virtual environment tool to keep dependencies required by different projects separate. Learn more about Python virtual environments

Install the project dependencies. In the project root run:

pip install -r requirements.txt

Start the application's server:

FLASK_DEBUG=1 FLASK_APP=main_site.py flask run

Browse to http://localhost:5000.

Styling changes should be made to the Sass (.scss) files and then compiled to CSS using one of the following commands:

sass static/sass/style.scss static/css/style.css
sass --watch static/sass/style.scss static/css/style.css 

Deployment to DreamHost

Initial Setup

  1. Follow the instructions in the Setting up and deploying Python Flask to Dreamhost blog post.

  2. Update package tools, while you're still operating in the virtual environment:

    pip install -U pip setuptools

Updating the Site

  1. Log in via SSH using your SSH key.

  2. Change directory to the appropriate domain:

    cd techtonica.org

    or

    cd staging.techtonica.org
  3. Activate the virtual envrionment:

    . bin/activate
  4. Change to the source directory:

    cd techtonica
  5. Use the usual git commands to get the latest code or check out another branch.

  6. Update requirements:

    pip-sync
  7. "Restart" the passenger process:

    cd .. && touch tmp/restart.txt