Sitesx v0.11.0 Sitesx.App View Source
Configuration from mix config and environment variable.
Options
:ensure_domain_interval
- default:600_000 millisecond (if want disable, set 0 number)
:request_options
- default:[ssl: [{:versions, [:"tlsv1.2"]}]]
Mix: Cloudflare
config :sitesx,
otp_app: MyApp,
domain: "example.com",
ensure_domain_interval: 300_000,
dns: [
provider: :cloudflare,
auth_email: "mail@example.com",
auth_key: "1234567893feefc5f0q5000bfo0c38d90bbeb",
zone_identifier: "3d9313b646b8cc1ieb5b4c73a9aae20c",
]
Mix: Digitalocean
config :sitesx,
otp_app: MyApp,
domain: "example.com",
request_options: [hackney: [pool: :cloudflare]],
dns: [
provider: :digitalocean,
auth_key: "b7d03a6947b217efb6f3ec3bd3504582",
]
Environment Variable: Cloudflare
config :sitesx,
otp_app: MyApp,
domain: "example.com",
ensure_domain_interval: 300_000,
dns: [
provider: :cloudflare,
auth_email: {:system, "MYAPP_AUTH_EMAIL"},
auth_key: {:system, "MYAPP_AUTH_KEY"},
zone_identifier: {:system, "MYAPP_ZONE_IDENTIFIER"},
]
Environment Variable: Digitalocean
config :sitesx,
otp_app: MyApp,
domain: "example.com",
ensure_domain_interval: 300_000,
dns: [
provider: :cloudflare,
auth_key: {:system, "MYAPP_AUTH_KEY"},
]
Link to this section Summary
Link to this section Functions
domain function returns domain name
helper function returns view heloper like Phoenix and Plug
Ecto
repo function returns Sitesx model from your phoenix application.