Play!

If you are looking to deploy a Play2 application, please have a look at:

The process explained in this page only matches with the 1.4.4 version of Play!.

Usage

Example usage:

  $ ls
  app	conf	lib	public	test

  $ scalingo create my-app

  $ git push scalingo master
  ...
  -----> Fetching custom build pack... done
  -----> Play! app detected
  -----> Installing Play!..... done
  -----> Installing ivysettings.xml..... done
  -----> Building Play! application...
         ~        _            _
         ~  _ __ | | __ _ _  _| |
         ~ | '_ \| |/ _' | || |_|
         ~ |  __/|_|\____|\__ (_)
         ~ |_|            |__/
         ~
         ~ play! 1.4.4, https://www.playframework.com/
         ~
         1.4.4
         Building Play! application at directory ./
  ...

The buildpack will detect your app as using the Play! framework if it has an application.conf in a conf directory. Your dependencies will be resolved using play dependencies and your app precompiled with play precompile. If you don’t provide a Procfile the build pack will default to launching your app with play run --%prod -Dprecompiled=true.

Play Versions

The buildpack will read the Play! version that your application expects from your dependencies.yml file. The version comes on the same line where you already declare a dependency on the Play! framework itself:

require:
  - play 1.4.4

If you don’t specify a version it will be defaulted for you and you’ll see a warning message in your build output. It is a best practice to specify the version of the framework that you intend to use.

Once your application is live you can upgrade the Play! version by changing the version in your dependencies.yml. If you don’t specify a version and use the default version your application will not be updated when the default version is updated. This is so that you don’t have to deal with your application being upgraded unexpectedly.

Customizing Ivy

You can customize the Ivy execution by creating a .ivy2-overlay directory in your project and adding it to Git. The contents of this directory will be copied over the default .ivy2 directory. In this way, you can add files such as .ivy2-overlay/ivysettings.xml to customize the Ivy execution.

Buildpack

More information at https://github.com/Scalingo/play-buildpack.


Suggest edits

Play!

©2024 Scalingo