Giter Club home page Giter Club logo

odewahn-atlas-utilities's Introduction

This repo contains various utilities for Atlas.

Running locally

  • Set up configuration variables in .env file. Make sure to use the staging credentials.

  • Install (if necessary) and start the redis server.

  • Start the app using "shotgun" (or whatever)

  • Start the workers using "rake resque:work QUEUE=\*"

Running on Production/Heroku

  • Set up the environment variables using "heroku config:add". Be sure to use production variables.

  • Add "Redis to go"

  • Scale the app "heroku ps:scale web=2 worker=1"

Installing SSL certs on Heroku

O’Reilly uses godaddy as a DNS and cert provider. Installing certs from GoDaddy require an extra step on Heroku that is not covered in their otherwise excellent docs. This post, Setup A GoDaddy SSL Certificate on Heroku , explains it pretty well, but the meat of it is that you have to concatenate the crt file from GoDaddy with the gd_bundle.crt file they provide, like this:

cat atlas-utilities.oreilly.com.crt gd_bundle.crt > combined.crt

You then have to use this combined file as your certificate:

heroku certs:add  combined.crt atlas-utilities.oreilly.com.key

If you don’t do this, you’ll keep getting this error:

Resolving trust chain... failed
 !    No certificate given.

Finally, you have to have IT set up a CNAME to point to the new endpoint. The important thing to remember is that you have to give them the SSL endpoint, which you can get from the command "heroku certs":

$ heroku certs
Endpoint                  Common Name(s)                                                Expires               Trusted
------------------------  ------------------------------------------------------------  --------------------  -------
tokyo-5211.herokussl.com  atlas-utilities.oreilly.com, www.atlas-utilities.oreilly.com  2016-07-03 18:56 UTC  True

You won’t be able to access the app until the CNAME is set up. O’Reilly runs its own DNS server, so we set up the CNAME in a a mysql database. It should look like this:

+-------+-----------+-----------------------------+-------+------+------+--------------------------+
| id    | domain_id | name                        | type  | ttl  | prio | content                  |
+-------+-----------+-----------------------------+-------+------+------+--------------------------+
| 14108 |        70 | atlas-utilities.oreilly.com | CNAME | NULL | NULL | tokyo-5211.herokussl.com |
+-------+-----------+-----------------------------+-------+------+------+--------------------------+

Closing off the app on port 80. I need to figure out is this is a backdoor if we only want this to go through port 443

odewahn-atlas-utilities's People

Contributors

odewahn avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.