I want to create multiple processes with specific environment variables per process. I could not find anything in the documentation, but looking at this topic, I thought the following would work:
...
[[processes]]
name = 'web'
entrypoint = ["/entrypoint"]
cmd = ['']
[[processes.env]]
DD_SERVICE='web'
[[processes]]
name = 'worker'
entrypoint = ["/entrypoint"]
cmd = ['supervisord -c /etc/supervisord.conf']
[[processes.env]]
DD_SERVICE='worker'
[[processes]]
name = 'scheduler'
entrypoint = ["/entrypoint"]
cmd = ['cron -f']
[[processes.env]]
DD_SERVICE='scheduler'
...
When I deploy this, I get the following message:
==> Creating release
Error You specified a process for '{"cmd"=>[""], "entrypoint"=>["/entrypoint"], "env"=>[{"DD_SERVICE"=>"web"}], "name"=>"web"}' but it does not have a command defined. Double check the syntax for the [processes] section of your fly.toml https://fly.io/docs/reference/configuration/#the-processes-section
I saw on this topic that there were previously issues with cmd
being defined as an empty string, could that be the case here as well? Or am I understanding the usage of this part of fly.toml
completely wrong?
For reference, the current working config is as follows:
[processes]
web = ''
worker = 'supervisord -c /etc/supervisord.conf'
scheduler = 'cron -f'