ashley-koh / promojio-server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PromoJio Server

docker spring boot docker

Self-hosted web server for PromoJio

Team 54

Member Student Number
Ashley Koh Jia Jhin 1004197
Siew Rui Ze, Zayne 1007180
Tan Yan Lin, Charlese 1007075
Khoo Jing Heng 1007221
Allison Yee Wen Chyi 1007020
Asli Robin Rufo 1007212
Austin Isaac 1007099

Documentation of Endpoints

  1. User Endpoints
  2. Promo Endpoints

Requirements

  1. IntelliJ Idea Community Edition - recommended (scroll down to black banner)
    Other IDEs (e.g. VSCode) also viable
  2. Docker - follow the installation instructions from the official documentation

Local Development Setup

  1. Select Get from Version Control when creating new project.
  2. Paste https://github.com/ashley-koh/promojio-server.git and select Clone
  3. Run the following command in a terminal:
docker compose up -d mongodb mongo-express
  1. An instance of MongoDB and MongoExpress should now be running in the background
  2. Build and run this git repo in IntelliJ Idea (or your IDE of choice) to run this server
  3. Connect to Spring Web Server on http://localhost:8080
  4. View MongoExpress on http://localhost:8081

Production Setup

  1. Update application.properties to use mongodb container network
spring.data.mongodb.uri=mongodb://rootuser:rootpass@mongodb:27017
  1. In a terminal on the directory of this project, run:
mvn clean install
mvn package
docker image build -t ashleykoh24/promojio-server .
docker compose up -d
  1. Connect to Spring Web Server on: http://yourserverip:8080
  2. View MongoExpress on: http://yourserverip:8081

(Note: This server is currently unsecured)

About


Languages

Language:Java 85.9%Language:Python 13.8%Language:Dockerfile 0.3%