How to deploy play app

1,700 views
Skip to first unread message

Vishwajeet Kore

unread,
May 11, 2016, 10:16:24 AM5/11/16
to play-framework
I am new to play framework, I am using play 2.5.0 I can not understand how to deploy a play framework application.
I want to deploy it standalone. I cant not understand how and where to deploy it,
can any one tell me step by step what should i do for deploy?

I read play framework official site, but i cant understand it. 

please help me some one.
Thanks in advance. 

Justin Nichols

unread,
May 11, 2016, 10:21:20 AM5/11/16
to play-framework
$> cd /path/to/app/source
$> activator dist
$> cp target/universal/app-name-version.zip /path/to/deploy/location
$> cd /path/to/deploy/location
$> unzip app-name-version.zip
$> chmod +x app-name-version/bin/app-name
$> app-name-version/bin/app-name

That will run your app in production mode.  Obviously the name of the app and the path for source and deployment will be different for you, so change accordingly.

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/15a0a9b0-2653-4ebe-9d49-7c6bf52d3d37%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Thanks,

Justin

Vishwajeet Kore

unread,
May 11, 2016, 10:40:34 AM5/11/16
to play-framework
Hey! thanks for reply but i m doing this in windows, and what is commnad chmod +x? 
i can not get it. can you  explain me it for windows?

Vishwajeet Kore

unread,
May 11, 2016, 10:43:45 AM5/11/16
to play-framework
I am getting following error while running app_name.bat file.

The input line is too long.The syntax of commnad is incorrect

Justin Nichols

unread,
May 11, 2016, 10:49:05 AM5/11/16
to play-framework
Supposedly that was fixed, but please look at: http://stackoverflow.com/questions/21429234/play-framework-2-stage-task-on-windows-the-input-line-is-too-long  and  https://github.com/playframework/playframework/issues/2025

You may just need to alter the app_name.bat to not have such a long line due to the classpath.

Or consider using git-bash or cygwin as alternatives.

As for your previous question, you don't need to chmod on windows, as you've found out, just run the .bat instead.

Vishwajeet Kore

unread,
May 11, 2016, 11:58:27 PM5/11/16
to play-framework
I tried as per your given link of stackoverflow,

But i am getting following error.

Error: Could not find or load main class play.core.server.ProdServerStart

Why this error is coming? please help me.

Justin Nichols

unread,
May 12, 2016, 6:47:35 AM5/12/16
to play-framework
My guess is that something went missing from your classpath when you made the .bat change.  You'll want to verify exactly what you changed.

Honestly my suggestion is to run gitbash and run the application from there.  I have had coworkers using Windows who do so and never had this issue.

Thanks,

Justin




Naftoli Gugenheim

unread,
May 12, 2016, 4:12:09 PM5/12/16
to play-framework


On Wed, May 11, 2016, 10:21 AM Justin Nichols <jus...@nichols.mobi> wrote:
$> cd /path/to/app/source
$> activator dist
$> cp target/universal/app-name-version.zip /path/to/deploy/location

There's no reason to have/use Activator on the server, so that should probably be scp, followed by ssh-ing into the server.

$> cd /path/to/deploy/location
$> unzip app-name-version.zip
$> chmod +x app-name-version/bin/app-name
$> app-name-version/bin/app-name

That will run your app in production mode.  Obviously the name of the app and the path for source and deployment will be different for you, so change accordingly.

On Wed, May 11, 2016 at 10:16 AM Vishwajeet Kore <vishu...@gmail.com> wrote:
I am new to play framework, I am using play 2.5.0 I can not understand how to deploy a play framework application.
I want to deploy it standalone. I cant not understand how and where to deploy it,
can any one tell me step by step what should i do for deploy?

I read play framework official site, but i cant understand it. 

please help me some one.
Thanks in advance. 

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/15a0a9b0-2653-4ebe-9d49-7c6bf52d3d37%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Thanks,

Justin

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.

Naftoli Gugenheim

unread,
May 12, 2016, 4:12:38 PM5/12/16
to play-framework


On Wed, May 11, 2016, 10:16 AM Vishwajeet Kore <vishu...@gmail.com> wrote:
I am new to play framework, I am using play 2.5.0 I can not understand how to deploy a play framework application.
I want to deploy it standalone. I cant not understand how and where to deploy it,

Where do you want to deploy it? Have you deployed things before? What's your current experience?

can any one tell me step by step what should i do for deploy?

I read play framework official site, but i cant understand it. 

please help me some one.
Thanks in advance. 

--

Justin Nichols

unread,
May 12, 2016, 4:33:03 PM5/12/16
to play-framework
I never said for him to run activator on the server.  He can easily take the zip file and deploy it and run the other commands.

Thanks,

Justin




Reply all
Reply to author
Forward
0 new messages