self certs
This commit is contained in:
parent
3e76b51dc7
commit
fdc7d9f1e1
3 changed files with 18 additions and 3 deletions
|
|
@ -9,4 +9,11 @@ echo 'export SECRET_KEY_BASE='$key >> ~/.bashrc
|
|||
fi
|
||||
if [ -z "$PORT"]; then
|
||||
echo 'export PORT=443' >> ~/.bashrc
|
||||
fi
|
||||
# and cert paths
|
||||
if [ -z "$GCLP_SSL_KEY_PATH"]; then
|
||||
echo 'export GCLP_SSL_KEY_PATH=GCLP/lp/priv/cert/selfsigned_key.pem' >> ~/.bashrc
|
||||
fi
|
||||
if [ -z "$GCLP_APP_SSL_CERT_PATH"]; then
|
||||
echo 'export GCLP_APP_SSL_CERT_PATH=GCLP/lp/priv/cert/selfsigned.pem' >> ~/.bashrc
|
||||
fi
|
||||
|
|
@ -12,6 +12,14 @@ use Mix.Config
|
|||
config :lp, LpWeb.Endpoint,
|
||||
# url: [host: "example.com", port: 80],
|
||||
url: [host: "35.193.215.48", port: 443],
|
||||
https: [
|
||||
port: 443,
|
||||
cipher_suite: :strong,
|
||||
keyfile: System.get_env("GCLP_SSL_KEY_PATH"),
|
||||
certfile: System.get_env("GCLP_APP_SSL_CERT_PATH"),
|
||||
transport_options: [socket_opts: [:inet6]]
|
||||
]
|
||||
#
|
||||
#usually you would not want to do that, but i'm lazy. adjust to your machine
|
||||
cache_static_manifest: "priv/static/cache_manifest.json"
|
||||
|
||||
|
|
@ -47,8 +55,8 @@ config :logger, level: :info
|
|||
# We also recommend setting `force_ssl` in your endpoint, ensuring
|
||||
# no data is ever sent via http, always redirecting to https:
|
||||
#
|
||||
# config :lp, LpWeb.Endpoint,
|
||||
# force_ssl: [hsts: true]
|
||||
config :lp, LpWeb.Endpoint,
|
||||
force_ssl: [hsts: true]
|
||||
#
|
||||
# Check `Plug.SSL` for all available options in `force_ssl`.
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ database_url =
|
|||
"""
|
||||
|
||||
config :lp, Lp.Repo,
|
||||
# ssl: true,
|
||||
ssl: true,
|
||||
url: database_url,
|
||||
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10")
|
||||
|
||||
|
|
|
|||
Reference in a new issue