https://github.com/mattmezza/k8s-seminar-app
https://github.com/mattmezza/k8s-seminar-app
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mattmezza/k8s-seminar-app
- Owner: mattmezza
- Created: 2022-12-16T16:28:40.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-19T13:46:54.000Z (over 3 years ago)
- Last Synced: 2025-04-07T12:50:20.881Z (about 1 year ago)
- Language: HTML
- Size: 417 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
k8s-seminar web app
===

This is a very simple web app to showcase a deploy on k8s.
This app is composed by:
- a client rendered web UI (Angular)
- a web service exposing a REST api endpoint (Spring Boot)
The deployment files are hosted in a separate repo [mattmezza/k8s-seminar-config](https://github.com/mattmezza/k8s-seminar-config).
# How to run the web app locally
In order to run the web app locally, you will need to install the following on your machine:
- nodejs (for the UI)
- openjdk (for the api)
For further info on how to install the web app locally, please refer to the individual app (ui and api).
# How to build images
First, make sure you cloned this repository on your machine.
## UI
```
cd ui
docker build -t k8s-seminar-ui:1.0.0 .
```
## API
```
cd api
mvn package
docker build -t k8s-seminar-api:1.0.0 .
```
# How to run the containers
Once you have built the images, running the containers is pretty easy.
## UI
```
docker run -p8081:80 k8s-seminar-ui:1.0.0
```
## API
```
docker run -p8080:8080 k8s-seminar-api:1.0.0
```
A this point you should have the UI running on port `8081` and the API running on port `8080` on your local machine.
This means you can open your browser and visit [http://localhost:8081](http://localhost:8081).
# How to deploy
Instructions on how to deploy this web app on a k8s cluster can be found in [mattmezza/k8s-seminar-config](https://github.com/mattmezza/k8s-seminar-config).