Readme and email.

master
Nick Sergeant 2016-11-01 15:15:56 -04:00
parent 433e8fe921
commit b08ca9a803
4 changed files with 17 additions and 17 deletions

View File

@ -23,18 +23,18 @@ Install [Vagrant](https://www.vagrantup.com/) and either [VirtualBox](https://ww
# Deploying to Heroku
1. Clone the repo.
2. `heroku create`
3. `heroku addons:add heroku-postgresql:hobby-dev`
4. `heroku addons:add searchbox`
5. `heroku addons:create postmark:10k`
8. `heroku config:add DEBUG=False`
9. `heroku config:add POSTMARK_API_KEY=`
12. `heroku config:add SECRET_KEY=`
13. `heroku config:add STRIPE_SECRET_KEY=`
14. `heroku config:add USE_SSL=False`
15. `git push heroku`
16. `heroku run python manage.py syncdb`
17. `heroku run python manage.py migrate`
- Clone the repo.
- `heroku create`
- `heroku addons:add heroku-postgresql:hobby-dev`
- `heroku addons:add searchbox`
- `heroku addons:create postmark:10k`
- `heroku addons:open postmark` -> use an email you control
- `heroku config:add POSTMARK_EMAIL=<email_from_above>`
- `heroku config:add DEBUG=False`
- `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.
Any problems / questions / bugs, [create an issue](https://github.com/nicksergeant/snipt/issues). Thanks! :)

View File

@ -37,7 +37,7 @@ AUTH_PROFILE_MODULE = 'accounts.UserProfile'
AUTHENTICATION_BACKENDS = ('utils.backends.EmailOrUsernameModelBackend',)
BASE_PATH = os.path.dirname(__file__)
DEBUG = True if 'DEBUG' in os.environ else False
DEFAULT_FROM_EMAIL = os.environ.get('POSTMARK_INBOUND_ADDRESS', 'snipt@localhost')
DEFAULT_FROM_EMAIL = os.environ.get('POSTMARK_EMAIL', 'snipt@localhost')
EMAIL_BACKEND = 'postmark.django_backend.EmailBackend'
HAYSTACK_SIGNAL_PROCESSOR = 'haystack.signals.RealtimeSignalProcessor'
INTERNAL_IPS = ('127.0.0.1',)
@ -65,7 +65,7 @@ ROOT_URLCONF = 'urls'
SECRET_KEY = os.environ.get('SECRET_KEY', 'changeme')
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
SEND_BROKEN_LINK_EMAILS = False
SERVER_EMAIL = os.environ.get('POSTMARK_INBOUND_ADDRESS', 'snipt@localhost')
SERVER_EMAIL = os.environ.get('POSTMARK_EMAIL', 'snipt@localhost')
SESSION_COOKIE_AGE = 15801100
SESSION_COOKIE_SECURE = True if 'USE_SSL' in os.environ else False
SITE_ID = 1

View File

@ -102,7 +102,7 @@ def report_spam(request, snipt_id):
User: https://snipt.net/admin/auth/user/{}/delete/
Reporter: https://snipt.net/{}/
""".format(snipt.id, snipt.user.id, request.user.username),
os.environ.get('POSTMARK_INBOUND_ADDRESS', 'snipt@localhost'),
os.environ.get('POSTMARK_EMAIL', 'snipt@localhost'),
['nick@snipt.net'],
fail_silently=False)

View File

@ -42,7 +42,7 @@ def for_teams_complete(request):
Team: https://snipt.net/{}
Email: {}
""".format(team.slug, team.email),
os.environ.get('POSTMARK_INBOUND_ADDRESS', 'snipt@localhost'),
os.environ.get('POSTMARK_EMAIL', 'snipt@localhost'),
['nick@snipt.net'],
fail_silently=False)