releases.exs 787 B

12345678910111213141516171819202122232425262728
  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. import Config
  6. host_ip =
  7. System.get_env("HOST_IP") ||
  8. raise "environment variable HOST_IP is missing."
  9. port =
  10. System.get_env("PORT") ||
  11. raise "environment variable PORT is missing."
  12. config :vaccins, VaccinsWeb.Endpoint,
  13. url: [host: host_ip, port: port],
  14. http: [
  15. port: String.to_integer(port),
  16. net: :inet,
  17. transport_options: [socket_opts: [:inet6]]
  18. ],
  19. check_origin: [
  20. "http://localhost:#{port}",
  21. "http://192.168.0.13:#{port}",
  22. "http://#{host_ip}:#{port}"
  23. ]
  24. config :vaccins, VaccinsWeb.Endpoint, server: true