Phase 0 scaffold: arcadia-cloud Phoenix service
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>
This commit is contained in:
31
config/test.exs
Normal file
31
config/test.exs
Normal file
@@ -0,0 +1,31 @@
|
||||
import Config
|
||||
|
||||
# Configure your database
|
||||
#
|
||||
# The MIX_TEST_PARTITION environment variable can be used
|
||||
# to provide built-in test partitioning in CI environment.
|
||||
# Run `mix help test` for more information.
|
||||
config :arcadia_cloud, ArcadiaCloud.Repo,
|
||||
username: "postgres",
|
||||
password: "postgres",
|
||||
hostname: "localhost",
|
||||
database: "arcadia_cloud_test#{System.get_env("MIX_TEST_PARTITION")}",
|
||||
pool: Ecto.Adapters.SQL.Sandbox,
|
||||
pool_size: System.schedulers_online() * 2
|
||||
|
||||
# We don't run a server during test. If one is required,
|
||||
# you can enable the server option below.
|
||||
config :arcadia_cloud, ArcadiaCloudWeb.Endpoint,
|
||||
http: [ip: {127, 0, 0, 1}, port: 4002],
|
||||
secret_key_base: "ZzGlsnmuVC9wkMb6PaYLDsuiL71jzgbDOvIFe3TyxGah3lDHO+dxmrEDJyz6mFe6",
|
||||
server: false
|
||||
|
||||
# Print only warnings and errors during test
|
||||
config :logger, level: :warning
|
||||
|
||||
# Initialize plugs at runtime for faster test compilation
|
||||
config :phoenix, :plug_init_mode, :runtime
|
||||
|
||||
# Sort query params output of verified routes for robust url comparisons
|
||||
config :phoenix,
|
||||
sort_verified_routes_query_params: true
|
||||
Reference in New Issue
Block a user