For instructions about how to install the requirements see Installation.
NGINX is necessary if only you host multiple web applications on the server and you need to do some port forwarding. Apache Web Server is not compatible with the WebSockets. If you use that the users won't have live notifications.
-
Clone or pull Rosemary using git, then navigate into the Rosemary directory.
git clone https://github.com/AMCeScience/Rosemary-Vanilla.git Rosemary-Vanilla # Or git pull # Then cd Rosemary-Vanilla
-
If you have deployed the application previously first do a cleanup. Note that the following commands are also available in the provided cleanup.sh script.
# Clean-up front-end dependencies
rm -vfr node_modules
rm -vfr public/bower
# Clean-up compiled back-end code
activator clean
-
Generate a new application secret based on these instructions.
-
Review the application configuration file in conf/application.conf and adjust settings where necessary.
-
Install dependencies using
npm
andbower
. Then compile and stage the Play Web Application usingactivator
. Note that the following commands are also available in the provided initialize.sh script.# Install front-end dependencies npm install bower install # Compile back-end code activator compile # Run gulp to generate public/script/app.js and public/styple/app.css gulp default # Stage the application for stand-alone execution activator stage
-
Run the Rosemary Web Application using the following command.
nohup sudo /app/Rosemary-Vanilla/target/universal/stage/bin/rosemary-vanilla -Dhttp.port=80 -Dconfig.file=/app/Rosemary-Vanilla/conf/production.conf &> /dev/null &
Note that sudo
is necessary only if your are putting it on port 80 because of SELinux.
- If this is the first time that you are deploying the application, you should initialize the database by accessing the following URL:
http://host/initialize
Then deactivate this URL by commenting out the route in conf/routes.
- Remember to change the admin password in the database using the
mongo
console:
db.users.update( { email: "[email protected]" }, { $set: {password: "testtest" } } )