partition by org_id and add auth
All checks were successful
Build and Publish / build-release (push) Successful in 3m7s

This commit is contained in:
2026-05-15 10:08:54 -05:00
parent a0b5e0c0b3
commit 4519f797fd
26 changed files with 687 additions and 112 deletions

View File

@@ -7,6 +7,21 @@ defmodule CustomerService.Application do
@impl true
def start(_type, _args) do
oidcc_child =
case Application.get_env(:customer_service, :zitadel) do
nil ->
[]
cfg ->
[
{Oidcc.ProviderConfiguration.Worker,
%{
issuer: cfg[:issuer],
name: CustomerService.ZitadelProvider
}}
]
end
children = [
CustomerService.CommandedApp,
CustomerService.Repo,
@@ -14,21 +29,14 @@ defmodule CustomerService.Application do
CustomerService.Projectors.QuickLead,
CustomerServiceWeb.Telemetry,
{DNSCluster, query: Application.get_env(:customer_service, :dns_cluster_query) || :ignore},
{Phoenix.PubSub, name: CustomerService.PubSub},
# Start a worker by calling: CustomerService.Worker.start_link(arg)
# {CustomerService.Worker, arg},
# Start to serve requests, typically the last entry
CustomerServiceWeb.Endpoint
{Phoenix.PubSub, name: CustomerService.PubSub}
| oidcc_child ++ [CustomerServiceWeb.Endpoint]
]
# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one, name: CustomerService.Supervisor]
Supervisor.start_link(children, opts)
end
# Tell Phoenix to update the endpoint configuration
# whenever the application is updated.
@impl true
def config_change(changed, _new, removed) do
CustomerServiceWeb.Endpoint.config_change(changed, removed)