= My Thai Star
develop: image:https://travis-ci.com/devonfw/my-thai-star.svg?branch=develop["build-status",link="https://travis-ci.com/devonfw/my-thai-star"]
Live URL : https://mts-devonfw-core.cloud.okteto.net/
This repository is an ADCS Capgemini initiative that hosts an application reference called My Thai Star. This application is about the management of a restaurant.
== Technologies
This project is intended to be an example for the usage of new technologies in web development. Here is a list of all technologies involved:
Client-side developed using the latest version of this framework: Angular 10.
Server-side developed using the 2020.08.001 version of devon4j.
Server-side developed using the basics of the NestJS framework. A node.js framework built on top of Express.js based on TypeScript language. This server-side backend is based on the devon4node incubator.
Server-side developed using the dotnet framework.
Used this technology to define contracts between client-side(s) and server-side(s). So necessary when every back-end of the project (.NET, NodeJS and Java) is prepared to match with the Angular client exactly in the same way, being transparent to the user.
Tool used for Continuous Integration and Continuous Delivery. Inside of this Jenkins and SonarQube are used. Also used Docker for the deployment in an external server.
MrChecker is a testing framework included in devonfw with several useful modules, from which we will focus on the Selenium Module, a module designed to make end-to-end testing easier to implement. More about it link:https://github.com/devonfw/devonfw-testing/wiki[here].
=== Deprecated
Some folders have been marked as deprecated. They have not been removed for information purposes and in case it is necessary to recover previous work. They are the following:
Use them at your own risk.
== Deployment
=== From code
This application can be easily deployed using Docker and docker-compose.
$ docker-compose up
As both Angular and Java Dockerfile
(s) are using multi-stage build, apps are being built in their development environments (node
for Angular and maven
for Java) and then deployed in nginx
and tomcat
respectively.
3 Docker containers will be created:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
23921e672489 mythaistar_java "catalina.sh run" 3 minutes ago Up 3 minutes 8080/tcp mts_java
1acf2d6b6653 mythaistar_reverse-proxy "nginx -g 'daemon of…" 3 minutes ago Up 3 minutes 0.0.0.0:443->443/tcp, 0.0.0.0:8080->80/tcp mts_reverse_proxy
fdb63e26d299 mythaistar_angular "nginx -g 'daemon of…" 3 minutes ago Up 3 minutes 80/tcp, 443/tcp mts_angular
The usage of the reverse-proxy
only uses 1 port of the Docker host (where this is deployed), the 8080
. All internal communication of containers is done using docker alias of services.
=== From artifact
If we are using a CICD pipeline and we store the artifact on nexus, we can also deploy it without recompile all code. For this purpose there are three deployment pipelines:
The result of this deployment will be the same as in the deployment from code, but instead of compiling the artifact again downloads it from nexus. All resources (docker-compose.yml, Dockerfiles and nginx.conf) are stored in the reverse-proxy folder.
=== In Kubernetes
If you are using k8s yaml files (inside "k8s" folder) and deploy in Kubernetes Clusters, then, please refer the following: