Skip to content
This repository was archived by the owner on Aug 11, 2022. It is now read-only.

Commit d078251

Browse files
author
Adrien Anselme
committed
Modified README to include prod advices
1 parent 3b0ad19 commit d078251

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,26 @@ config :exrecaptcha,
4141
* verify_url: Google ReCaptcha's verify url
4242
* public_key, private_key: as given by Google on [https://www.google.com/recaptcha/admin#list](https://www.google.com/recaptcha/admin#list)
4343

44+
In order to use https in production, modify `config/prod.exs` as follows:
45+
46+
```elixir
47+
config :phoenix, SbSso.Router,
48+
port: System.get_env("PORT"),
49+
ssl: true,
50+
keyfile: System.get_env("SSL_KEYFILE")",
51+
certfile: System.get_env("SSL_CERTFILE")",
52+
cacertfile: System.get_env("SSL_CACERTFILE")",
53+
password: System.get_env("SSL_PWD"),
54+
#...
55+
56+
```
57+
58+
You can then pass your environment variables at startup:
59+
60+
```bash
61+
SSL_PWD=abcdef SSL_KEYFILE=/abc/d.key ... MIX_ENV=prod elixir -pa _build/prod/consolidated -S mix phoenix.start
62+
```
63+
4464
## Notes
4565
4666
* For more information on the way SSO is implemented, please refer to [Discourse's website](https://meta.discourse.org/t/official-single-sign-on-for-discourse/13045), since it was done to comply to their protocol.

0 commit comments

Comments
 (0)