Files
firezone/config/dev.exs
Jamil Bou Kheir 765976275e Add diagnostic pinger; default settings
Also don't display DNSservers when empty.

Fixes firezone/backlog#135
Fixes firezone/backlog#123
Fixes firezone/backlog#130

Refs #333
2021-12-09 15:24:10 -08:00

118 lines
3.2 KiB
Elixir

import Config
# Configure your database
if url = System.get_env("DATABASE_URL") do
config :fz_http, FzHttp.Repo,
url: url,
show_sensitive_data_on_connection_error: true,
pool_size: 10
else
config :fz_http, FzHttp.Repo,
username: "postgres",
password: "postgres",
database: "firezone_dev",
hostname: "localhost",
show_sensitive_data_on_connection_error: true,
pool_size: 10
end
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with webpack to recompile .js and .css sources.
config :fz_http, FzHttpWeb.Endpoint,
http: [port: 4000],
debug_errors: true,
code_reloader: true,
url: [host: "localhost", scheme: "http"],
check_origin: ["//127.0.0.1", "//localhost"],
watchers: [
node: [
"node_modules/webpack/bin/webpack.js",
"--mode",
"development",
"--watch",
"--watch-options-stdin",
cd: Path.expand("../apps/fz_http/assets", __DIR__)
]
]
sandbox? = System.get_env("FZ_SANDBOX")
config :fz_vpn,
wg_path: "wg",
cli:
(if sandbox? do
FzVpn.CLI.Sandbox
else
FzVpn.CLI.Live
end)
get_egress_interface = fn ->
egress_interface_cmd = "route | grep '^default' | grep -o '[^ ]*$'"
System.cmd("/bin/sh", ["-c", egress_interface_cmd]) |> elem(0) |> String.trim()
end
egress_interface = System.get_env("EGRESS_INTERFACE") || get_egress_interface.()
config :fz_wall,
nft_path: "nft",
egress_interface: egress_interface,
cli:
(if sandbox? do
FzWall.CLI.Sandbox
else
FzWall.CLI.Live
end)
# ## SSL Support
#
# In order to use HTTPS in development, a self-signed
# certificate can be generated by running the following
# Mix task:
#
# mix phx.gen.cert
#
# Note that this task requires Erlang/OTP 20 or later.
# Run `mix help phx.gen.cert` for more information.
#
# The `http:` config above can be replaced with:
#
# https: [
# port: 4001,
# cipher_suite: :strong,
# keyfile: "priv/cert/selfsigned_key.pem",
# certfile: "priv/cert/selfsigned.pem"
# ],
#
# If desired, both `http:` and `https:` keys can be
# configured to run both http and https servers on
# different ports.
# Watch static and templates for browser reloading.
config :fz_http, FzHttpWeb.Endpoint,
secret_key_base: "5OVYJ83AcoQcPmdKNksuBhJFBhjHD1uUa9mDOHV/6EIdBQ6pXksIhkVeWIzFk5SD",
live_view: [
signing_salt: "t01wa0K4lUd7mKa0HAtZdE+jFOPDDejX"
],
live_reload: [
patterns: [
~r"apps/fz_http/priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$",
~r"apps/fz_http/priv/gettext/.*(po)$",
~r"apps/fz_http/lib/fz_http_web/(live|views)/.*(ex)$",
~r"apps/fz_http/lib/fz_http_web/templates/.*(eex)$"
]
]
# Do not include metadata nor timestamps in development logs
config :logger, :console, format: "[$level] $message\n"
# Set a higher stacktrace during development. Avoid configuring such
# in production as building large stacktraces may be expensive.
config :phoenix, :stacktrace_depth, 20
# Initialize plugs at runtime for faster development compilation
config :phoenix, :plug_init_mode, :runtime