Skip to content

Commit

Permalink
[fiqus#35] Changing prod config for HTTPS support.
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomanuel committed Dec 24, 2019
1 parent 898a033 commit 7d089df
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ node_modules/
# this depending on your deployment strategy.
/priv/static/

# Ignore SSL certificates
/priv/ssl/*.pem

/config/*.secret.exs
.elixir_ls
.vscode
Expand Down
7 changes: 6 additions & 1 deletion config/prod.exs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ use Mix.Config
# before starting your production server.
config :coophub, CoophubWeb.Endpoint,
server: true,
force_ssl: [hsts: true],
url: [host: nil, port: 443],
http: [:inet6, port: System.get_env("PORT", "4000")],
url: [host: nil, port: System.get_env("PORT", "4000")],
https: [:inet6, port: 4443, cipher_suite: :strong,
keyfile: "priv/ssl/privkey.pem",
certfile: "priv/ssl/cert.pem"
],
secret_key_base: System.fetch_env!("SECRET_KEY_BASE"),
cache_static_manifest: "priv/static/cache_manifest.json"

Expand Down
1 change: 1 addition & 0 deletions priv/ssl/pem-files-here
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Both cert.pem and privkey.pem files should be copied here!

0 comments on commit 7d089df

Please sign in to comment.