Microservice-based application development using Spring Boot, Spring Security, Spring Cloud, Kafka, Redis, Zipkin, MySQL, MongoDB, Elasticsearch, Docker and Kubernetes.
Frontend (Angular): https://github.com/ashrawan/swa-proj3-ui
-
Running Single Service at a time:
- If Using IDE: Run each services by clicking their "run" icon
- Using only CMD : On terminal of specific service, type
mvn spring-boot:run
- JAR file: First, Create jar
mvn clean install
and runjava -jar target/service1.jar
-
Running the application using docker
- If cloned first time, In the root directory run
mvn clean install
or use IDE, maven -> lifecycle -> install (to create jar for all services) - Then, In terminal type:
docker compose up
. (this will run mysql, and other services)
mvn clean install -DskipTests docker compose up
- If cloned first time, In the root directory run
Check docs/dev folder README, to start the required services. "MongoDB", "Kafka", "Redis" ..
mvn clean install -DskipTests
# If minkiube, also run -> minikube docker-env
docker compose build
# app-cores: All configs and DB, services: all services
kubectl create -f k8s/app-cores
kubectl create -f services
# add "192.168.49.2 jobapp.swa.local" to /etc/host
sudo nano /etc/hosts
==========================
127.0.0.1 localhost
192.168.49.2 jobapp.swa.local
==========================
# FROM: "auth-service", This is for create user
curl --location --request POST 'http://jobapp.swa.local/auth/create-user' \
--header 'Content-Type: application/json' \
--data-raw '{
"fullName": "Test user",
"email": "test1",
"password": "test1"
}'
# FROM: "auth-service", This is for Login
curl --location --request POST 'http://jobapp.swa.local/auth/login' \
--header 'Content-Type: application/json' \
--data-raw '{
"username": "test1",
"password": "test1"
}'
Steps: Creating multi-module project
- Create new project "swa-2", and select buildSystem maven.
- Then either Create new services or Add existing ones
- Create (New Module): right click on project "swa-2" and create any module
- e.g click on: new -> module -> springInitializr
- Add (Add Module): right click on "swa-2", open module settings
- then under that Settings -> Modules -> click on + -> import module -> Select .pom file or directory -> then import module from external model -> select maven -> Apply
- After that go to pom.xml of root project "swa-2" and add to
<modules> ... <modules>
- Create (New Module): right click on project "swa-2" and create any module
INSTRUCTION:
- Use "develop" branch to make and commit changes.
- We will merge to "main" on the day-end or when services are integrated and working fine.
Want to know, What to contribute and how to do it ?
Please, Check out TODO.md , and discuss with the team
Reach out team-mates to Discuss and do it together.