for +15 days now that I am blocked by this error that prevents my database from starting correctly.
I have exchanged with the support (I’m ashamed now) . but they didn’t find the solution, or they don’t understand each other. here I’m going to expose all the modifications and Access to the repo github so that the good angels help me.
the build log
Redeploying environment master
Preparing deployment
Closing services router and app
Opening application app and its relationships
Executing deploy hook for application app
W: `/app` is not writable.
W: Bundler will use `/tmp/bundler20210222-154-1rolp4k154' 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)
.PLATFORM.APP.YAML
# The name of this app. Must be unique within a project.
name: app
type: 'ruby:2.7'
mounts:
tmp:
source: local
source_path: tmp
log:
source: local
source_path: log
relationships:
postgresdatabase: 'dbpostgres:postgresql'
# The size of the persistent disk of the application (in MB).
disk: 1024
hooks:
build: |
gem install bundler:2.2.8
bundle install --without development test
deploy: |
RACK_ENV=production bundle exec rake db:migrate
web:
upstream:
socket_family: "unix"
commands:
start: "unicorn -l $SOCKET -E production config.ru"
locations:
'/':
root: "public"
passthru: true
expires: 1h
allow: true
.platform/services.yaml
# The name given to the PostgreSQL service (lowercase alphanumeric only).
dbpostgres:
# The type of your service (postgresql), which uses the format
# 'type:version'. Be sure to consult the PostgreSQL documentation
# (https://docs.platform.sh/configuration/services/postgresql.html#supported-versions)
# when choosing a version. If you specify a version number which is not available,
# the CLI will return an error.
type: postgresql:13
# The disk attribute is the size of the persistent disk (in MB) allocated to the service.
disk: 9216
configuration:
extensions:
- plpgsql
- pgcrypto
- uuid-ossp
.platform/routes.yaml
# Each route describes how an incoming URL is going to be processed by Platform.sh.
"https://www.{default}/":
type: upstream
upstream: "app:http"
"https://{default}/":
type: redirect
to: "https://www.{default}/"
I’ve create uniorn.rb on config (config/unicorn.rb) after install unicorn gem
require "rubygems"
require ::File.expand_path('../config/environment', __FILE__)
run Rails.application
my database config
production:
adapter: postgresql
encoding: unicode
host: localhost
port: 5432
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
url: <%= ENV['DATABASE_URL'] %>
database: <%= ENV['DATABASE_NAME'] %>
username: <%= ENV['DATABASE_USERNAME'] %>
password: <%= ENV['DATABASE_PASSWORD'] %>
and credentials.eny.enc
production:
database_url: postgresdatabase.internal
database_name: production
database_username: main
database_password: main
and
uncomment on config/environments/production.rb
config.require_master_key = true
how to solve this problem?