You specified a process for 'web' but it does not have a command defined. Double check the syntax for the [processes] section of your fly.toml

Our deployments started breaking today. I think you changed something regarding the multi-process deployments today. This fly.toml/Dockerfile worked fine 8 hours ago and it’s now giving the error You specified a process for 'web' but it does not have a command defined. Double check the syntax for the [processes] section of your fly.toml

fly.toml is:

app = 'staxcloud-staging'
kill_signal = 'SIGINT'
kill_timeout = 5

[build]
  dockerfile = 'Dockerfile'

[processes]
  web = ''
  worker = 'php bin/console messenger:consume -vvv'
  scheduler = 'cron -f'

[deploy]
  release_command = "php bin/console app:run-migrations"

[experimental]
  allowed_public_ports = []
  auto_rollback = true

[env]
  PHP_MEMORY_LIMIT = "1024M"

[[services]]
  processes = ['web']
  http_checks = []
  internal_port = 8080
  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'

Do I have to enter something for processes.web now? This used to work and suddenly changed? :frowning:

With this in the entrypoint:

if [ $# -gt 0 ];then
    # If we passed a command, run it as root
    exec "$@"
else
    # Otherwise start the web server

    ## Prepare Laravel caches
    /usr/bin/php /var/www/html/artisan config:cache --no-ansi -q
    /usr/bin/php /var/www/html/artisan route:cache --no-ansi -q
    /usr/bin/php /var/www/html/artisan view:cache --no-ansi -q
    chown -R webuser:webgroup /var/www/html

    exec /init
fi

I am going to try /init for the web instead of ''. That might work.

1 Like

This worked. I seems like you added a rule that verifies that the process can’t be an empty string. That’s confusing though, because even the default Laravel template for example assumes it can be an empty string. Your docs are too: Cron and Queues · Fly Docs.

Or am I misunderstanding something?

1 Like

Hey sorry about this! We’ve had some people specifying processes = ["some","processes"] which doesn’t work at all at the moment. I added some validation that seems to have accidentally encompassed the empty-string case you have here.

There’s a deploy rolling as we speak that should fix your case.

2 Likes

Thanks :heart:

It seems like we’re good again? :slight_smile:

Thank you!

1 Like