I’ve got a weird issue setting up a new app with two environments, each has its own toml file. I would appreciate some help
Command
flyctl deploy --remote-only --config fly.staging.toml
runs from console without any issues but fails from github workflow with
Github Action output
Run flyctl deploy --remote-only --config fly.staging.toml
==> Verifying app config
Validating fly.staging.toml
Error: Your fly.toml referenced an attribute 'swap_size_mb' but it is unknown. Double check the accepted attributes in fly.toml https://fly.io/docs/reference/configuration
WARNING: Failed to fetch platform version: Could not find App "appname-staging"
Error: Process completed with exit code 1.
Github Action file
name: Deploy to Staging
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only --config fly.staging.toml
fly.staging.toml
app = "appname-staging"
primary_region = "fra"
kill_signal = "SIGTERM"
swap_size_mb = 512
[deploy]
release_command = "/app/bin/migrate"
[env]
PHX_HOST = "staging.appname.com"
PORT = "8080"
[http_service]
internal_port = 8080
force_https = true
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 1
processes = ["app"]
[http_service.concurrency]
type = "connections"
hard_limit = 1000
soft_limit = 1000