我是一个初学者,使用python(3.8.5)创建了一个discord bot,我想添加listen music cog(使用lavalink),但是如何在heroku上同时运行lavalink.jar和main python bot main.py文件(我两个都运行得有点成功,但是bot没有运行)。我知道一些基本的java,但是如何创建pom.xml文件,以及如何配置system.properties文件(我从某处复制了pom.xml和system.properties文件)。
生成日志:-
-----> Java app detected
-----> Installing JDK 1.8... done
-----> Installing Maven 3.3.9... done
-----> Executing Maven
$ mvn -DskipTests clean dependency:list install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building my-app 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ my-app ---
[INFO]
[INFO] --- maven-dependency-plugin:2.8:list (default-cli) @ my-app ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ my-app ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /tmp/build_59dba250_/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ my-app ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ my-app ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /tmp/build_59dba250_/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ my-app ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ my-app ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ my-app ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: /tmp/build_59dba250_/target/my-app-1.jar
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ my-app ---
[INFO] Installing /tmp/build_59dba250_/target/my-app-1.jar to /tmp/codon/tmp/cache/.m2/repository/com/javatpoint/application1/my-app/1/my-app-1.jar
[INFO] Installing /tmp/build_59dba250_/pom.xml to /tmp/codon/tmp/cache/.m2/repository/com/javatpoint/application1/my-app/1/my-app-1.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.625 s
[INFO] Finished at: 2020-11-15T15:31:10+00:00
[INFO] Final Memory: 16M/169M
[INFO] ------------------------------------------------------------------------
-----> Python app detected
! Python has released a security update! Please consider upgrading to python-3.8.6
Learn More: https://devcenter.heroku.com/articles/python-runtimes
-----> No change in requirements detected, installing from cache
-----> Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2
-----> Installing SQLite3
-----> Installing requirements with pip
-----> Discovering process types
Procfile declares types -> web, worker
-----> Compressing...
Done: 104M
-----> Launching...
Released v4
https://myapp.herokuapp.com/ deployed to Heroku
(web:java-jar-lavalink.jar)[日志]
2020-11-15T15:59:25.503902+00:00 heroku[web.1]: Starting process with command `: java -jar Lavalink.jar`
2020-11-15T15:59:28.149682+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
2020-11-15T15:59:28.211497+00:00 heroku[web.1]: Process exited with status 0
2020-11-15T15:59:28.262886+00:00 heroku[web.1]: State changed from starting to crashed
2020-11-15T15:59:28.270394+00:00 heroku[web.1]: State changed from crashed to starting
2020-11-15T15:59:34.193074+00:00 heroku[web.1]: Starting process with command `: java -jar Lavalink.jar`
2020-11-15T15:59:36.578486+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
2020-11-15T15:59:36.635011+00:00 heroku[web.1]: Process exited with status 0
2020-11-15T15:59:36.736294+00:00 heroku[web.1]: State changed from starting to crashed
(worker:python3 main.py)[日志]
2020-11-15T16:01:23.506594+00:00 heroku[worker.1]: Starting process with command `: python3 main.py`
2020-11-15T16:01:24.258915+00:00 heroku[worker.1]: State changed from starting to up
2020-11-15T16:01:26.704921+00:00 heroku[worker.1]: Process exited with status 0
2020-11-15T16:01:26.764810+00:00 heroku[worker.1]: State changed from up to crashed
2020-11-15T16:01:26.768535+00:00 heroku[worker.1]: State changed from crashed to starting
2020-11-15T16:01:32.979882+00:00 heroku[worker.1]: Starting process with command `: python3 main.py`
2020-11-15T16:01:33.662026+00:00 heroku[worker.1]: State changed from starting to up
2020-11-15T16:01:35.910408+00:00 heroku[worker.1]: Process exited with status 0
2020-11-15T16:01:36.011579+00:00 heroku[worker.1]: State changed from up to crashed
暂无答案!
目前还没有任何答案,快来回答吧!