Skip to content

michaelBielang/interview-preparation-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 

Repository files navigation

Introduction

This repository is part of my upcoming youtube series on how to build a microservice architecture with a simple backend and frontend.

This demo can give you an idea how to properly structure and setup a project. In my video sessions I also demonstrate some common mistakes as well how to avoid them.

In the end you will have an app which you can use with a provided collection of questions and answers.

These you can use and extend to prepare for interviews.

These are commonly asked questions, which sometimes make more or less sense in the daily business ;)

App

js-standard-style

Features

  • Backend with Spring Boot and Java 14
  • JWT Auth.
  • Angular
  • H2/MySQL DB with liquibase
  • Tests
  • A basic set of questions/answers

Todos for further versions

  • Implement React on another microservice instant to offer two different UIs for the same backend

Installation

CI with Jenkins

docker pull jenkins/jenkins

Create a bridge network in Docker

docker network create jenkins

docker run --name jenkins-docker --rm --detach ^ --privileged --network jenkins --network-alias docker ^ --env DOCKER_TLS_CERTDIR=/certs ^ --volume jenkins-docker-certs:/certs/client ^ --volume jenkins-data:/var/jenkins_home ^ docker:dind

stop

docker stop jenkins-docker

The first number represents the port on the host while the last represents the container’s port

Execute

Run Docker container with docker profile set in Dockerfile and migration scripts on host

docker run --detach --name internal-mysql -p 6604:3306 -e MYSQL_ROOT_PASSWORD=user_pass -e MYSQL_DATABASE=internal -e MYSQL_USER=user -e MYSQL_PASSWORD=user_pass mysql ``

Interact with Database (link to ec-mysql container) with mysql client

docker run -it --link internal-mysql:mysql --rm mysql sh -c 'exec mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD"'

Run backend and link to sql container (link to ec-mysql container) with mysql clientx

docker run -P codemerger:0.0.1-SNAPSHOT -p 8080:8080 --link internal-mysql:mysql -d backend

Further commands

docker log nameOfTheContainer