File tree Expand file tree Collapse file tree 3 files changed +32
-3
lines changed
Expand file tree Collapse file tree 3 files changed +32
-3
lines changed Original file line number Diff line number Diff line change 1+ FROM maven:3.8.3-jdk-11 AS maven_build
2+ WORKDIR /tmp
3+ COPY pom.xml .
4+ COPY src/ ./src/
5+ RUN mvn package -Dmaven.test.skip=true
6+
7+ FROM openjdk:11
8+ COPY --from=maven_build /tmp/target/easy-notes-1.0.0.jar /data/easy-notes-1.0.0.jar
9+ EXPOSE 8080
10+ CMD java -jar /data/easy-notes-1.0.0.jar
Original file line number Diff line number Diff line change 1+ version : " 3"
2+ services :
3+ app :
4+ image : spring-boot:latest
5+ restart : always
6+ ports :
7+ - 8080:8080
8+ depends_on :
9+ - db
10+ db :
11+ image : mysql
12+ restart : always
13+ expose :
14+ - 3306
15+ environment :
16+ - MYSQL_ROOT_PASSWORD=supersecretpassword
17+ - MYSQL_DATABASE=notes_app
18+ - MYSQL_USER=app
19+ - MYSQL_PASSWORD=secretpassword
Original file line number Diff line number Diff line change 11# # Spring DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
2- spring.datasource.url = jdbc:mysql://localhost :3306/notes_app?useSSL=false&serverTimezone=UTC&useLegacyDatetimeCode=false
3- spring.datasource.username = root
4- spring.datasource.password = callicoder
2+ spring.datasource.url = jdbc:mysql://db :3306/notes_app?useSSL=false&serverTimezone=UTC&useLegacyDatetimeCode=false
3+ spring.datasource.username = app
4+ spring.datasource.password = secretpassword
55
66
77# # Hibernate Properties
You can’t perform that action at this time.
0 commit comments