Skip to content

Instantly share code, notes, and snippets.

View Camsbury's full-sized avatar

Cameron Kingsbury Camsbury

View GitHub Profile
################################################################################
# 8-bit colors
################################################################################
black='\u001b[30m'
red='\u001b[31m'
green='\u001b[32m'
yellow='\u001b[33m'
blue='\u001b[34m'
magenta='\u001b[35m'
@marcanuy
marcanuy / gunicorn-SITENAME-staging.example.com.service
Created August 7, 2015 22:55
Using Systemd to Make Sure Gunicorn Starts on Boot. As Ubuntu has switched to systemd as its service framework starting in 15.04 for all flavors, this is a migration of the Gunicorn upstart job that appears in "Test Driven Development with Django" (http://chimera.labs.oreilly.com/books/1234000000754/ch08.html#_using_upstart_to_make_sure_gunicorn…
# Gunicorn Site systemd service file
[Unit]
Description=Gunicorn server for SITENAME-staging.example.com
After=network.target
After=syslog.target
Environment=sitedir=/Development/sites/SITENAME-staging.example.com
ExecStart=$(sitedir)/virtualenv/bin/gunicorn --chdir $(sitedir)/source workouts.wsgi:application --bind unix:/tmp/SITENAME-staging.example.com.socket
Restart=on-failure