Skip to content

Commit

Permalink
feat: MongoDB Connection Options (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-martinez authored and taorepoara committed Oct 8, 2023
1 parent 67a7056 commit b2b7721
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
9 changes: 8 additions & 1 deletion server/config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,16 @@ config :application_runner,
faas_url: "http://localhost:3000",
faas_auth: "",
env: Mix.env() |> Atom.to_string(),
mongo_url: System.get_env("MONGO_URL", "mongodb://localhost:27017"),
listeners_timeout: 1 * 60 * 60 * 1000

config :application_runner, :mongo,
hostname: System.get_env("MONGO_HOSTNAME", "localhost"),
port: System.get_env("MONGO_PORT", "27017"),
username: System.get_env("MONGO_USERNAME"),
password: System.get_env("MONGO_PASSWORD"),
ssl: System.get_env("MONGO_SSL", "false"),
auth_source: System.get_env("MONGO_AUTH_SOURCE")

config :application_runner, ApplicationRunner.Guardian.AppGuardian,
issuer: "lenra",
secret_key: "5oIBVh2Hauo3LT4knNFu29lX9DYu74SWZfjZzYn+gfr0aryxuYIdpjm8xd0qGGqK"
Expand Down
11 changes: 9 additions & 2 deletions server/config/releases.exs
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,12 @@ config :application_runner,
System.get_env(
"OF_WATCHDOG_URL",
"http://localhost:#{System.get_env("OF_WATCHDOG_PORT", "8080")}"
),
mongo_url: System.get_env("MONGO_URL")
)

config :application_runner, :mongo,
hostname: System.get_env("MONGO_HOSTNAME", "localhost"),
port: System.get_env("MONGO_PORT", "27017"),
username: System.get_env("MONGO_USERNAME"),
password: System.get_env("MONGO_PASSWORD"),
ssl: System.get_env("MONGO_SSL", "false"),
auth_source: System.get_env("MONGO_AUTH_SOURCE")
2 changes: 1 addition & 1 deletion server/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ defmodule DevTool.MixProject do
{:postgrex, "~> 0.15.8"},
{:application_runner,
git: "https://github.com/lenra-io/application-runner.git",
tag: "v1.0.0-beta.96",
tag: "v1.0.0-beta.97",
submodules: true},
{:lenra_common, git: "https://github.com/lenra-io/lenra-common.git", tag: "v2.4.0"},
{:distillery, "~> 2.1"}
Expand Down
2 changes: 1 addition & 1 deletion server/mix.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%{
"application_runner": {:git, "https://github.com/lenra-io/application-runner.git", "59bb7fc0137572c3798b0e48c351eb52f395ad24", [tag: "v1.0.0-beta.96", submodules: true]},
"application_runner": {:git, "https://github.com/lenra-io/application-runner.git", "39fd75e1742fc48b246fe1b61b78a8b356c1532a", [tag: "v1.0.0-beta.97", submodules: true]},
"artificery": {:hex, :artificery, "0.4.3", "0bc4260f988dcb9dda4b23f9fc3c6c8b99a6220a331534fdf5bf2fd0d4333b02", [:mix], [], "hexpm", "12e95333a30e20884e937abdbefa3e7f5e05609c2ba8cf37b33f000b9ffc0504"},
"bunt": {:hex, :bunt, "0.2.1", "e2d4792f7bc0ced7583ab54922808919518d0e57ee162901a16a1b6664ef3b14", [:mix], [], "hexpm", "a330bfb4245239787b15005e66ae6845c9cd524a288f0d141c148b02603777a5"},
"bypass": {:hex, :bypass, "2.1.0", "909782781bf8e20ee86a9cabde36b259d44af8b9f38756173e8f5e2e1fabb9b1", [:mix], [{:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.0", [hex: :plug_cowboy, repo: "hexpm", optional: false]}, {:ranch, "~> 1.3", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "d9b5df8fa5b7a6efa08384e9bbecfe4ce61c77d28a4282f79e02f1ef78d96b80"},
Expand Down

0 comments on commit b2b7721

Please sign in to comment.