-
Notifications
You must be signed in to change notification settings - Fork 0
User guide for production setup
Ensure you have the following installed on your system:
- Java 17
- Docker
- npm
The project is composed of four main parts:
- Express Server
- Backend Application
- Frontend Application
- Database
- Fill in the
.env.template
file with your specific configuration and rename it to.env
. - Run
envBuilder.py
to set up the environment variables.
For running the production version with nginx support, use:
docker-compose -f docker-compose.prod.yaml up -d --build
Navigate to backend/app/
and execute the following commands:
cd /home/selab2/pigeon/backend/app
./gradlew clean build --no-daemon
rm -rf gradle.log
nohup java -jar build/libs/pidgeon-0.0.1-SNAPSHOT.jar &> gradle.log &
To view the logs run
tail -f gradle.log
Navigate to the frontend directory and execute:
npm install
npm run build
Navigate to backend/web-bff/app
and execute:
npm install
pm2 start ./bin/www.js --name "express-server"
To view the logs run
pm2 logs express-server --lines 30
To stop it run
pm2 stop express-server
If you encounter any issues while running the project, try the following:
-
If the
docker-compose
command fails, you might need admin privileges. Try running the command withsudo
. -
If you have issues connecting to the database, ensure there is only one server running on port 5432. You can check this by running the following command on Linux:
sudo lsof -i :5432
- If the above steps don't resolve the issue, try deleting the Docker volume and rerunning the
docker-compose
command. This will create a fresh volume. You can delete the volume with the following command:
docker volume rm <project_directory_name>_postgres-data
Replace <project_directory_name>
with the name of your project directory.