# This file is responsible for configuring your application
# and its dependencies with the aid of the Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
# General application configuration
import Config
config :diogramos, :scopes,
user: [
default: true,
module: Diogramos.Accounts.Scope,
assign_key: :current_scope,
access_path: [:user, :id],
schema_key: :user_id,
schema_type: :id,
schema_table: :users,
test_data_fixture: Diogramos.AccountsFixtures,
test_setup_helper: :register_and_log_in_user
]
config :diogramos,
ecto_repos: [Diogramos.Repo],
generators: [timestamp_type: :utc_datetime]
config :diogramos, :features,
anonymous_share_links: true,
embed_cursors: true,
folder_permissions: true
# When false, /users/register only accepts visitors who arrived via a
# valid invite token (`/users/register?invite=...`). Existing users can
# generate invite tokens at /users/invites. Flip to true to let anyone
# self-register.
config :diogramos, :registration_open, false
# Configure the endpoint
config :diogramos, DiogramosWeb.Endpoint,
url: [host: "localhost"],
adapter: Bandit.PhoenixAdapter,
render_errors: [
formats: [html: DiogramosWeb.ErrorHTML, json: DiogramosWeb.ErrorJSON],
layout: false
],
pubsub_server: Diogramos.PubSub,
live_view: [signing_salt: "JDTd8I0Q"]
# Configure the mailer
#
# By default it uses the "Local" adapter which stores the emails
# locally. You can see the emails in your browser, at "/dev/mailbox".
#
# For production it's recommended to configure a different adapter
# at the `config/runtime.exs`.
config :diogramos, Diogramos.Mailer,
adapter: Swoosh.Adapters.Local,
from_name: "Diogramos",
from_address: "noreply@localhost"
# Configure esbuild (the version is required)
config :esbuild,
version: "0.25.4",
diogramos: [
args:
~w(js/app.js --bundle --target=es2022 --outdir=../priv/static/assets/js --external:/fonts/* --external:/images/* --alias:@=.),
cd: Path.expand("../assets", __DIR__),
env: %{"NODE_PATH" => [Path.expand("../deps", __DIR__), Mix.Project.build_path()]}
]
# Configure tailwind (the version is required)
config :tailwind,
version: "4.1.12",
diogramos: [
args: ~w(
--input=assets/css/app.css
--output=priv/static/assets/css/app.css
),
cd: Path.expand("..", __DIR__)
]
# Configure Elixir's Logger
config :logger, :default_formatter,
format: "$time $metadata[$level] $message\n",
metadata: [:request_id]
# Use Jason for JSON parsing in Phoenix
config :phoenix, :json_library, Jason
# Sentry error reporting. The DSN is set in runtime.exs from the
# SENTRY_DSN environment variable (read out of the elixir-args secret in
# app.yml). When the DSN is empty, Sentry quietly no-ops.
config :sentry,
enable_source_code_context: true,
root_source_code_paths: [File.cwd!()],
environment_name: Mix.env()
# libcluster topology is configured in runtime.exs (prod-only) so it
# never tries to talk to the k8s API in dev/test.
# Prometheus metrics, exposed on port 9568 by Diogramos.MetricsPlug and scraped
# from the pod annotations in argo-01-bos/diogramos/app.yml.
#
# `grafana: :disabled` is load-bearing, not boilerplate: PromEx would otherwise
# upload its own dashboards on boot, and the dashboards for this fleet are
# committed in deployment/grafana and pushed from there. `metrics_server:
# :disabled` because that option is Cowboy-based — see Diogramos.MetricsPlug.
config :diogramos, :metrics_port, 9568
config :diogramos, Diogramos.PromEx,
disabled: false,
manual_metrics_start_delay: :no_delay,
drop_metrics_groups: [],
grafana: :disabled,
metrics_server: :disabled
# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
import_config "#{config_env()}.exs"
neiam
/diogramos
diogramos
public · Issues · Pulls · Labels · Forks · Compare · Actions success · Badges · Packages
⭐
Log in to mark this repository.
3.8 KiB · text
History
dc2edab