Ошибка Procfile при развертывании Rails API с помощью Dokku

В настоящее время я пытаюсь развернуть свой API Rails на Dokku, я продолжаю сталкиваться с этой ошибкой, где говорится: «Точка входа Proc [procname] не существует. Пожалуйста, проверьте свой Procfile». Я не уверен, в чем проблема и как настроить точку входа, я пробовал искать повсюду и не смог найти пример реализации этого.

Вот полный журнал, когда я пытаюсь нажать на dokku master:

Counting objects: 232, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (212/212), done.
Writing objects: 100% (232/232), 35.48 KiB | 2.22 MiB/s, done.
Total 232 (delta 83), reused 0 (delta 0)
remote: Resolving deltas: 100% (83/83), done.
-----> Cleaning up...
-----> Building iris-lune-api from herokuish...
-----> Adding BUILD_ENV to build environment...
-----> Fetching custom buildpack
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.6.4
-----> Installing dependencies using bundler 1.15.2
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
       The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
       Using rake 12.3.3
       Using concurrent-ruby 1.1.5
       Using i18n 1.6.0
       Using minitest 5.11.3
       Using thread_safe 0.3.6
       Using tzinfo 1.2.5
       Using activesupport 5.2.3
       Using builder 3.2.3
       Using erubi 1.8.0
       Using mini_portile2 2.4.0
       Using nokogiri 1.10.4
       Using rails-dom-testing 2.0.3
       Using crass 1.0.4
       Using loofah 2.2.3
       Using rails-html-sanitizer 1.2.0
       Using actionview 5.2.3
       Using rack 2.0.7
       Using rack-test 1.1.0
       Using actionpack 5.2.3
       Using nio4r 2.5.1
       Using websocket-extensions 0.1.4
       Using websocket-driver 0.7.1
       Using actioncable 5.2.3
       Using globalid 0.4.2
       Using activejob 5.2.3
       Using mini_mime 1.0.2
       Using mail 2.7.1
       Using actionmailer 5.2.3
       Using activemodel 5.2.3
       Using case_transform 0.2
       Using jsonapi-renderer 0.2.2
       Using active_model_serializers 0.10.10
       Using arel 9.0.0
       Using activerecord 5.2.3
       Using mimemagic 0.3.3
       Using marcel 0.3.3
       Using activestorage 5.2.3
       Using msgpack 1.3.1
       Using bootsnap 1.4.5
       Using bundler 1.17.2
       Using method_source 0.9.2
       Using pg 1.1.4
       Using puma 3.12.1
       Using rack-cors 1.0.3
       Using thor 0.20.3
       Using railties 5.2.3
       Using sprockets 3.7.2
       Using sprockets-rails 3.2.1
       Using rails 5.2.3
       Using stripe 5.1.1 from https://github.com/stripe/stripe-ruby (at master@1f80da4)
       Bundle complete! 12 Gemfile dependencies, 50 gems now installed.
       Gems in the groups development and test were not installed.
       Bundled gems are installed into `./vendor/bundle`
       Removing bundler (1.15.2)
       Bundle completed (0.44s)
       Cleaning up the bundler cache.
       The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
-----> Detecting rake tasks
-----> Detecting rails configuration

       ###### WARNING:

       You set your `config.active_storage.service` to :local in production.
       If you are uploading files to this app, they will not persist after the app
       is restarted, on one-off dynos, or if the app has multiple dynos.
       Heroku applications have an ephemeral file system. To
       persist uploaded files, please use a service such as S3 and update your Rails
       configuration.

       For more information can be found in this article:
       https://devcenter.heroku.com/articles/active-storage-on-heroku


       ###### WARNING:

       We detected that some binary dependencies required to
       use all the preview features of Active Storage are not
       present on this system.

       For more information please see:
       https://devcenter.heroku.com/articles/active-storage-on-heroku


       ###### WARNING:

       No Procfile detected, using the default web server.
       We recommend explicitly declaring how to boot your server process via a Procfile.
       https://devcenter.heroku.com/articles/ruby-default-web-server


-----> Discovering process types
       Default types for  -> rake, console, web
-----> Releasing iris-lune-api (dokku/iris-lune-api:latest)...
-----> Deploying iris-lune-api (dokku/iris-lune-api:latest)...
-----> App Procfile file found (/home/dokku/iris-lune-api/DOKKU_PROCFILE)
       DOKKU_SCALE declares scale -> web=1 [procname]=1
-----> Attempting pre-flight checks
       For more efficient zero downtime deployments, create a file CHECKS.
       See http://dokku.viewdocs.io/dokku/deployment/zero-downtime-deploys/ for examples
       CHECKS file not found in container: Running simple container check...
-----> Waiting for 10 seconds ...
-----> Default container check successful!
-----> Attempting pre-flight checks
       Non web container detected: Running default container check...
-----> Waiting for 10 seconds ...
b442e9261dad2aa7c0590575295cf227c42fee5337729907e9382484effd8ab7
remote: App container failed to start!!
=====> iris-lune-api [procname] container output:
       Proc entrypoint [procname] does not exist. Please check your Procfile
       Proc entrypoint [procname] does not exist. Please check your Procfile
       Proc entrypoint [procname] does not exist. Please check your Procfile
       Proc entrypoint [procname] does not exist. Please check your Procfile
       Proc entrypoint [procname] does not exist. Please check your Procfile
       Proc entrypoint [procname] does not exist. Please check your Procfile
       Proc entrypoint [procname] does not exist. Please check your Procfile
=====> end iris-lune-api [procname] container output
To 67.205.164.245:iris-lune-api
 ! [remote rejected] master -> master (pre-receive hook declined)

person AngeloS    schedule 15.09.2019    source источник


Ответы (1)


В конце концов я понял это, мне пришлось создать файл в корневом каталоге с именем «DOKKU_SCALE» и добавить в файл этот текст:

web=1
worker=1
person AngeloS    schedule 15.09.2019