~singpolyma/soapbox-fly

f68de5307afb4bce20aebaeb21be07b9f1979934 — Stephen Paul Weber 21 days ago 716f71c
Enable metrics
2 files changed, 11 insertions(+), 0 deletions(-)

M config.exs
M fly.toml
M config.exs => config.exs +7 -0
@@ 44,6 44,13 @@ config :esshd,
  port: 2222,
  password_authenticator: "Pleroma.BBS.Authenticator"

config :prometheus, Pleroma.Web.Endpoint.MetricsExporter,
  enabled: true,
  auth: false,
  ip_whitelist: ["127.0.0.1", "::1"],
  path: "/api/pleroma/app_metrics",
  format: :text

# We can't store the secrets in this file, since this is baked into the docker image
if not File.exists?("/data/pleroma/secret.exs") do
  secret = :crypto.strong_rand_bytes(64) |> Base.encode64() |> binary_part(0, 64)

M fly.toml => fly.toml +4 -0
@@ 6,6 6,10 @@ processes = []
  destination = "/data"
  source = "soapbox_data"

[metrics]
  port = 80
  path = "/api/pleroma/app_metrics"

[[services]]
  internal_port = 8080
  processes = ["app"]