Trick
Trick

Reputation: 3849

Play framework 2.0 deployment steps (I think something is missing)

I have some strange problems when I deploy application build with Play framework 2.0. It looks like deployment didn't clean/overwrite compiled files. This I know because one method is changed but still the old is somehow called...

My deployment steps:

  1. in app directory ../play stop
  2. upload all files to app directory from development (except application.conf)
  3. ../play clean compile stage
  4. in target directory: ./start -Dhttp.port=80 &

I need some "best practices" advices ;)

Upvotes: 1

Views: 745

Answers (1)

biesior
biesior

Reputation: 55798

Some tips:

  • Try to use play clean-all instead play clean.
  • Use the GIT for controlling changes, maybe you forgot to upload something.
  • Use alternative configuration file for running app in different environments.
  • Use dist command for building independent production versions, with some bash scripts + git hooks + load balancer you'll be able to switch versions without stopping the application. Anyway remember to move and unzip created file outside the /dist directory, as it is cleaned every time when you call play dist command.

Upvotes: 3

Related Questions