5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/docktor_rails/guidance.rb', line 5
def self.hint_for(result, platform)
return result.hint if result.hint
id = result.id
status = result.status
return nil if status == :pass
case id
when "fs.shell_crlf", "compose.entrypoint_sanity"
crlf_hint(platform)
when "compose.healthchecks"
"Add compose healthchecks so readiness is deterministic across machines (then you can wait on health status instead of sleeps)."
when "env.rails_master_key"
"Provide config/master.key (local dev), or set RAILS_MASTER_KEY (CI/prod), or add it to .env.docker."
when "compose.env_file_present"
"Ensure each env_file referenced in compose exists (or remove the reference)."
when "compose.build_paths"
"Fix compose build paths: ensure build.context directories exist and build.dockerfile paths resolve correctly."
when "compose.entrypoint_exec"
entrypoint_exec_hint(platform)
when "compose.platform_risk"
"If teammates use different CPU architectures (arm64 vs amd64), consider multi-arch images or removing hard platform pins unless necessary."
else
nil
end
end
|