Vagrant with SSL


(Alex Armstrong) #1

Any pointers on creating a secure version of Discourse in Vagrant for local development?

I am in the process of testing out SSO between Discourse and a CMS (Statamic). My production environment will be https and I would like to test the SSO stuff before going live.


(Rafael dos Santos Silva) #2

I’ve found this: GitHub - rchampourlier/tunnelss: HTTPS to HTTP from the tunnels gem + automatic certificate generation for POW’s .dev domains

You can try mangling with rails server parameters too, I think thin has built in support for this.


(Robby O'Connor) #3

Why not run behind a reverse proxy?

–Rob


(Matt Palmer) #4

I’d normally suggest a self-signed cert, but my guess is that wedging that into the other end of the SSO dance is a bridge too far. You’ll need to give the Discourse instance a public-looking name, then get a LetsEncrypt cert for that name (either directly, or by proxy).


(Robby O'Connor) #5

Why not run it with Docker?

–Rob


(Alex Armstrong) #6

I can’t use Docker, because I’m on a Mac not a Linux. I need the whole caboodle. This is not my production machine; it’s only for testing purposes.

I use MAMP to serve my PHP CMS locally. MAMP can create self-signed certificates, which I can then add to the Mac’s keyring with a CLI command so that my local browsers accept it as valid. What I’m asking for is idiot-friendly instructions on doing the same (or the equivalent) for my local Vagrant Discourse so that I can test SSO between the two.

I appreciate the suggestions but my understanding of Discourse’s stack is limited. I need a bit more hand-holding.


(Eli the Bearded) #7

There is a good argument to be made for testing in an environment close (in design, not in physical locale) to your production machine.


(Robby O'Connor) #8

They have docker for Mac you know via boot2docker…plus Docker built their own thin hypervisor