File tree Expand file tree Collapse file tree 6 files changed +43
-39
lines changed Expand file tree Collapse file tree 6 files changed +43
-39
lines changed Original file line number Diff line number Diff line change 11SERVER_PORT = 8080
22
33MYSQL_ROOT_PASSWORD = T4cwGK3q5NdR3vMz
4- MYSQL_DATABASE = vscode4teach
4+ MYSQL_DATABASE = vscode4teaching
55
6- SPRING_DATASOURCE_USERNAME = vscode4teach
6+ SPRING_DATASOURCE_USERNAME = vscode4teaching
77SPRING_DATASOURCE_PASSWORD = AvScnGQp5e4GHnd
8- SPRING_DATASOURCE_URL = jdbc:mysql://db/vscode4teach ?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
8+ SPRING_DATASOURCE_URL = jdbc:mysql://db/vscode4teaching ?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
99
10- JWT_SECRET = vscode4teaching
10+ JWT_SECRET = cUYw1eSNM6eyhcY2pg6G6Hvf5gHkhdEFr76bbP89dld6qdjfAktQNGqIE4fvKH8kHvf5gHkhdEFr76bbHvf5gHkhdEFr76bb
1111
1212V4T_FILEDIRECTORY = /app/v4t_courses
1313
Original file line number Diff line number Diff line change 11# VSCode4Teaching
22** Developer documentation on the Continuous Integration, Delivery and Deployment (* CI/CD* ) system of this project**
33
4- This project is configured with a continuous integration, deployment and delivery system through [ GitHub Actions] ( https://github.com/features/actions ) . This system includes a single workflow that comprises both server and web application ([ ` server. ci.yml` ] ( server. ci.yml) ).
4+ This project is configured with a continuous integration, deployment and delivery system through [ GitHub Actions] ( https://github.com/features/actions ) . This system includes a single workflow that comprises both server and web application ([ ` ci.yml ` ] ( ci.yml ) ).
55
66### Detailed description of declared jobs
77The aforementioned files define the jobs that will be executed sequentially based on the type of changes registered in the repository. These jobs are:
Original file line number Diff line number Diff line change 1- name : " Server pipeline"
1+ name : " VSCode4Teaching pipeline"
22
33on :
44 push :
@@ -17,14 +17,14 @@ jobs:
1717 runs-on : ubuntu-latest
1818 defaults :
1919 run :
20- working-directory : ./vscode4teaching-server
20+ working-directory : ./backend
2121 steps :
2222 - name : Checkout repository
2323 uses : actions/checkout@v4
2424 - name : Set up Java version
2525 uses : actions/setup-java@v4
2626 with :
27- java-version : 11
27+ java-version : 21
2828 distribution : temurin
2929 - name : Test
3030 run : ./mvnw clean dependency:resolve test
4141 run : |
4242 VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
4343 echo VERSION=$VERSION >> $GITHUB_ENV
44- working-directory : ./vscode4teaching-server
44+ working-directory : ./backend
4545 - name : Build Docker image
4646 run : |
4747 env | grep DOCKER
Original file line number Diff line number Diff line change 11# Step 1: Compilation of Angular frontend
22# It will be embedded as a static resource into Spring Boot backend
3- FROM node:18 AS angular
4- COPY vscode4teaching-webapp /usr/src/app
3+ FROM node:22 AS angular
4+ COPY frontend /usr/src/app
55WORKDIR /usr/src/app
66RUN ["npm" , "install" ]
77RUN ["npm" , "run" , "build" ]
88
99# Step 2: Compilation of Maven project (generation of JAR)
10- FROM maven:3.9.7 -eclipse-temurin-11 AS builder
11- COPY vscode4teaching-server /data
12- COPY --from=angular /usr/src/app/dist/vscode4teaching /data/src/main/resources/static/
10+ FROM maven:3.9.9 -eclipse-temurin-21 AS builder
11+ COPY backend /data
12+ COPY --from=angular /usr/src/app/dist/vscode4teaching/browser /data/src/main/resources/static/
1313WORKDIR /data
1414RUN ["mvn" , "clean" , "package" ]
1515
1616# Step 3: Generation of Docker image using the JAR previously built
17- FROM eclipse-temurin:11
18- COPY --from=builder /data/target/vscode4teaching-server- *.jar ./app/vscode4teaching-server.jar
17+ FROM eclipse-temurin:21.0.5_11-jre
18+ COPY --from=builder /data/target/vscode4teaching-*.jar ./app/vscode4teaching-server.jar
1919EXPOSE 8080
2020ENTRYPOINT [ "java" , "-jar" , "./app/vscode4teaching-server.jar" ]
Original file line number Diff line number Diff line change 55 <parent >
66 <groupId >org.springframework.boot</groupId >
77 <artifactId >spring-boot-starter-parent</artifactId >
8- <version >3.4.0 </version >
8+ <version >3.4.1 </version >
99 <relativePath />
1010 </parent >
1111
Original file line number Diff line number Diff line change 11name : vscode4teaching
22
33services :
4- app :
5- image : vscode4teaching/vscode4teaching:2.2.1
6- depends_on :
7- - db
8- env_file :
9- - path : .env
10- required : true
11- ports :
12- - ${SERVER_PORT}:${SERVER_PORT}
13- volumes :
14- - ./volume-v4t:${V4T_FILEDIRECTORY}
15- restart : on-failure:6
16- db :
17- image : mysql:8.4.0
18- restart : on-failure:3
19- environment :
20- MYSQL_ROOT_PASSWORD : ${MYSQL_ROOT_PASSWORD}
21- MYSQL_DATABASE : ${MYSQL_DATABASE}
22- MYSQL_USER : ${SPRING_DATASOURCE_USERNAME}
23- MYSQL_PASSWORD : ${SPRING_DATASOURCE_PASSWORD}
24- volumes :
25- - ./volume-mysql:/var/lib/mysql
4+ app :
5+ image : vscode4teaching/vscode4teaching:3.0.0
6+ depends_on :
7+ - db
8+ env_file :
9+ - path : .env
10+ required : true
11+ ports :
12+ - ${SERVER_PORT}:${SERVER_PORT}
13+ volumes :
14+ - vscode4teaching-courses:${V4T_FILEDIRECTORY}
15+ restart : on-failure:6
16+ db :
17+ image : mysql:9.1.0
18+ restart : on-failure:3
19+ environment :
20+ MYSQL_ROOT_PASSWORD : ${MYSQL_ROOT_PASSWORD}
21+ MYSQL_DATABASE : ${MYSQL_DATABASE}
22+ MYSQL_USER : ${SPRING_DATASOURCE_USERNAME}
23+ MYSQL_PASSWORD : ${SPRING_DATASOURCE_PASSWORD}
24+ volumes :
25+ - vscode4teaching-db:/var/lib/mysql
26+
27+ volumes :
28+ vscode4teaching-courses :
29+ vscode4teaching-db :
You can’t perform that action at this time.
0 commit comments