Book Image

Play Framework Cookbook - Second Edition

By : Alexander Reelsen, Giancarlo Inductivo
Book Image

Play Framework Cookbook - Second Edition

By: Alexander Reelsen, Giancarlo Inductivo

Overview of this book

<p>As web and mobile systems become more sophisticated, anchoring systems in a mature, solid framework has become increasingly important. Play 2 provides developers with the necessary tools to build robust web applications.</p> <p>This book is a compilation of useful recipes aimed at helping developers discover the power of Play 2. The introductory section serves as a primer to Play Framework, wherein all the fundamentals of the framework are covered extensively. It then explains the usage of controllers and how modules can be leveraged for optimal performance. Next, the book walks you through creating and using APIs, followed by extensive real-world applications. Finally, you will learn to manage applications post production.</p>
Table of Contents (15 chapters)
Play Framework Cookbook Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Deploying a Play application with Dokku


In this recipe, we will use the Docker-based tool, Dokku, to manage our Play 2 web application deployment. Dokku provides a very straightforward deployment interface, quite similar to Heroku's deployment interface and allows developers to quickly deploy Play 2 web apps.

We will have Dokku running and will deploy our Play 2 web application in a Digital Ocean Droplet. We will need a Droplet with at least 2GB of RAM to run our sample webapp. Ensure that you sign up for a Digital Ocean account to follow this recipe:

https://cloud.digitalocean.com/registrations/new

How to do it...

  1. Prepare your deployment droplet by creating a new 2GB RAM Droplet with Dokku v0.3.15 on 14.04 or higher application option pre-installed:

  2. Once droplet creation is completed, you can verify the Droplet settings on the dashboard, ensuring that it is configured with 2GB of RAM and making note of the assigned IP address for the droplet:

  3. Next, we will need to complete the Dokku installation...