prod.secret.exs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # In this file, we load production configuration and secrets
  2. # from environment variables. You can also hardcode secrets,
  3. # although such is generally not recommended and you have to
  4. # remember to add this file to your .gitignore.
  5. use Mix.Config
  6. database_url =
  7. System.get_env("DATABASE_URL") ||
  8. raise """
  9. environment variable DATABASE_URL is missing.
  10. For example: ecto://USER:PASS@HOST/DATABASE
  11. """
  12. config :podcast_feed, PodcastFeed.Repo,
  13. # ssl: true,
  14. url: database_url,
  15. pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10")
  16. secret_key_base =
  17. System.get_env("SECRET_KEY_BASE") ||
  18. raise """
  19. environment variable SECRET_KEY_BASE is missing.
  20. You can generate one by calling: mix phx.gen.secret
  21. """
  22. config :podcast_feed, PodcastFeedWeb.Endpoint,
  23. http: [
  24. port: String.to_integer(System.get_env("PORT") || "4000"),
  25. transport_options: [socket_opts: [:inet6]]
  26. ],
  27. secret_key_base: secret_key_base
  28. # ## Using releases (Elixir v1.9+)
  29. #
  30. # If you are doing OTP releases, you need to instruct Phoenix
  31. # to start each relevant endpoint:
  32. #
  33. # config :podcast_feed, PodcastFeedWeb.Endpoint, server: true
  34. #
  35. # Then you can assemble a release by calling `mix release`.
  36. # See `mix help release` for more information.