thanks in advance for the help
I have an app, it has never been dpeloyed before
fly launch and went through the questions
the toml generated looks like the one below
# fly.toml file generated for arc-platform on 2023-03-24T14:21:44+01:00
app = "arc-platform"
kill_signal = "SIGINT"
kill_timeout = 5
primary_region = "jnb"
processes = 
auto_rollback = true
http_checks = 
internal_port = 3000
processes = ["app"]
protocol = "tcp"
script_checks = 
hard_limit = 25
soft_limit = 20
type = "connections"
force_https = true
handlers = ["http"]
port = 80
handlers = ["tls", "http"]
port = 443
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2s"
guest_path = "/rails/public"
url_prefix = "/"
Please let me know if i’m missing something
March 24, 2023, 2:05pm
What looks wrong or incomplete in that file?
fly deploy work?
fly deploy does not work, it gives me errors
Error failed to fetch an image or build from source: error building: executor failed running [/bin/sh -c SECRET_KEY_BASE=DUMMY ./bin/rails assets:precompile]: exit code: 1
SECRET_KEY_BASE might be the issue here, removing it doesn’t work either
When i see other rails app from tutroails and videos, the generated toml incodes a lot more than the one posted, for example i see we are missing this info
release_command = "bin/rails db:migrate"
PORT = "8080"
RAILS_ENV = "production"
SERVER_COMMAND = "bundle exec puma -C config/puma.rb"
Basically, just want to make sure i’m not missing anything
March 24, 2023, 5:50pm
I’ve spent a lot of time in the past few months simplifying and streamlining things. It amuses me that your first thought was that the configuration was incomplete - trust me that part is correct.
Your problem is with the
assets:precompile step. Typically this is due to not having access to some secret that turns out only to be needed at runtime. The next step is to look at the logs to identify the true error. See:
Existing Rails Apps · Fly Docs; generally accessing the logs from the monitoring tab on the dashboard produces better results.
Also take a look at
ERROR [build 9/9] RUN SECRET_KEY_BASE=DUMMY ./bin/rails assets:precompile when running fly deploy - #3 by munandres for what might be a similar situation. If you have an initializer that accesses a credential that is only needed when you deploy, add an
if statement around that code.
March 31, 2023, 5:50pm
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.