NikRik’s Batangas Lomi atbp., is a startup food business located in Pasay City offering short orders and party trays such as Specials (lomi, miki guisado, and pansit), A La Carte (crispy pork sisig, creamy tofu, lechon kawali, etc.), Extras (toppings, rice, egg fried rice) and Rice Meals (pork sisig with rice).
-
Download and install Docker.
-
Make sure Docker is running.
-
Open command prompt/Powershell or Git Bash to create the network bridge named
nikriks
for the database and Spring boot backend application.docker network create --subnet=172.18.0.0/16 nikriks
-
Pull the docker images in your local docker installation in the following order: Database, Backend, and Frontend
-
Pull the MySQL image from DockerHub
docker pull zarexalvindaria/nikriksapp-db:latest
-
Run the image under the nikriks network at port 3310
docker run --name nikriksapp-db --network nikriks --ip 172.18.0.2 -p 3310:3306 -d zarexalvindaria/nikriksapp-db:latest
-
Wait for at least 5 minutes to allow the database to run and accept connection.
-
Pull Nikrik's Backend Spring Boot image from DockerHub
docker pull zarexalvindaria/nikriksapp-docker-backend:latest
-
Run the image under the nikriks network specifying its host ip and port at 172.18.0.3: 8443
docker run --name nikriksapp-docker-backend --network nikriks --ip 172.18.0.3 -p 8443:8443 -d zarexalvindaria/nikriksapp-docker-backend:latest
If using GitHub Pages: The application can now be accessed at https://nikriks.github.io/.
Note: Since GitHub pages does not support SPA, the workaround is to create a 404.html page similar with the index.html file. Make sure to make a 404 page when rebuilding a new frontend version.
Optional (If Dockerized)
-
Pull Nikrik's Frontend Angular image from DockerHub
docker pull zarexalvindaria/nikriksapp-frontend:latest
-
Run the Docker image at port 4200
docker run --name nikriksapp-frontend -p 4200:80 -d zarexalvindaria/nikriksapp-frontend:latest