Snipt: Glitch Edition
 
 
 
 
 
 
Go to file
Nick Sergeant 0f8556a80a Moar snippets 2019-01-23 17:23:45 -05:00
accounts More work on getting Snippets up. 2019-01-21 20:10:10 -05:00
blogs Remove gittip 2019-01-22 19:48:26 -05:00
media Readme and fix CSS 2019-01-22 20:35:11 -05:00
snipts Remove gittip 2019-01-22 19:48:26 -05:00
static Add static. 2014-10-20 22:29:03 -04:00
teams More work on getting Snippets up. 2019-01-21 20:10:10 -05:00
templates Remove gittip 2019-01-22 19:48:26 -05:00
user-admin User admin needs to be in a module, now. 2015-09-24 15:09:02 -04:00
utils Remove requirement on Postmark for basic installs. 2016-11-29 23:07:36 -05:00
.gitignore Makefile 2015-10-12 12:59:15 -04:00
.venv Adding venvs 2011-11-06 10:04:19 -05:00
Makefile Moar snippets 2019-01-23 17:23:45 -05:00
Procfile Prepping for Heroku. 2016-11-29 23:05:00 -05:00
README.md Fix snippets 2019-01-23 17:00:37 -05:00
__init__.py Moving 2012-03-04 15:49:51 -05:00
app.json Snipt -> Siftie, first pass. 2019-01-21 18:21:25 -05:00
manage.py Removing some old Gunicorn stuff and refactors for Django 1.6. 2013-11-06 14:10:04 -05:00
requirements.txt Mother of God 2019-01-21 20:32:00 -05:00
settings.py Snipt -> Siftie, first pass. 2019-01-21 18:21:25 -05:00
settings_local.py-template More work on getting Snippets up. 2019-01-21 20:10:10 -05:00
urls.py Cleanup auth stuff. 2016-11-29 23:07:36 -05:00
views.py Cleanup homepage for private. 2016-11-29 23:07:36 -05:00
wsgi.py Need settings. 2016-11-29 23:05:00 -05:00

README.md

Siftie Snippets

Running locally

  • Clone the repo.
  • cd snippets
  • python3 -m venv ~/.virtualenvs/snippets
  • source ~/.virtualenvs/snippets/bin/activate
  • pip install -r requirements.txt
  • brew install postgresql
  • brew services start postgresql
  • createuser snippets
  • createdb snippets --owner=snippets
  • cp settings_local.py-template settings_local.py // modify if necessary
  • brew install elasticsearch
  • brew services start elasticsearch
  • curl -X PUT "localhost:9200/haystack?pretty"
  • python manage.py update_index // optional if you have a local DB dump with snippets
  • make run

Deploying on Dokku

  • dokku apps:create snippets
  • dokku postgres:create snippets
  • dokku postgres:link snippets snippets
  • scp snipt.dump nsergeant@server.nicksergeant.com:/home/nsergeant
  • dokku postgres:connect snippets < snipt.dump
  • dokku domains:add snippets snippets.siftie.com
  • dokku config:set DOKKU_LETSENCRYPT_EMAIL=team@siftie.com SECRET_KEY=<some-secret-key> USE_SSL=true
  • git remote add dokku dokku@server.nicksergeant.com:snippets
  • git push dokku
  • Elasticsearch 2.x only!

Automatic deploy to Heroku

You can click the button below to automatically deploy Siftie Snippets to Heroku.

Deploy

Manual deploy to Heroku

  • Clone the repo.
  • heroku create
  • heroku addons:add heroku-postgresql:hobby-dev
  • heroku addons:add searchbox
  • heroku config:add SECRET_KEY=<some-secret-key>
  • git push heroku
  • heroku run python manage.py migrate
  • heroku run python manage.py createsuperuser
  • Visit yourapp.herokuapp.com and login with the user you just created.

Updating your Heroku instance after an automatic deploy

  • git clone https://github.com/siftie/snippets
  • cd snippets
  • git checkout heroku
  • heroku git:remote -a <your-instance-name>
  • git push heroku heroku:master

Options

If you want email support (for password resets, server errors, etc):

  • heroku addons:create postmark:10k
  • heroku run addons:open postmark -> use an email you control and confirm it
  • heroku config:add POSTMARK_EMAIL=<email_from_above>

If you want to disable user-facing signup:

  • heroku config:set DISABLE_SIGNUP=true

If you want to enable Django's DEBUG mode:

  • heroku config:add DEBUG=true

If you want to enable SSL on a custom domain after you've configured your Heroku SSL cert:

  • heroku config:add USE_SSL=true