Snipt
Running locally
- Clone the repo.
cd sniptpython3 -m venv ~/.virtualenvs/sniptsource ~/.virtualenvs/snipt/bin/activatepip install -r requirements.txtbrew install postgresqlbrew services start postgresqlcreateuser sniptcreatedb snipt --owner=sniptcp settings_local.py-template settings_local.py// modify if necessarymake run
Deploying on Dokku
dokku apps:create sniptdokku postgres:create sniptdokku postgres:link snipt sniptscp snipt.dump nsergeant@server.nicksergeant.com:/home/nsergeantdokku postgres:connect snipt < snipt.dumpdokku domains:add snipt snipt.netdokku storage:mount snipt /var/lib/dokku/data/storage/snipt-whoosh:/app/snipt-whooshdokku config:set DOKKU_LETSENCRYPT_EMAIL=support@snipt.net SECRET_KEY=<some-secret-key> USE_SSL=true WHOOSH_PATH=/app/snipt-whoosh/whoosh_indexgit remote add dokku dokku@server.nicksergeant.com:sniptgit push dokku
Automatic deploy to Heroku
You can click the button below to automatically deploy Snipt to Heroku.
Manual deploy to Heroku
- Clone the repo.
heroku createheroku addons:add heroku-postgresql:hobby-devheroku addons:add searchboxheroku config:add SECRET_KEY=<some-secret-key>git push herokuheroku run python manage.py migrateheroku 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/sniptcd sniptgit checkout herokuheroku 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:10kheroku run addons:open postmark-> use an email you control and confirm itheroku 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