snipt/README.md

54 lines
2.0 KiB
Markdown
Raw Normal View History

# Snipt
2016-11-03 10:03:31 -07:00
## Automatic deploy to Heroku
2016-11-03 09:21:22 -07:00
2016-11-03 09:34:09 -07:00
You can click the button below to automatically deploy Snipt to Heroku.
2016-11-03 09:21:22 -07:00
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/nicksergeant/snipt/tree/heroku)
2016-11-03 09:36:37 -07:00
**Please note:** this method will work fine, but you will not have email support
2016-11-03 09:34:09 -07:00
unless you manually configure Postmark. You don't necessarily need this,
though. After deploying the instance, visit
`https://<your-instance-name>/signup`, and create a user. You will get a 500
Server Error, which is the site trying to send a welcome email. Ignore the
error and go to `<https://your-instance-name>/login`, and log in with the
username and password you provided. Snipt will work fine, but you will not
receive any emails if there are server errors.
If you would like to configure your instance to use a free Postmark addon, do
2016-11-03 09:52:18 -07:00
the following after deploying (you'll need the
[Heroku CLI](https://devcenter.heroku.com/articles/heroku-command-line)):
2016-11-03 09:34:09 -07:00
2016-11-03 09:52:18 -07:00
- `heroku run -a <your-instance-name> addons:open postmark` -> use an email you control and confirm it
- `heroku <your-instance-name> config:add -a <your-instance-name> POSTMARK_EMAIL=<email_from_above>`
2016-11-03 09:34:09 -07:00
2016-11-03 10:03:31 -07:00
## Manual deploy to Heroku
2016-11-03 09:21:22 -07:00
2016-11-01 12:15:56 -07:00
- Clone the repo.
- `heroku create`
- `heroku addons:add heroku-postgresql:hobby-dev`
- `heroku addons:add searchbox`
- `heroku addons:create postmark:10k`
2016-11-03 09:34:09 -07:00
- `heroku addons:open postmark` -> use an email you control and confirm it
2016-11-01 12:15:56 -07:00
- `heroku config:add POSTMARK_EMAIL=<email_from_above>`
- `heroku config:add 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.
2016-11-02 13:14:56 -07:00
2016-11-03 10:03:31 -07:00
## Options
2016-11-02 13:14:56 -07:00
If you want to disable user-facing signup:
- `heroku config:set DISABLE_SIGNUP=true`
2016-11-02 13:22:23 -07:00
2016-11-03 06:49:20 -07:00
If you want to enable Django's DEBUG mode:
- `heroku config:add DEBUG=False`
2016-11-03 10:03:31 -07:00
If you want to enable SSL on a custom domain after you've configured your
Heroku SSL cert:
2016-11-03 06:49:20 -07:00
- `heroku config:add USE_SSL=False`