feat: execute service as distributed erlang (#96)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
To create a cluster with distributed nodes, the following changes were made: * Use [`dns_cluster`][0] to execute distributed nodes * Add _script_ to execute distributed nodes locally Also, improve local execution by: * Use [`mix release`][1] to make easier [deploy `phoenix`][2] * Use [`compose watch`][3] to synchronize code from the host with the service Some minor improvements: * Ignore files and folders in git and docker * Remove boilerplate comments [0]: https://github.com/phoenixframework/dns_cluster [1]: https://hexdocs.pm/mix/Mix.Tasks.Release.html [2]: https://hexdocs.pm/phoenix/releases.html [3]: https://docs.docker.com/compose/how-tos/file-watch/ Co-authored-by: Joao P Dubas <joao.dubas@gmail.com> Reviewed-on: #96 Co-authored-by: Joao P Dubas <joao.dubas+gitea@gmail.com> Co-committed-by: Joao P Dubas <joao.dubas+gitea@gmail.com>
This commit is contained in:
@@ -1,5 +1,35 @@
|
||||
import Config
|
||||
|
||||
# [warn] Conditional IPv6 support missing from runtime configuration.
|
||||
#
|
||||
# Add the following to your config/runtime.exs:
|
||||
#
|
||||
# maybe_ipv6 = if System.get_env("ECTO_IPV6") in ~w(true 1), do: [:inet6], else: []
|
||||
#
|
||||
# config :wabanex, Wabanex.Repo,
|
||||
# ...,
|
||||
# socket_options: maybe_ipv6
|
||||
#
|
||||
# [warn] Conditional server startup is missing from runtime configuration.
|
||||
#
|
||||
# Add the following to the top of your config/runtime.exs:
|
||||
#
|
||||
# if System.get_env("PHX_SERVER") do
|
||||
# config :wabanex, WabanexWeb.Endpoint, server: true
|
||||
# end
|
||||
#
|
||||
# [warn] Environment based URL export is missing from runtime configuration.
|
||||
#
|
||||
# Add the following to your config/runtime.exs:
|
||||
#
|
||||
# host = System.get_env("PHX_HOST") || "example.com"
|
||||
#
|
||||
# config :wabanex, WabanexWeb.Endpoint,
|
||||
# ...,
|
||||
# url: [host: host, port: 443]
|
||||
|
||||
config :wabanex, dns_cluster_query: System.get_env("DNS_CLUSTER_QUERY") || :ignore
|
||||
|
||||
config :wabanex, Wabanex.Repo,
|
||||
username: System.get_env("POSTGRES_USER") || "postgres",
|
||||
password: System.get_env("POSTGRES_PASS") || "postgres",
|
||||
|
Reference in New Issue
Block a user