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

More Generic play2-on-dotclound #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

.DS_Store
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ To test this, use the good old "git clone / dotcloud push" method:

git clone git://github.com/mchv/play2-on-dotcloud.git

To deploy your own application, put its code source into application folder

To deploy your own application, put its code source into application folder or,
Remplace the "application folder" by your "play application folder", and modify the dotcloud.yml (APPLICATION_FOLDER field)
Don't forget to do one of the following:

- ``dotcloud push`` with the ``--all`` flag (will force the use of rsync over git),
Expand Down
2 changes: 2 additions & 0 deletions dotcloud.yml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
play:
environment:
APPLICATION_FOLDER: application
type: custom
buildscript: playframework/builder
ports:
Expand Down
13 changes: 6 additions & 7 deletions playframework/builder
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
set -e
BUILDROOT="$(dirname "$0")"
VERSION=2.0.3

echo 'Checking if Play framework is already installed...'
if [ -d ~/play-${VERSION} ]
then
Expand All @@ -29,20 +28,20 @@ else
fi

echo 'Installing application'
rm -rf ~/application
cp -R ./$SERVICE_APPROOT ~/application
rm -rf ~/$APPLICATION_FOLDER
cp -R ./$SERVICE_APPROOT ~/$APPLICATION_FOLDER

echo 'Symlinking application logs to Supervisor area...'
rm -rf ~/application/logs
ln -s /var/log/supervisor ~/application/logs
rm -rf ~/$APPLICATION_FOLDER/logs
ln -s /var/log/supervisor ~/$APPLICATION_FOLDER/logs

echo 'Installing run script...'
cp "$BUILDROOT/run" ~

echo 'Building the Play application'
cd ~/application
cd ~/$APPLICATION_FOLDER

export _JAVA_OPTIONS="-Xms502m -Xmx502m"
export _JAVA_OPTIONS="-Xms256m -Xmx256m"
echo ' -- Cleaning -- '
~/play-${VERSION}/play clean
echo ' -- Compiling -- '
Expand Down
5 changes: 3 additions & 2 deletions playframework/run
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/sh

export JAVA_OPTIONS="-Xmx128M -XX:PermSize=64M -XX:MaxPermSize=128M"
echo "JAVA_OPTIONS=$JAVA_OPTIONS"
echo '(To change JAVA_OPTIONS, edit the "run" script!)'

cd ~/application
target/start -Dhttp.port=$PORT_WWW
cd ~/$APPLICATION_FOLDER
target/start -Dconfig.resource=dotcloud.conf -DapplyEvolutions.default=true -Dhttp.port=$PORT_WWW