API-only Phoenix 1.8 project for cloud-ops, inventory, billing, and provisioning sagas. Validates arcadia JWTs via shared Guardian secret (verify-only; arcadia-app remains the issuer). Deps beyond default Phoenix: guardian, cors_plug, oban, req. Postgres on local port 5433 per arcadia stack convention. Endpoint runs on :4005. Endpoints: - GET /api/health — public, returns service identifier - GET /api/v1/inventory — auth-gated, returns empty list (phase 0 stub) Oban configured with the queues phase 1+ will need: provisioning / cloud_sync_fast|full|slow / cloud_billing / metering. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
56 lines
1.6 KiB
Elixir
56 lines
1.6 KiB
Elixir
# 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 :arcadia_cloud,
|
|
ecto_repos: [ArcadiaCloud.Repo],
|
|
generators: [timestamp_type: :utc_datetime, binary_id: true]
|
|
|
|
# Configure the endpoint
|
|
config :arcadia_cloud, ArcadiaCloudWeb.Endpoint,
|
|
url: [host: "localhost"],
|
|
adapter: Bandit.PhoenixAdapter,
|
|
render_errors: [
|
|
formats: [json: ArcadiaCloudWeb.ErrorJSON],
|
|
layout: false
|
|
],
|
|
pubsub_server: ArcadiaCloud.PubSub,
|
|
live_view: [signing_salt: "4W6q5pDB"]
|
|
|
|
# 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
|
|
|
|
# Guardian — JWTs are issued by arcadia-app. arcadia-cloud only verifies them.
|
|
# Issuer and secret_key MUST match arcadia-app's Arcadia.Guardian config.
|
|
config :arcadia_cloud, ArcadiaCloud.Guardian,
|
|
issuer: "arcadia",
|
|
verify_issuer: true
|
|
|
|
# Oban — provisioning, sync, billing, gateway-event consumption queues
|
|
config :arcadia_cloud, Oban,
|
|
engine: Oban.Engines.Basic,
|
|
queues: [
|
|
provisioning: 5,
|
|
cloud_sync_fast: 5,
|
|
cloud_sync_full: 3,
|
|
cloud_sync_slow: 1,
|
|
cloud_billing: 1,
|
|
metering: 2,
|
|
default: 5
|
|
],
|
|
repo: ArcadiaCloud.Repo
|
|
|
|
# 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"
|