Build and deploy
📋 Requirements
System Requirements
Operating System: Latest Ubuntu Linux (Windows is not supported; use a Linux VM if needed. Other Unix systems are not supported.)
Backend: JDK 21
Admin App Frontend: Node.js 20
User Portal Frontend: Node.js 20
Database: Latest version of MongoDB
Hardware Requirements
Storage: Depends on usage
CPU: 16 cores recommended
Memory: 64GB recommended
Supported Web Browsers
Mozilla Firefox
Google Chrome
Chromium
Apple Safari
Microsoft Edge
Note: Suggest Feature does not support environments with JavaScript disabled.
🚀 Getting Started
Step 1: Clone the Repository
To begin, clone the Suggest Feature repository:
Backend Setup
Option 1: Manual Setup
Navigate to the backend directory:
Run the Gradle task to build the JAR file:
Set the necessary environment variables before starting the backend application. Create a
.env
file or export the environment variables directly in your terminal:Once the environment variables are set, run the backend application using:
The backend will start on port
8081
.
Option 2: Using Docker
You can use the Dockerfile located in the backend
directory to build and run the backend:
Build the Docker image:
Run the container:
Admin App and User Portal Setup
Admin App Setup
Navigate to the
frontend
directory:Install the dependencies and build the application:
Start the server:
The admin app will run on port
3000
.User Portal Setup
Navigate to the
frontend-portal
directory:Install the dependencies and build the application:
Start the server on port
3001
:
Using Docker for Admin and User Portal Apps
You can also use Docker to run both the admin and user portal apps:
Admin App Docker Setup
Navigate to the
frontend
directory:Build the Docker image:
Run the container:
User Portal Docker Setup
Navigate to the
frontend-portal
directory:Build the Docker image:
Run the container:
Nginx Configuration
To ensure proper routing for the admin app, user portal, and backend API, set up your Nginx configuration as follows:
Create a new Nginx configuration file:
Add the following configuration:
Replace
admin.yourdomain.com
andportal.yourdomain.com
with your actual domain names.Enable the configuration by creating a symbolic link:
Test the Nginx configuration:
Reload Nginx:
MongoDB Setup
Ensure you have MongoDB installed and running on your server.
Create a database and user with appropriate privileges.
Docker Compose (Coming Soon)
We will soon provide a docker-compose.yml
file that will enable you to run the entire stack (backend, admin app, user portal, and MongoDB) with a single command.
Last updated