-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
nullchefo
committed
Aug 7, 2024
0 parents
commit 7937d17
Showing
1,949 changed files
with
340,095 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
./car-service-be/docker-compose-*.yml | ||
|
||
./car-service-be/k8s/mail-send/secret-mail-credentials.yaml | ||
/car-service-be/k8s/mail-send/secret-mail-credentials.yaml | ||
|
||
|
||
/Get_them_out/ | ||
.DS_Store | ||
|
||
*/.DS_Store | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<mxfile host="Electron" modified="2022-10-13T12:59:33.218Z" agent="5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/20.3.0 Chrome/104.0.5112.114 Electron/20.1.3 Safari/537.36" etag="tx-JGDnwWY5W4GWCcTIn" version="20.3.0" type="device"><diagram id="H1Oaz1pXkBTEmv_UMwv5" name="Page-1">3Vxbd+I2EP41PDrHsmwTHkmySU9Pcpou29NuX/YYI4y6xqK2CKG/vpLvlgwIxxfCS4KF8GXmm/lmRiOP4P36/Sl0NqsXskD+yNAX7yP4MDIMMIGQ/eMj+2zEnCQjXogX6VgxMMP/oXRQT0e3eIGiykRKiE/xpjrokiBALq2MOWFIdtVpS+JXr7pxPCQNzFzHl0f/xAu6SkZvjXEx/gvC3iq7MrDT51s72eT0SaKVsyC70hD8MoL3ISE0+bR+v0c+l14ml+R3jwe+zW8sRAFV+cFy9228gdPp+uHu7+W35Wo2nv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k53SVAW173IQBW/Q7qkuI1rCNWrqwDxoIWw0bZ3tAv9Fhr3RmqdT/PtX6nmUogih50g+s7zWiAGHhzEwLMYcgIkyH4+PTRVdXnd4RwRg1EHrkmzT43oxg6/vuCi0J+7xAb1rcYs4+PyH6g67Q+gfZ8m6dKG5Y11zerq55WbP6Fe9rBkIoYCpu6+iOluSK4GNIAqrFdVvlbQOmwWOnQ6ttxcja+cmT6cALmAj5K8yYzvljeQ6OX+/CNyBw1Ue+hIG+V7s1cQdOXTcRqFOWFEe2p62WN6xewPZTVe4fdPepZgh2m7fonEv+miGW5HThTF1Tv1xJGwJC9env+Hj+22a8YH0wXugJeLaYOjbMdTUh181fZXcxO1lsOWNtB5iDvSgq44sL31pvCR7JarqMZYnBTc/Lz7acYk83G794e9w9C2x4JHmZ4aXYpRsfpzeZPdmH9l4IO420mtgzXyCqBJ9dvVPHbnc5WhRgyQUAU9kJaOYNbGF/2mliOaCtnl4PJ/CB3TCeMQSCEosiHZv8uC4L7QRBZ5HI0TWjosp/umjXIhupd0DfDglMYIkrkU2hCSyxXblvcLb7yrCrBqdyp96goRLQBQ6VWjSVwQnERU0x6moMzhGv4GQvSU+mF++ah1/+Bw==</diagram></mxfile> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
**Non-Commercial, Non-AI, and Non-ML Software License (NCNAML)** | ||
|
||
Version 1.1, May 14, 2024 | ||
|
||
|
||
**Copyright (c) 2024 Stefan Kehayov** | ||
|
||
|
||
**Grant of License:** | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to use the Software solely for non-commercial purposes. For the purposes of this license, "non-commercial" is defined as any use of the Software for personal enjoyment or internal business operations that does not directly generate sales, licensing fees, or other commercial revenue. | ||
|
||
**Prohibited Uses:** | ||
|
||
1. **Commercial Exploitation:** You may not use, modify, distribute, or otherwise exploit the Software in any manner that involves the sale, license, or any other form of commercial gain of the Software or derivatives thereof. | ||
|
||
2. **Artificial Intelligence and Machine Learning:** You may not use, modify, distribute, or otherwise exploit the Software for the purposes of training, enhancing, or developing artificial intelligence, machine learning, or similar technologies, regardless of whether these activities generate commercial revenue. | ||
|
||
**Disclaimer of Warranty:** | ||
|
||
The Software is provided "AS IS", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement. | ||
|
||
**Limitation of Liability:** | ||
|
||
In no event shall the author or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort or otherwise, arising from, out of, or in connection with the Software or the use or other dealings in the Software. | ||
|
||
**General Terms:** | ||
|
||
By using the Software, you agree to be bound by the terms of this license. This license is governed by the laws of the jurisdiction in which the Software was obtained. | ||
|
||
|
||
**Contact** | ||
|
||
For questions about licensing or any other inquiries, please contact: | ||
|
||
Stefan Kehayov | ||
|
||
[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Car-Service-History-Project | ||
Car service history project | ||
|
||
Microservices and Angular |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
EN | ||
|
||
It is necessary to create a web application in the language of your choice (there are no requirements in what you have chosen). Coursework is handed in in person on the exam date or during the final exercise. All coursework must be uploaded to the classroom. | ||
|
||
To create an application for keeping car service history. It should contain the following features: | ||
|
||
Add car (name, make, model, year, registration number) | ||
Editing a car | ||
Delete a car. | ||
|
||
For each of the cars added, you should be able to add the following: | ||
|
||
Add an event - (date, kilometers traveled by the car, text, periodic event - yes or no, next date of the event, after how many km. it should happen again) | ||
example: | ||
|
||
Date: 13.09.2022 | ||
Kilometers: 132,234km | ||
Text: Gearbox oil change | ||
Recurring event: yes | ||
Next date: 13.09. 2023 | ||
Next change after: 15,000km | ||
|
||
There also needs to be an option to edit and delete events. | ||
|
||
|
||
A page showing the entire service history of a selected car should also be made. | ||
All data must be recorded in a relational database (of the student's choice). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|
||
docker-compose-*.yml | ||
./docker-compose-*.yml | ||
|
||
HELP.md | ||
target/ | ||
!.mvn/wrapper/maven-wrapper.jar | ||
!**/src/main/**/target/ | ||
!**/src/test/**/target/ | ||
|
||
k8s/mail-send/secret-mail-credentials.yaml | ||
|
||
### STS ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
|
||
### IntelliJ IDEA ### | ||
.idea/* | ||
*.iws | ||
*.iml | ||
*.ipr | ||
.idea | ||
|
||
### NetBeans ### | ||
/nbproject/private/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ | ||
build/ | ||
!**/src/main/**/build/ | ||
!**/src/test/**/build/ | ||
|
||
### VS Code ### | ||
.vscode/ | ||
.code | ||
|
||
*/.idea | ||
*/target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# TO START | ||
- SENDING MAILS: | ||
- PLEASE ENTER YOUR CREDENTIALS IN THE docker-compose.yml in the mail-send-service there is TODO mark for you to add your mail and password |
33 changes: 33 additions & 0 deletions
33
Car-Service-History/car-service-be/auth-service/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
HELP.md | ||
target/ | ||
!.mvn/wrapper/maven-wrapper.jar | ||
!**/src/main/**/target/ | ||
!**/src/test/**/target/ | ||
|
||
### STS ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
|
||
### IntelliJ IDEA ### | ||
.idea/* | ||
*.iws | ||
*.iml | ||
*.ipr | ||
|
||
### NetBeans ### | ||
/nbproject/private/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ | ||
build/ | ||
!**/src/main/**/build/ | ||
!**/src/test/**/build/ | ||
|
||
### VS Code ### | ||
.vscode/ |
Binary file added
BIN
+57.4 KB
Car-Service-History/car-service-be/auth-service/.mvn/wrapper/maven-wrapper.jar
Binary file not shown.
2 changes: 2 additions & 0 deletions
2
Car-Service-History/car-service-be/auth-service/.mvn/wrapper/maven-wrapper.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip | ||
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar |
80 changes: 80 additions & 0 deletions
80
Car-Service-History/car-service-be/auth-service/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
ARG NAME=auth-service-0.0.1-SNAPSHOT.jar | ||
ARG PORT=8086 | ||
|
||
FROM azul/zulu-openjdk-alpine:19-latest as deps | ||
|
||
ARG NAME | ||
|
||
# Identify dependencies | ||
COPY ./target/${NAME} /app/app.jar | ||
RUN mkdir /app/unpacked && \ | ||
cd /app/unpacked && \ | ||
unzip ../app.jar && \ | ||
cd .. && \ | ||
$JAVA_HOME/bin/jdeps \ | ||
--ignore-missing-deps \ | ||
--print-module-deps \ | ||
-q \ | ||
--recursive \ | ||
--multi-release 19 \ | ||
--class-path="./unpacked/BOOT-INF/lib/*" \ | ||
--module-path="./unpacked/BOOT-INF/lib/*" \ | ||
./app.jar > /deps.info | ||
|
||
# ------------------------------------------------------------- | ||
|
||
FROM azul/zulu-openjdk-alpine:19-latest as openjdk | ||
|
||
# required for strip-debug to work | ||
RUN apk add --no-cache binutils | ||
|
||
# copy module dependencies info | ||
COPY --from=deps /deps.info /deps.info | ||
|
||
# Build small JRE image | ||
RUN $JAVA_HOME/bin/jlink \ | ||
--verbose \ | ||
--add-modules $(cat /deps.info) \ | ||
--strip-debug \ | ||
--no-man-pages \ | ||
--no-header-files \ | ||
--compress=2 \ | ||
--output /customjre | ||
|
||
# main app image | ||
FROM alpine:latest | ||
ARG NAME | ||
ARG PORT | ||
|
||
ENV JAVA_HOME=/jre | ||
ENV PATH="${JAVA_HOME}/bin:${PATH}" | ||
|
||
# copy JRE from the base image | ||
COPY --from=openjdk /customjre $JAVA_HOME | ||
|
||
# Add app user | ||
ARG APPLICATION_USER=appuser | ||
RUN adduser --no-create-home -u 1000 -D $APPLICATION_USER | ||
|
||
# Configure working directory | ||
RUN mkdir /app && \ | ||
chown -R $APPLICATION_USER /app | ||
|
||
USER 1000 | ||
COPY --chown=1000:1000 ./target/${NAME} /app/app.jar | ||
WORKDIR /app | ||
|
||
|
||
# "-XX:+UnlockExperimentalVMOptions", "-XX:+UseZGC" makes java use ZGC | ||
# if needed use -Dspring.profiles.active=default \ | ||
# -XX:MinRAMPercentage=60.0 -XX:MaxRAMPercentage=90.0 \ | ||
# -XX:+UnlockExperimentalVMOptions \ | ||
# -XX:+UseZGC" | ||
ENV _JAVA_OPTIONS "-Djava.security.egd=file:/dev/./urandom \ | ||
-Djava.awt.headless=true -Dfile.encoding=UTF-8 \ | ||
-Dspring.output.ansi.enabled=ALWAYS \ | ||
-Djdk.tls.client.protocols=TLSv1.2" | ||
|
||
|
||
EXPOSE ${PORT} | ||
ENTRYPOINT [ "/jre/bin/java", "-Xmx1G", "--enable-preview" ,"-jar", "/app/app.jar" ] |
81 changes: 81 additions & 0 deletions
81
Car-Service-History/car-service-be/auth-service/Dockerfile-custom-installed-jdk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
FROM alpine:latest as deps | ||
|
||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US:en | ||
ENV LC_ALL en_US.UTF-8 | ||
|
||
RUN wget --quiet https://cdn.azul.com/public_keys/[email protected] -P /etc/apk/keys/ && \ | ||
apk --repository https://repos.azul.com/zulu/alpine --no-cache add zulu19-jdk~=19.0.0 tzdata | ||
|
||
ENV JAVA_HOME=/usr/lib/jvm/zulu19-ca | ||
|
||
# Identify dependencies | ||
COPY ./target/auth-service-0.0.1-SNAPSHOT.jar /app/app.jar | ||
RUN mkdir /app/unpacked && \ | ||
cd /app/unpacked && \ | ||
unzip ../app.jar && \ | ||
cd .. && \ | ||
$JAVA_HOME/bin/jdeps \ | ||
--ignore-missing-deps \ | ||
--print-module-deps \ | ||
-q \ | ||
--recursive \ | ||
--multi-release 19 \ | ||
--class-path="./unpacked/BOOT-INF/lib/*" \ | ||
--module-path="./unpacked/BOOT-INF/lib/*" \ | ||
./app.jar > /deps.info | ||
|
||
# ------------------------------------------------------------- | ||
|
||
FROM alpine:latest as openjdk | ||
|
||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US:en | ||
ENV LC_ALL en_US.UTF-8 | ||
|
||
RUN wget --quiet https://cdn.azul.com/public_keys/[email protected] -P /etc/apk/keys/ && \ | ||
apk --repository https://repos.azul.com/zulu/alpine --no-cache add zulu19-jdk~=19.0.0 tzdata | ||
|
||
ENV JAVA_HOME=/usr/lib/jvm/zulu19-ca | ||
|
||
|
||
# required for strip-debug to work | ||
RUN apk add --no-cache binutils | ||
|
||
# copy module dependencies info | ||
COPY --from=deps /deps.info /deps.info | ||
|
||
# Build small JRE image | ||
RUN $JAVA_HOME/bin/jlink \ | ||
--verbose \ | ||
--add-modules $(cat /deps.info) \ | ||
--strip-debug \ | ||
--no-man-pages \ | ||
--no-header-files \ | ||
--compress=2 \ | ||
--output /customjre | ||
|
||
# main app image | ||
FROM alpine:latest | ||
ENV JAVA_HOME=/jre | ||
ENV PATH="${JAVA_HOME}/bin:${PATH}" | ||
|
||
# copy JRE from the base image | ||
COPY --from=openjdk /customjre $JAVA_HOME | ||
|
||
# Add app user | ||
ARG APPLICATION_USER=appuser | ||
RUN adduser --no-create-home -u 1000 -D $APPLICATION_USER | ||
|
||
# Configure working directory | ||
RUN mkdir /app && \ | ||
chown -R $APPLICATION_USER /app | ||
|
||
USER 1000 | ||
# TODO change | ||
COPY --chown=1000:1000 ./target/auth-service-0.0.1-SNAPSHOT.jar /app/app.jar | ||
WORKDIR /app | ||
|
||
# TODO change | ||
EXPOSE 8086 | ||
ENTRYPOINT [ "/jre/bin/java", "-Xmx1G", "--enable-preview" ,"-jar", "/app/app.jar" ] |
Oops, something went wrong.