mirror of
https://github.com/plausible/analytics.git
synced 2024-11-23 11:12:15 +03:00
commit
41e114ecbb
@ -49,9 +49,8 @@ geolite2_country_db = System.get_env("GEOLITE2_COUNTRY_DB")
|
||||
disable_auth = String.to_existing_atom(System.get_env("DISABLE_AUTH", "false"))
|
||||
hcaptcha_sitekey = System.get_env("HCAPTCHA_SITEKEY")
|
||||
hcaptcha_secret = System.get_env("HCAPTCHA_SECRET")
|
||||
logflare_api_key = System.get_env("LOGFLARE_API_KEY")
|
||||
logflare_source_id = System.get_env("LOGFLARE_SOURCE_ID")
|
||||
log_level = String.to_existing_atom(System.get_env("LOG_LEVEL", "warn"))
|
||||
appsignal_api_key = System.get_env("APPSIGNAL_API_KEY")
|
||||
|
||||
config :plausible,
|
||||
admin_user: admin_user,
|
||||
@ -199,18 +198,13 @@ if geolite2_country_db do
|
||||
]
|
||||
end
|
||||
|
||||
logger_backends =
|
||||
case logflare_api_key do
|
||||
api_key when is_binary(api_key) -> [LogflareLogger.HttpBackend]
|
||||
_ -> [:console]
|
||||
end
|
||||
config :logger, level: log_level
|
||||
|
||||
config :logger,
|
||||
level: log_level,
|
||||
backends: logger_backends
|
||||
|
||||
if logflare_api_key do
|
||||
config :logflare_logger_backend,
|
||||
api_key: logflare_api_key,
|
||||
source_id: logflare_source_id
|
||||
if appsignal_api_key do
|
||||
config :appsignal, :config,
|
||||
otp_app: :plausible,
|
||||
name: "Plausible Analytics",
|
||||
push_api_key: appsignal_api_key,
|
||||
env: env,
|
||||
active: true
|
||||
end
|
||||
|
@ -38,6 +38,7 @@ defmodule PlausibleWeb do
|
||||
|
||||
# Use all HTML functionality (forms, tags, etc)
|
||||
use Phoenix.HTML
|
||||
use Appsignal.Phoenix.View
|
||||
|
||||
import PlausibleWeb.ErrorHelpers
|
||||
alias PlausibleWeb.Router.Helpers, as: Routes
|
||||
|
@ -1,5 +1,6 @@
|
||||
defmodule PlausibleWeb.Endpoint do
|
||||
use Phoenix.Endpoint, otp_app: :plausible
|
||||
use Appsignal.Phoenix
|
||||
use Sentry.Phoenix.Endpoint
|
||||
|
||||
# Serve at "/" the static files from "priv/static" directory.
|
||||
|
7
mix.exs
7
mix.exs
@ -52,8 +52,8 @@ defmodule Plausible.MixProject do
|
||||
# Type `mix help deps` for examples and options.
|
||||
defp deps do
|
||||
[
|
||||
# remove
|
||||
{:browser, "~> 0.4.3"},
|
||||
{:appsignal, "~> 2.0"},
|
||||
{:appsignal_phoenix, "~> 2.0.0"},
|
||||
{:bcrypt_elixir, "~> 2.0"},
|
||||
{:cors_plug, "~> 1.5"},
|
||||
{:ecto_sql, "~> 3.0"},
|
||||
@ -90,8 +90,7 @@ defmodule Plausible.MixProject do
|
||||
{:sshex, "2.2.1"},
|
||||
{:geolix, "~> 1.0"},
|
||||
{:clickhouse_ecto, git: "https://github.com/plausible/clickhouse_ecto.git"},
|
||||
{:geolix_adapter_mmdb2, "~> 0.5.0"},
|
||||
{:logflare_logger_backend, "~> 0.7.6"}
|
||||
{:geolix_adapter_mmdb2, "~> 0.5.0"}
|
||||
]
|
||||
end
|
||||
|
||||
|
4
mix.lock
4
mix.lock
@ -1,4 +1,7 @@
|
||||
%{
|
||||
"appsignal": {:hex, :appsignal, "2.0.1", "1e68f35fb1771684f0033205c912d70bcd16b1c474c32bfd7439b14a43ff1424", [:make, :mix], [{:decorator, "~> 1.2.3 or ~> 1.3", [hex: :decorator, repo: "hexpm", optional: false]}, {:hackney, "~> 1.6", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:poison, ">= 1.3.0", [hex: :poison, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "930c3373b77d4cd94a6a6ea912f7b7c0c4a46ea5302001b9a86ebbb484dd88e5"},
|
||||
"appsignal_phoenix": {:hex, :appsignal_phoenix, "2.0.2", "17d58f3ddfbc7dd78177f83cf6c5e7531c78742d9d46ff6db33a712ccd2ec098", [:mix], [{:appsignal_plug, "~> 2.0.0", [hex: :appsignal_plug, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.11", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_live_view, "~> 0.9", [hex: :phoenix_live_view, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "d41e3892f1cbbdc1762722ea36ff224b087a5fc564fa312ef4c8327391326b96"},
|
||||
"appsignal_plug": {:hex, :appsignal_plug, "2.0.2", "18363dfa34c5e6aef7c0c71ea38a6e0dcf2d16e06c47bb53a125fc8d9de09a32", [:mix], [{:appsignal, "~> 2.0.0", [hex: :appsignal, repo: "hexpm", optional: false]}, {:plug, ">= 1.1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "bd36e4232973de1e3b537cd8c96e1514ee43a5f58a02702b6d03f7d70d0ce17d"},
|
||||
"bamboo": {:hex, :bamboo, "1.5.0", "1926107d58adba6620450f254dfe8a3686637a291851fba125686fa8574842af", [:mix], [{:hackney, ">= 1.13.0", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "d5f3d04d154e80176fd685e2531e73870d8700679f14d25a567e448abce6298d"},
|
||||
"bamboo_postmark": {:hex, :bamboo_postmark, "0.6.0", "429ee3153497e2f1081f8741242450be13cdca52e2c56166e8eda5ebfcb23c0a", [:mix], [{:bamboo, ">= 1.2.0", [hex: :bamboo, repo: "hexpm", optional: false]}, {:hackney, ">= 1.6.5", [hex: :hackney, repo: "hexpm", optional: false]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "badb3c7677440f641d920e0900ff0cd13c01d517e76562aa5c00e560f46f36ba"},
|
||||
"bamboo_smtp": {:hex, :bamboo_smtp, "2.1.0", "4be58f3c51d9f7875dc169ae58a1d2f08e5b718bf3895f70d130548c0598f422", [:mix], [{:bamboo, "~> 1.2", [hex: :bamboo, repo: "hexpm", optional: false]}, {:gen_smtp, "~> 0.15.0", [hex: :gen_smtp, repo: "hexpm", optional: false]}], "hexpm", "0aad00ef93d0e0c83a0e1ca6998fea070c8a720a990fbda13ce834136215ee49"},
|
||||
@ -17,6 +20,7 @@
|
||||
"csv": {:hex, :csv, "2.3.1", "9ce11eff5a74a07baf3787b2b19dd798724d29a9c3a492a41df39f6af686da0e", [:mix], [{:parallel_stream, "~> 1.0.4", [hex: :parallel_stream, repo: "hexpm", optional: false]}], "hexpm", "86626e1c89a4ad9a96d0d9c638f9e88c2346b89b4ba1611988594ebe72b5d5ee"},
|
||||
"db_connection": {:hex, :db_connection, "2.2.2", "3bbca41b199e1598245b716248964926303b5d4609ff065125ce98bcd368939e", [:mix], [{:connection, "~> 1.0.2", [hex: :connection, repo: "hexpm", optional: false]}], "hexpm", "642af240d8a8affb93b4ba5a6fcd2bbcbdc327e1a524b825d383711536f8070c"},
|
||||
"decimal": {:hex, :decimal, "1.9.0", "83e8daf59631d632b171faabafb4a9f4242c514b0a06ba3df493951c08f64d07", [:mix], [], "hexpm", "b1f2343568eed6928f3e751cf2dffde95bfaa19dd95d09e8a9ea92ccfd6f7d85"},
|
||||
"decorator": {:hex, :decorator, "1.3.2", "63b8ac9e23b28053390abdda33bb9e1f3dd9e8f9a981f47a06fc2f2fe2e2f772", [:mix], [], "hexpm", "b80bd089e3c8579e6d9ea84eed307b1597a0d94af25331e424a209477ad1a7fc"},
|
||||
"double": {:hex, :double, "0.7.0", "a7ee4c3488a0acc6d2ad9b69b6c7d3ddf3da2b54488d0f7c2d6ceb3a995887ca", [:mix], [], "hexpm", "f0c387a2266b4452da7bab03598feec11aef8b2acab061ea947dae81bb257329"},
|
||||
"ecto": {:hex, :ecto, "3.4.6", "08f7afad3257d6eb8613309af31037e16c36808dfda5a3cd0cb4e9738db030e4", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "6f13a9e2a62e75c2dcfc7207bfc65645ab387af8360db4c89fee8b5a4bf3f70b"},
|
||||
"ecto_sql": {:hex, :ecto_sql, "3.4.4", "d28bac2d420f708993baed522054870086fd45016a9d09bb2cd521b9c48d32ea", [:mix], [{:db_connection, "~> 2.2", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.4.3", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.3.0 or ~> 0.4.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.15.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.0", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "edb49af715dd72f213b66adfd0f668a43c17ed510b5d9ac7528569b23af57fe8"},
|
||||
|
Loading…
Reference in New Issue
Block a user