Skip to content

Commit

Permalink
FIX #683 add references to play documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
muuki88 committed Mar 20, 2016
1 parent ae64ee3 commit db3d6b4
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions src/sphinx/recipes/play.rst
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
Play 2 Packaging
================

Although Play 2 supports Sbt Native Packager, it requires some additional steps
to successfully package and run your application.
Although Play 2 supports Sbt Native Packager, it requires some additional steps to successfully package and run your
application.

.. tip:: there are also two sections in the play documentation that describe deploying and configuring:

- `play deploying`_
- `play prod configuration`_

.. _play deploying: https://playframework.com/documentation/2.5.x/Deploying
.. _play prod configuration: https://playframework.com/documentation/2.5.x/ProductionConfiguration

Build Configuration
-------------------

Depending on whether you want to package your application as a deb-package or
as an rpm-package, you have to setup your build configuration accordingly.
Please, refer to :doc:`Debian </formats/debian>` and :doc:`Redhat </formats/rpm>`
Please, refer to :ref:`debian-plugin` and :ref:`rpm-plugin`
pages for additional information.

Note that **Upstart** is not supported by all available operation systems and may not always work as expected.
You can always fallback to the **SystemV** service manager instead.
For more information on service managers please refer
to :doc:`Getting Started With Servers </archetypes/java_server/index>` page.
For more information on service managers please refer to :ref:`java-server-plugin` page.

Application Configuration
-------------------------
Expand All @@ -35,8 +42,12 @@ One way to provide this information is to append the following content in your b
"-J-Xms512m",
// Since play uses separate pidfile we have to provide it with a proper path
// name of the pid file must be play.pid
s"-Dpidfile.path=/var/run/${packageName.value}/play.pid",
// alternative, you can remove the PID file
// s"-Dpidfile.path=/dev/null",
// Use separate configuration file for production environment
s"-Dconfig.file=/usr/share/${packageName.value}/conf/production.conf",
Expand All @@ -50,6 +61,10 @@ One way to provide this information is to append the following content in your b
This way you should either store your production configuration under ``${{path_to_app_name}}/conf/production.conf``
or put it under ``/usr/share/${{app_name}}/conf/production.conf`` by hand or using some configuration management system.

.. warning:: Your pid file must be called **play.pid**



SystemV
~~~~~~~

Expand All @@ -63,11 +78,10 @@ a `etc-default` in `src/templates` and set the `PIDFILE` environment variable.
# -----------------
# you can use this instead of the application.ini as well
# JAVA_OPTS="-Dpidfile.path=/var/run/${{app_name}}/play.pid $JAVA_OPTS"
# For rpm/systemv you need to set the PIDFILE env variable as well
PIDFILE="/var/run/${{app_name}}/play.pid"
See :doc:`customize java server application </archetypes/java_server/customize>` for more information on `application.ini`
and `etc-default` template.
See customize section for :ref:`java-server-plugin` for more information on *application.ini* and *etc-default*
template.

0 comments on commit db3d6b4

Please sign in to comment.