Snipt: Glitch Edition
 
 
 
 
 
 
Go to file
an cb984ac6ce desecrate the corporate element 2019-07-29 10:13:58 -04:00
accounts desecrate the corporate element 2019-07-29 10:13:58 -04:00
blogs desecrate the corporate element 2019-07-29 10:13:58 -04:00
media desecrate the corporate element 2019-07-29 10:13:58 -04:00
snipts desecrate the corporate element 2019-07-29 10:13:58 -04:00
static Add static. 2014-10-20 22:29:03 -04:00
teams desecrate the corporate element 2019-07-29 10:13:58 -04:00
templates desecrate the corporate element 2019-07-29 10:13:58 -04:00
user-admin Black. 2019-01-23 18:52:55 -05:00
utils Black. 2019-01-23 18:52:55 -05:00
.gitignore Some initial work on gutting es 2019-01-23 18:51:49 -05:00
.venv Adding venvs 2011-11-06 10:04:19 -05:00
Procfile Prepping for Heroku. 2016-11-29 23:05:00 -05:00
README.md Readme 2019-04-24 09:24:25 -04:00
__init__.py Moving 2012-03-04 15:49:51 -05:00
app.json desecrate the corporate element 2019-07-29 10:13:58 -04:00
manage.py Removing some old Gunicorn stuff and refactors for Django 1.6. 2013-11-06 14:10:04 -05:00
requirements.txt Bump deps for security 2019-05-27 17:01:34 -04:00
resources.sh desecrate the corporate element 2019-07-29 10:13:58 -04:00
runtime.txt Peg to Python 3.7 2019-05-27 17:04:52 -04:00
settings.py Revert "Snipt -> Siftie, first pass." 2019-04-24 09:09:50 -04:00
settings_local.py-template desecrate the corporate element 2019-07-29 10:13:58 -04:00
urls.py Disable search until we can get ES going again. 2019-01-31 11:31:00 -05:00
views.py desecrate the corporate element 2019-07-29 10:13:58 -04:00
wsgi.py Need settings. 2016-11-29 23:05:00 -05:00

README.md

Snipt

Running locally

  • Clone the repo.
  • cd snipt
  • python3 -m venv ~/.virtualenvs/snipt
  • source ~/.virtualenvs/snipt/bin/activate
  • pip install -r requirements.txt
  • brew install postgresql
  • brew services start postgresql
  • createuser snipt
  • createdb snipt --owner=snipt
  • cp settings_local.py-template settings_local.py // modify if necessary
  • make run

Deploying on Dokku

  • dokku apps:create snipt
  • dokku postgres:create snipt
  • dokku postgres:link snipt snipt
  • scp snipt.dump nsergeant@server.nicksergeant.com:/home/nsergeant
  • dokku postgres:connect snipt < snipt.dump
  • dokku domains:add snipt snipt.net
  • dokku storage:mount snipt /var/lib/dokku/data/storage/snipt-whoosh:/app/snipt-whoosh
  • dokku config:set DOKKU_LETSENCRYPT_EMAIL=support@snipt.net SECRET_KEY=<some-secret-key> USE_SSL=true WHOOSH_PATH=/app/snipt-whoosh/whoosh_index
  • git remote add dokku dokku@server.nicksergeant.com:snipt
  • git push dokku

Automatic deploy to Heroku

You can click the button below to automatically deploy Snipt 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/nicksergeant/snipt
  • cd snipt
  • 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