2

我目前正在尝试在 Dokku 上部署我的 Rails API,我一直遇到这个错误,上面写着“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)
4

1 回答 1

2

我最终弄清楚了,我必须在根目录中创建一个名为“DOKKU_SCALE”的文件,并将此文本添加到文件中:

web=1
worker=1
于 2019-09-15T19:25:17.917 回答