# App doesn't respect the fly.toml?

**URL:** <https://community.fly.io/t/app-doesnt-respect-the-fly-toml/8591>\
**Category:** Questions / Help\
**Created:** [November 10, 2022, 12:36pm UTC](https://community.fly.io/t/app-doesnt-respect-the-fly-toml/8591 "2022-11-10T12:36:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![huytrinh](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/huytrinh/32/12285_2.png) [@huytrinh](https://community.fly.io/u/huytrinh)\
**Post date:** [November 10, 2022, 12:36pm UTC](https://community.fly.io/t/app-doesnt-respect-the-fly-toml/8591/1 "2022-11-10T12:36:16Z")

</div>

Hi,

I deployed my Remix app to Fly via Github actions and it works fine. However, I deployed the same app to the staging, it doesn’t work, the Github action was just hanging there.

I check the staging app logs and see the app runs with port 3000. However, I think it should run on port 8080. It doesn’t follow things that I set in fly.toml. Do I need a separate fly.toml file for the staging app?

```auto
app ready: http://localhost:3000

```

My CI/CD

- The deploy production works perfect
- The deploy staging doesn’t work

```auto
      - name: 🚀 Deploy Staging
        if: ${{ github.ref == 'refs/heads/staging' }}
        uses: superfly/flyctl-actions@1.3
        with:
          args: "deploy --app app-fly-staging --image registry.fly.io/${{ steps.app_name.outputs.value }}:${{ github.ref_name }}-${{ github.sha }}"
        env:
          FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

      - name: 🚀 Deploy Production
        if: ${{ github.ref == 'refs/heads/aiven-fly' }}
        uses: superfly/flyctl-actions@1.3
        with:
          args: "deploy --app app-fly --image registry.fly.io/${{ steps.app_name.outputs.value }}:${{ github.ref_name }}-${{ github.sha }}"
        env:
          FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

```

My fly.toml

```auto
app = "app-fly"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []

[env]
  PORT = "8080"
  FLY = "true"

[experimental]
  allowed_public_ports = []
  auto_rollback = true

[[services]]
  http_checks = []
  internal_port = 8080
  processes = ["app"]
  protocol = "tcp"
  script_checks = []
  [services.concurrency]
    hard_limit = 25
    soft_limit = 20
    type = "connections"

  [[services.ports]]
    force_https = true
    handlers = ["http"]
    port = 80

  [[services.ports]]
    handlers = ["tls", "http"]
    port = 443

  [[services.tcp_checks]]
    grace_period = "1s"
    interval = "15s"
    restart_limit = 0
    timeout = "2s"

```

I am on the Launch plan and wondering how many app I could run?

---

<div class="post-metadata">

**Author:** ![rugwiro](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/rugwiro/32/49239_2.png) [@rugwiro](https://community.fly.io/u/rugwiro)\
**Post date:** [November 10, 2022, 1:40pm UTC](https://community.fly.io/t/app-doesnt-respect-the-fly-toml/8591/2 "2022-11-10T13:40:43Z")

</div>

Hey,

Yes need a different `fly.toml` config for each app/environment. You can name it anything you want and pass `--config <file-name>` to the deploy command to indicate which configuration file you want to use. Let’s say `fly.prod.toml` for production and `fly.stage.toml` for staging.

---

<div class="post-metadata">

**Author:** ![huytrinh](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/huytrinh/32/12285_2.png) [@huytrinh](https://community.fly.io/u/huytrinh)\
**Post date:** [November 11, 2022, 8:59am UTC](https://community.fly.io/t/app-doesnt-respect-the-fly-toml/8591/3 "2022-11-11T08:59:20Z")

</div>

Hi,

I follow this template and it doesn’t seem we need to create a new fly.toml for each app/environment

> **[GitHub - remix-run/blues-stack: The Remix Stack for deploying to Fly with...](https://github.com/remix-run/blues-stack)**
>
> The Remix Stack for deploying to Fly with PostgreSQL, authentication, testing, linting, formatting, etc. - remix-run/blues-stack

Could we override the fly.toml config with `deploy --app app-name`

---

<div class="post-metadata">

**Author:** ![ignoramous](https://avatars.discourse-cdn.com/v4/letter/i/a9adbd/32.png) [@ignoramous](https://community.fly.io/u/ignoramous)\
**Post date:** [November 11, 2022, 11:25am UTC](https://community.fly.io/t/app-doesnt-respect-the-fly-toml/8591/4 "2022-11-11T11:25:01Z")

</div>

> [@huytrinh](#):
>
> Could we override the fly.toml config with `deploy --app app-name`

That overrides the app name for v1 Apps, yes. And it should work.

Better to rely on multiple configs (like suggested above), as it’s more cleaner and less error prone, imo.
