asksharmadeepak
asksharmadeepak

Reputation: 49

Compatible buildpacks for Scala Playframework application

I am trying to deploying an sample scala playframework application to cloud foundry (https://api.run.pivotal.io)

$ cf push play-cf-demo-1.0-SNAPSHOT.zip

But its failing with the reason

None of the buildpacks detected a compatible application

I have tried running below command which is giving me the list if buildpack

cf buildpacks

java_buildpack                   2          true      false    java-buildpack-offline-cflinuxfs3-v4.31.1.zip              cflinuxfs3
go_buildpack                     6          true      false    go_buildpack-cached-cflinuxfs3-v1.9.14.zip                 cflinuxfs3
python_buildpack                 7          true      false    python_buildpack-cached-cflinuxfs3-v1.7.15.zip             cflinuxfs3

I assume java buildpack works for play scala app as well.

Any particular command which help me to deploy with correct buildpack or create my own buildpack.

Upvotes: 0

Views: 126

Answers (1)

Daniel Mikusa
Daniel Mikusa

Reputation: 15051

The Java buildpack has support for Play applications.

https://github.com/cloudfoundry/java-buildpack/blob/main/docs/example-play_framework.md

As stated in the docs, the Java buildpack can run a Play apps when packaged with play dist or play stage.

In addition, it looks like the command you're using is slightly off. You need to run cf push play-application -p path/to/play-f-demo-1.0-SNAPSHOT.zip.

The first argument is the application name and the -p argument tells cf where to find your packaged Play app.

In this case of this question, the command being run set the application name to the name of the file but set no path, which means cf push will upload everything from the current directory, which is almost certainly something the Java buildpack won't know how to run.

Upvotes: 1

Related Questions