11use Mix.Config
22
3- # For production, we configure the host to read the PORT
4- # from the system environment. Therefore, you will need
5- # to set PORT=80 before running your server.
3+ # For production, we often load configuration from external
4+ # sources, such as your system environment. For this reason,
5+ # you won't find the :http configuration below, but set inside
6+ # BlogWeb.Endpoint.init/2 when load_from_system_env is
7+ # true. Any dynamic configuration should be done there.
68#
7- # You should also configure the url host to something
8- # meaningful, we use this information when generating URLs.
9+ # Don't forget to configure the url host to something meaningful,
10+ # Phoenix uses this information when generating URLs.
911#
10- # Finally, we also include the path to a manifest
12+ # Finally, we also include the path to a cache manifest
1113# containing the digested version of static files. This
12- # manifest is generated by the mix phoenix .digest task
14+ # manifest is generated by the mix phx .digest task
1315# which you typically run after static files are built.
14- config :blog , Blog .Endpoint,
15- http: [ port: { :system , "PORT" } ] ,
16+ config :blog , BlogWeb .Endpoint,
17+ load_from_system_env: true ,
1618 url: [ host: "example.com" , port: 80 ] ,
17- cache_static_manifest: "priv/static/manifest .json"
19+ cache_static_manifest: "priv/static/cache_manifest .json"
1820
1921# Do not print debug messages in production
2022config :logger , level: :info
@@ -24,10 +26,11 @@ config :logger, level: :info
2426# To get SSL working, you will need to add the `https` key
2527# to the previous section and set your `:url` port to 443:
2628#
27- # config :blog, Blog .Endpoint,
29+ # config :blog, BlogWeb .Endpoint,
2830# ...
2931# url: [host: "example.com", port: 443],
30- # https: [port: 443,
32+ # https: [:inet6,
33+ # port: 443,
3134# keyfile: System.get_env("SOME_APP_SSL_KEY_PATH"),
3235# certfile: System.get_env("SOME_APP_SSL_CERT_PATH")]
3336#
@@ -38,7 +41,7 @@ config :logger, level: :info
3841# We also recommend setting `force_ssl`, ensuring no data is
3942# ever sent via http, always redirecting to https:
4043#
41- # config :blog, Blog .Endpoint,
44+ # config :blog, BlogWeb .Endpoint,
4245# force_ssl: [hsts: true]
4346#
4447# Check `Plug.SSL` for all available options in `force_ssl`.
@@ -53,12 +56,8 @@ config :logger, level: :info
5356# Alternatively, you can configure exactly which server to
5457# start per endpoint:
5558#
56- # config :blog, Blog .Endpoint, server: true
59+ # config :blog, BlogWeb .Endpoint, server: true
5760#
58- # You will also need to set the application root to `.` in order
59- # for the new static assets to be served after a hot upgrade:
60- #
61- # config :blog, Blog.Endpoint, root: "."
6261
6362# Finally import the config/prod.secret.exs
6463# which should be versioned separately.
0 commit comments