Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Play pid is a big caveat for people starting using sbt-native-packager. #602

Closed
knshiro opened this issue Jun 13, 2015 · 5 comments
Closed

Comments

@knshiro
Copy link

knshiro commented Jun 13, 2015

This line is everywhere in the documentation:
-Dpidfile.path=/var/run/${{app_name}}/play.pid
And usually is said to be added to src/universal/conf/application.ini whereas play actually uses dist/conf/application.ini and the ${{app_name}} is also not replaced.
So I was actually thinking about making a pull request to play-sbt-plugin but I realise you don't want a

bashScriptExtraDefines += s"""addJava -Dpidfile.path=/var/run/${app_name}/play.pid"""

there by default because /var/run doesn't always exists.

I think this could be solved by having a new folder in app_home called run with the right permission that could be linked to /var/run/app_name for the right packagers. Then play-sbt-plugin could add

bashScriptExtraDefines += s"""addJava -Dpidfile.path=${app_home}/../run/play.pid"""
@knshiro knshiro changed the title Play pid is big caveats for people starting sbt-native-packager. Play pid is a big caveat for people starting sbt-native-packager. Jun 13, 2015
@knshiro knshiro changed the title Play pid is a big caveat for people starting sbt-native-packager. Play pid is a big caveat for people starting using sbt-native-packager. Jun 13, 2015
@muuki88
Copy link
Contributor

muuki88 commented Jun 13, 2015

This line is everywhere in the documentation

That's true. And a big issue for everybody deploying play the first time.

I think this could be solved by having a new folder in app_home

This solution would definitely work. The big question here is, where to put this.

sbt-play-plugin

Putting the links, templateFolders and bashScriptExtraDefines inside the play plugin.
This means a tighter coupling of both plugins and fixes have to be made on the play side.

sbt-native-packager

We could create a specific plugin like LocalPidPluging that adds the suggested settings for different kind of packaging formats. However we would need an additional setting for the pid app parameter name, e.g. pidParameter := "-Dpidfile.path.

WDYT?

@knshiro
Copy link
Author

knshiro commented Jun 14, 2015

For me it feels like other folders are treated the same way by adding a folder in the /usr/share/<app_name> and a link to the different folders (conf, logs) of the system except the run folder. I think it should be treated the same way. This way there wouldn't be a need for a specific LocalPidPlugin and the adaptation of the sbt-play-plugin would just be a one liner bashScriptExtraDefines

@muuki88
Copy link
Contributor

muuki88 commented Jun 14, 2015

You are right. I was thinking too complicated. This should work smoothly. The challenge will be to make all bash scripts work correctly:

@francisdb
Copy link
Contributor

see also #607

@muuki88
Copy link
Contributor

muuki88 commented Nov 1, 2017

@muuki88 muuki88 closed this as completed Nov 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants