Fly fails to include the appropriate release config for my Phoenix app because it detects it as being < 1.7.9 when it's actually 1.7.10
Please only report specific issues with flyctl behavior. Anything like a support request for your application should go to https://community.fly.io. More people watch that space and can help you faster!
Describe the bug Upon launching a Fly app based on an existing Elixir/Phoenix configuration, Fly states "We recommend upgrading to Phoenix 1.7.9 which includes a release configuration for Docker-based deployment." Unfortunately, I double-checked and my Phoenix version was 1.7.10, which in semver is actually greater than 1.7.9, but which a naïve comparison might detect as less than.
- Operating system
bash> uname -a
Darwin PeterMacbookProM1Max.local 23.5.0 Darwin Kernel Version 23.5.0: Sun Apr 7 17:43:51 PDT 2024; root:xnu-10063.120.101.0.1~10/RELEASE_ARM64_T6000 arm64 arm Darwin
fly version
bash> fly version
fly v0.2.42 darwin/arm64 Commit: 44aedf5b21a71b0c086d4603d2522f71e2908c61 BuildDate: 2024-04-24T22:03:44Z
** Paste your fly.toml
# fly.toml app configuration file generated for addigence-demo on 2024-04-24T21:14:55-04:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#
app = 'addigence-demo'
primary_region = 'ewr'
kill_signal = 'SIGTERM'
[build]
[deploy]
release_command = '/app/bin/migrate'
[env]
PHX_HOST = 'addigence-demo.fly.dev'
PORT = '8080'
REGION = 'ewr'
[http_service]
internal_port = 8080
force_https = true
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 0
processes = ['app']
[http_service.concurrency]
type = 'connections'
hard_limit = 1000
soft_limit = 1000
[[services]]
protocol = 'tcp'
internal_port = 4000
[[services.ports]]
port = 80
handlers = ['http']
force_https = true
[[services.ports]]
port = 443
handlers = ['tls', 'https']
[services.concurrency]
type = 'connections'
hard_limit = 1000000
soft_limit = 5400
[[services.tcp_checks]]
interval = '15s'
timeout = '2s'
grace_period = '30s'
[[vm]]
memory = '2gb'
cpu_kind = 'shared'
cpus = 2
** Command output: **
bash> fly launch
An existing fly.toml file was found for app addigence-demo
? Would you like to copy its configuration to the new app? Yes
Scanning source code
Resolving Hex dependencies...
Resolution completed in 0.24s
# ...
We recommend upgrading to Phoenix 1.7.9 which includes a release configuration for Docker-based deployment.
If you do upgrade, you can run 'fly launch' again to get the required deployment setup.
If you don't want to upgrade, you'll need to add a few files and configuration options manually.
We've placed a Dockerfile compatible with other Phoenix 1.6 apps in this directory. See
https://hexdocs.pm/phoenix/fly.html for details, including instructions for setting up
a Postgres database.
bash> cat mix.exs | grep phoenix
{:phoenix, "~> 1.7.10"},
{:phoenix_ecto, "~> 4.4"},
{:phoenix_html, "~> 3.3"},
{:phoenix_live_reload, "~> 1.2", only: :dev},
{:phoenix_live_view, "~> 0.20.1"},
{:phoenix_live_dashboard, "~> 0.8.3"},
Note: In addition, I noticed while troubleshooting this that Fly's operations do not respond to control-C/SIGINT (such as after accidental command activation).