502 Bad Gateway
vakaramoko kamate
During deployment, the hook build is well executed.
but hook deploy has some errors.
Executing deploy hook for application app
W: `/app` is not writable.
W: Bundler will use `/tmp/bundler20210218-152-12m1dwy152' as your home directory temporarily.
W: rake aborted!
W: Errno::EROFS: Read-only file system @ dir_s_mkdir - /app/tmp/cache
W: /app/.global/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:79:in `dump_data'
W: /app/.global/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:59:in `commit_transaction'
W: /app/.global/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:50:in `block in transaction'
W: /app/.global/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:46:in `synchronize'
W: /app/.global/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:46:in `transaction'
W: /app/.global/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/cache.rb:139:in `push_paths_locked'
W: /app/.global/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/cache.rb:122:in `block in reinitialize'
W: /app/.global/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/cache.rb:116:in `synchronize'
W: /app/.global/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/cache.rb:116:in `reinitialize'
W: /app/.global/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/cache.rb:16:in `initialize'
W: /app/.global/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache.rb:45:in `new'
W: /app/.global/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache.rb:45:in `setup'
W: /app/.global/gems/bootsnap-1.5.1/lib/bootsnap.rb:26:in `setup'
W: /app/.global/gems/bootsnap-1.5.1/lib/bootsnap/setup.rb:31:in `<top (required)>'
W: /app/config/boot.rb:4:in `require'
W: /app/config/boot.rb:4:in `<top (required)>'
W: /app/config/application.rb:1:in `require_relative'
W: /app/config/application.rb:1:in `<top (required)>'
W: /app/Rakefile:4:in `require_relative'
W: /app/Rakefile:4:in `<top (required)>'
W: /app/.global/gems/rake-13.0.3/exe/rake:27:in `<top (required)>'
W: /app/.global/gems/bundler-2.2.8/lib/bundler/cli/exec.rb:63:in `load'
W: /app/.global/gems/bundler-2.2.8/lib/bundler/cli/exec.rb:63:in `kernel_load'
W: /app/.global/gems/bundler-2.2.8/lib/bundler/cli/exec.rb:28:in `run'
W: /app/.global/gems/bundler-2.2.8/lib/bundler/cli.rb:494:in `exec'
W: /app/.global/gems/bundler-2.2.8/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
W: /app/.global/gems/bundler-2.2.8/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
W: /app/.global/gems/bundler-2.2.8/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
W: /app/.global/gems/bundler-2.2.8/lib/bundler/cli.rb:30:in `dispatch'
W: /app/.global/gems/bundler-2.2.8/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
W: /app/.global/gems/bundler-2.2.8/lib/bundler/cli.rb:24:in `start'
W: /app/.global/gems/bundler-2.2.8/exe/bundle:49:in `block in <top (required)>'
W: /app/.global/gems/bundler-2.2.8/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
W: /app/.global/gems/bundler-2.2.8/exe/bundle:37:in `<top (required)>'
W: /app/.global/bin/bundle:23:in `load'
W: /app/.global/bin/bundle:23:in `<main>'
W: (See full trace by running task with --trace)
This prevents the database from starting.
how to solve this problem.
0
Comments
Your application is trying to write on a read-only filesystem.
The filesystem is writable only during the
buildhook. Everything happening after that point will be limited to read-only.If you need to be able to perform post build hook write operations, you will have to use mounts.
You can find more information about this in the storage section of our documentation.
To tell the truth, I’m a beginner, so I only have the default configuration proposed.
my .platform.app.yaml
You are missing
/tmpin your mounts:This makes the
/tmpdirectory writable.To get a better understanding of how to configure your application, you can take a look at our ruby documentation page
Especially step 5, where mounts are setup.
thank you for your interest…
but after incorporating your recommendation,
I have always errors with APP, but I see Something interest on the connection to the database.
look at the build log:
my configuration of DATABASE.YML parameters in config:
config/database.yml
the variables defined in credentials.yml.enc
my .platform/services.yaml
if can you help to understand it.
Please sign in to leave a comment.