File tree Expand file tree Collapse file tree 3 files changed +36
-2
lines changed
Expand file tree Collapse file tree 3 files changed +36
-2
lines changed Original file line number Diff line number Diff line change 1+ FROM openjdk:11-jre-slim
2+ VOLUME /tmp
3+ ARG JAR_FILE=target/*.jar
4+ COPY ${JAR_FILE} app.jar
5+ ENTRYPOINT ["java" ,"-jar" ,"/app.jar" ]
Original file line number Diff line number Diff line change 1+ version : ' 3'
2+ services :
3+ mysql :
4+ image : mysql
5+ restart : always
6+ environment :
7+ MYSQL_DATABASE : ' blogapi'
8+ MYSQL_USER : ' root'
9+ MYSQL_PASSWORD : ' root'
10+ MYSQL_ROOT_PASSWORD : ' root'
11+ ports :
12+ - ' 3306'
13+ networks :
14+ - production-network
15+ application :
16+ build :
17+ dockerfile : ./Dockerfile
18+ context : .
19+ image : michel-eckhardt/spring-boot-blog
20+ container_name : spring-boot-blog
21+ ports :
22+ - " 8080:8080"
23+ networks :
24+ - production-network
25+ depends_on :
26+ - " mysql"
27+ networks :
28+ production-network :
29+ driver : bridge
Original file line number Diff line number Diff line change 11spring.jpa.hibernate.ddl-auto = none
22spring.datasource.url = jdbc:mysql://localhost:3306/blogapi?useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
3- spring.datasource.username = admin
4- spring.datasource.password = password
3+ spring.datasource.username = root
4+ spring.datasource.password = root
55
66spring.jpa.show-sql = true
77
You can’t perform that action at this time.
0 commit comments