Multitenancy.SiteResolver.YAML (multitenancy_phoenix v0.1.0)

Copy Markdown View Source

Resolves sites from a YAML file loaded once into :persistent_term.

alpha:
  theme: alpha
  hosts: [alpha.example.com]
  locale: en
  settings:
    title: Alpha

Add it to your supervision tree so the file is loaded at boot:

{Multitenancy.SiteResolver.YAML, path: Application.app_dir(:my_app, "priv/sites.yml")}

Summary

Functions

Parses path and replaces the loaded sites.

All loaded sites.

Functions

child_spec(opts)

load!(path)

Parses path and replaces the loaded sites.

sites()

All loaded sites.

start_link(opts)