Loading...
Loading...
Phoenix operations and deployment: releases, runtime configuration, clustering, libcluster, telemetry/logging, secrets, assets, background jobs, and production hardening on the BEAM.
npx skill4agent add bobmatnyc/claude-mpm-skills phoenix-opsMIX_ENV=prod PHX_SERVER=true mix assets.deploy
MIX_ENV=prod mix release
_build/prod/rel/my_app/bin/my_app eval "IO.puts(:os.type())"
_build/prod/rel/my_app/bin/my_app startconfig/runtime.exsconfig :my_app, MyApp.Repo,
url: System.fetch_env!("DATABASE_URL"),
pool_size: String.to_integer(System.get_env("POOL_SIZE", "10")),
ssl: true
config :my_app, MyAppWeb.Endpoint,
url: [host: System.fetch_env!("PHX_HOST"), port: 443, scheme: "https"],
http: [ip: {0,0,0,0}, port: String.to_integer(System.get_env("PORT", "4000"))],
secret_key_base: System.fetch_env!("SECRET_KEY_BASE"),
server: trueSECRET_KEY_BASEmix phx.gen.secretlibcluster# mix.exs deps
{:libcluster, "~> 3.3"},
{:phoenix_pubsub, "~> 2.1"},
# application.ex
topologies = [
dns_poll: [
strategy: Cluster.Strategy.DNSPoll,
config: [poll_interval: 5_000, query: "my-app.internal"],
connect: {:net_adm, :ping}
]
]
children = [
{Cluster.Supervisor, [topologies, [name: MyApp.ClusterSupervisor]]},
{Phoenix.PubSub, name: MyApp.PubSub},
MyAppWeb.Endpoint
]secret_key_baseopentelemetry_phoenixopentelemetry_ectoPlug.TelemetryLoggerJSON:telemetry_pollerLOGGER_LEVEL=info:debugforce_sslsame_sitesecurecontent_security_policycors_plug:max_request_line_length:max_header_value_lengthmix assets.deploycache-controlapplication.exmix deps.get --only prodmix compilemix assets.deploymix releaseEnvironment=Restart=on-failure/health/ready:telemetry_pollerPHX_SERVER=trueconfig/runtime.exssecret_key_base