From 7828308a9f36cf39886ae12a5afc71ad163b0e7b Mon Sep 17 00:00:00 2001 From: John Lees-Miller Date: Sat, 27 Oct 2018 22:41:58 +0100 Subject: [PATCH] Add deployment advice --- README.md | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9c83c78..d649e79 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,13 @@ So you're getting married :tada: -This is a simple rails app for distributing wedding information and managing the guest list. You will probably decide to build your own, like I did, but if you like, you can start with this one. It's been through at least one wedding successfully! +This is a simple rails app for distributing wedding information and managing the guest list. You will probably decide to build your own (like me…) but if you like you can start with this one. It's been through at least one wedding successfully! ## Is it any good? > THIS WEBSITE IS AWESOME! Best wedding invite ever. > -- One of our guests - ## Features - Guests can RSVP, including dietary requirements and plus ones @@ -52,7 +51,7 @@ docker-compose logs -f By default, the app will run on http://localhost:3000 -The admin interface is on http://localhost:3000/admin +The admin interface is on http://localhost:3000/admin. Once you are logged into the admin, you can go to Admin Users, find the default admin user, and change its email address, if you like (you will need to re-enter the password). To access the database: @@ -152,6 +151,37 @@ If set, the website will use an invisible reCAPTCHA to prevent spam. You can get - `RECAPTCHA_SITE_KEY` — the `data-sitekey` for the Client side integration - `RECAPTCHA_SECRET_KEY` — the `secret` for the Server side integration +## Deployment + +Heroku makes it easy to deploy rails apps like this one. The free postgres database is enough, unless you have > 10k guests! You can set up a Heroku app and connect it to your GitHub repo. + +You must set the canonical host and email addresses in order to be able to send email: + +``` +heroku config:set \ + CANONICAL_HOST=www.mywedding.com \ + CONTACT_EMAIL='Example Name ' \ + FROM_EMAIL='Example Name ' +``` + +You will also need to set up SMTP by setting the config variables above. One way to do this is to use your [Google Mail account's SMTP server](https://www.digitalocean.com/community/tutorials/how-to-use-google-s-smtp-server). + +Then you can get up and running with: + +``` +heroku run rails db:migrate db:seed +``` + +Watch the output of `db:seed` for the default admin credentials, like in development. The admin console will be available on `/admin`. + +If you like, you can also turn on reCAPTCHA, as above. + +``` +heroku config:set \ + RECAPTCHA_SITE_KEY=... \ + RECAPTCHA_SECRET_KEY=... +``` + ## License [BSD License](LICENSE.md)