Before you can build and deploy the application, you will need to install the following dependencies on your virtual machine:
To install Java, run the following commands:
sudo apt-get update
sudo apt-get install openjdk-17-jdk
To install maven, run the following commands:
sudo apt install maven
Once the command has finished executing, confirm its installation by running:
maven --v
To install Node.js and run the following commands:
sudo apt-get update
sudo apt-get install nodejs
sudo apt install npm
After installation, verify Node.js, npm and React are installed by running:
node -v
npm -v
git clone git@git.cs.dal.ca:courses/2024-winter/csci5308/Group13.git
OR
git clone https://git.cs.dal.ca/courses/2024-winter/csci5308/Group13.git
cd Group13/backend/Furrever_Home
- Run the following command to install backend dependencies:
mvn clean install
- After installing dependencies, start the Spring Boot backend server by running:
mvn spring-boot:run
The application will be accessible at http://localhost:8080.
Dependency | Version | ArtifactId |
---|---|---|
org.springframework.boot | ||
org.springframework.boot | ||
org.springframework.boot | ||
com.mysql | runtime | mysql-connector-j |
org.projectlombok | optional | lombok |
org.springframework.boot | test | spring-boot-starter-test |
org.passay | 1.0 | passay |
org.springframework.boot | spring-boot-starter-security | |
com.google.guava | 10.0.1 | guava |
io.jsonwebtoken | 0.11.5 | jjwt-api |
io.jsonwebtoken | 0.11.5 | jjwt-impl |
io.jsonwebtoken | 0.11.5 | jjwt-jackson |
org.junit.jupiter | 5.10.0 | junit-jupiter-engine |
org.springframework.security | test | spring-security-test |
io.jsonwebtoken | 0.9.1 | jjwt |
com.vaadin.external.google | compile | android-json |
org.apache.commons | commons-lang3 | |
org.springframework.boot | spring-boot-starter-mail | |
io.getstream | 1.20.1 | stream-chat-java |
commons-codec | 1.16.0 | commons-codec |
org.apache.commons | 3.0 | commons-lang3 |
io.rest-assured | test | rest-assured |
org.hamcrest | test | hamcrest-all |
javax.xml.bind | jaxb-api | |
org.glassfish.jaxb | jaxb-runtime |
cd Group13/frontend/furrever_home
- Run the following command to install frontend dependencies:
npm install
- After installing dependencies, start the React frontend server by running:
npm run dev
The application will be accessible at http://localhost:5173.
Dependency | Version |
---|---|
@emotion/react | ^11.11.3 |
@emotion/styled | ^11.11.0 |
@heroicons/react | ^2.1.1 |
@material-tailwind/react | ^2.1.9 |
@mui/material | ^5.15.11 |
@mui/x-data-grid | ^6.19.5 |
@mui/x-date-pickers | ^6.19.5 |
axios | ^1.6.7 |
react | ^18.2.0 |
react-dom | ^18.2.0 |
react-icons | ^5.0.1 |
react-initials-avatar | ^1.1.2 |
react-router-dom | ^6.22.0 |
react-toastify | ^10.0.4 |
stream-chat | ^8.24.0 |
stream-chat-react | ^11.12.0 |
swiper | ^11.0.6 |
Dependency | Version |
---|---|
@tailwindcss/forms | ^0.5.7 |
@types/react | ^18.2.43 |
@types/react-dom | ^18.2.17 |
@vitejs/plugin-react | ^4.2.1 |
autoprefixer | ^10.4.17 |
dotenv | ^16.4.1 |
eslint | ^8.55.0 |
eslint-plugin-react | ^7.33.2 |
eslint-plugin-react-hooks | ^4.6.0 |
eslint-plugin-react-refresh | ^0.4.5 |
postcss | ^8.4.33 |
tailwindcss | ^3.4.1 |
vite | ^5.0.8 |
To install your own GitLab Runner instance, follow the official documentation: https://docs.gitlab.com/runner/install/
A private GitLab runner is recommended to ensure the security and reliability of your CI/CD pipeline.
By using a private runner, you can have more control over the environment and resources used for your builds.
After installation, verify runner is installed by running:
gitlab-runner --version
To host your Spring Boot app using Docker, you will need to have Docker installed on your virtual machine.
Here are the steps to install Docker on Ubuntu:
- Install the necessary packages to allow apt to use a repository over HTTPS:
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
- Add the GPG key for the official Docker repository:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- Add the Docker repository to apt:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
- Install the latest version of Docker:
sudo apt-get install -y docker-ce
To set up variables for your repository in your CI/CD pipeline, go to your repository settings, then CI/CD, then variables. Now add the following variables:
DEPLOY_DIR – Type: Variable – Directory to store pipeline generated artifacts
DEPLOY_HOST – Type: Variable - Hostname
DEPLOY_USER – Type: Variable - Username
DEPLOY_SSH_KEY – Type: File – Use generated Private key
In deployment stage, we need a SSH key to access the VM. To set up SSH, run the following commands on your VM:
ssh-keygen -t ecdsa -f ~/.ssh/<<key-name>>
cd .ssh
cat <<key-name>>.pub >> ~/.ssh/authorized_keys
eval "$(ssh-agent -s)"
ssh-add <<absolute_path_of_priv_key>>
cat <<key-name>>
Now, copy this private key and add it to your repository’s env
variable for SSH key.