Deployment script(s) for GeriLife
In order to run this script, please ensure you have the following dependencies installed on your computer.
- Git - used to check out the project source code
- npm - used to run the front-end deployment
- mup - used to run the back-end deployment
Run the following commands to prepare this directory for deployment.
The frontend and backend projects are in separate Git repositories. Clone both projects by running the following command:
bash clone-sources.sh
Initialize a mup project in this directory:
mup init
Copy the example configuration for use by mup:
cp mup.js.example mup.js
Then, edit the mup.js
file to add your server IP, username, and password (or desired authentication details).
Note: depending on your deployment server configuration, you may need to activate an ssh-agent to authenticate on the remote server using your SSH key. Run the following commands to activate an SSH agent and add your SSH key to the session.
eval `ssh-agent`
ssh-add
You can deploy the projects independently or both together with the following commands.
Deploy frontend and backend concurrently.
bash deploy-all.sh
Deploy only backend.
bash deploy-backend.sh
Deploy only frontend.
bash deploy-frontend.sh