Pet project Klinika
- Spring Boot
- Spring Boot MVC
- Swagger UI
- Spring Boot Security
- Postgres
- RESTful API
- Docker-compose
- Backup DB
- AOP (Log, Transaction, Error, Cache, Security)
- Cache
- Kubernetes (K8s)
- DevTools
- Liquibase
- Apache Kafka with Zookeeper and KRaft
keytool -genkeypair -alias klinika -keyalg RSA -keysize 2048 -storetype PKCS12 -keystore klinika.p12 -validity 365
keytool -genkeypair -alias klinika -keyalg RSA -keysize 2048 -keystore klinika.jks -validity 365
keytool -importkeystore -srckeystore klinika.jks -destkeystore klinika.jks -deststoretype pkcs12
keytool -genkeypair -alias klinikaKey -keyalg RSA -keysize 2048 -validity 365 -keystore klinika.jks -storepass klinika
pg_dump -U postgres -W -F c -b -v -f klinika.backup Klinika // копирует все таблицы
pg_dump -U postgres -W -F c -t doctor -f backup_doctor.backup Klinika // копирует только одну таблицу
pg_restore -U postgres -W -d Klinika klinika.backup // возвращает все таблицы
pg_restore -U postgres -W -d Klinika backup_doctor.backup // возвращает только одну таблицу
docker cp klinika.backup postgres_db:/klinika.backup // копирование резервной копии
docker exec -it postgres_db pg_restore -U postgres -d Klinika /klinika.backup // восстановление резервной копии
docker exec -t postgres_db pg_dump -U postgres -F c -b -v -f klinika.backup Klinika // создание резервной копии
docker exec -t postgres_db pg_restore -U postgres -W -d Klinika klinika.backup // восстановление резервной копии
docker tag klinika kirillkus/klinika // Create tag
docker push kirillkus/klinika // Push container
1. K8s.yml - without ssl
2. K8s2.yml - with ssl
minikube start (start minikube)
minikube dashboard ( ui Kubernetes )
kubectl apply -f k8s.yaml ( executable file )
kubectl apply -f k8s2.yaml ( executable file )
kubectl logs klinika-765bb6f8f9-zl7cd ( check log, where klinika-765bb6f8f9-zl7cd - name's pod)
kubectl cp klinika.jks klinika-5c66d8b6b6-pg5ms:/app/keystore ( add klinika.jks to package /app/keystore in k8s)
1. need app password
https://myaccount.google.com/apppasswords
2. add password to email.properties
1. Rollback ( in cmd )
mvn liquibase:rollback -Dliquibase.rollbackCount=1
- setup container-internal port forwarding
docker exec -it --user=root kafka-ui /bin/sh
apk add socat
socat tcp-listen:9092,fork tcp:host.docker.internal:9092
( Unfortunately, we need to run socat each time we start the container! )