File tree Expand file tree Collapse file tree 5 files changed +31
-5
lines changed Expand file tree Collapse file tree 5 files changed +31
-5
lines changed Original file line number Diff line number Diff line change 11.volumes /
2- target /
32.git
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ services:
33
44 mariadb :
55 image : mariadb:10.6.1
6- network_mode : host
6+ container_name : mariadb-container
77 restart : always
88 ports :
99 - 3306:3306
@@ -13,3 +13,17 @@ services:
1313 volumes :
1414 - ./.volumes/database:/var/lib/mysql
1515
16+ api :
17+ build : ./
18+ links :
19+ - mariadb
20+ depends_on :
21+ - mariadb
22+ restart : always
23+ ports :
24+ - 8080:8080
25+ environment :
26+ DB_URL : " mariadb:3306/common_app"
27+ DB_USERNAME : " root"
28+ DB_PASSWORD : " root"
29+
Original file line number Diff line number Diff line change 1+ FROM openjdk:16
2+
3+ WORKDIR /app
4+
5+ COPY /target/api-3.0.0.jar /app/app.jar
6+
7+ ENTRYPOINT [ "java", "-jar", "app.jar" ]
Original file line number Diff line number Diff line change 165165 <plugin >
166166 <groupId >org.springframework.boot</groupId >
167167 <artifactId >spring-boot-maven-plugin</artifactId >
168+ <configuration >
169+ <excludeDevtools >false</excludeDevtools >
170+ </configuration >
168171 <executions >
169172 <execution >
170173 <goals >
Original file line number Diff line number Diff line change @@ -13,9 +13,9 @@ spring.jpa.show-sql=${show-sql:true}
1313
1414# Banco de dados
1515spring.datasource.hikari.maximum-pool-size =${max-connections:5}
16- spring.datasource.url =jdbc:mysql://${db-url :localhost:3306/common_app}?useSSL=false&createDatabaseIfNotExist=true&serverTimezone=America/Sao_Paulo
17- spring.datasource.username =${db-username :root}
18- spring.datasource.password =${db-password :root}
16+ spring.datasource.url =jdbc:mysql://${DB_URL :localhost:3306/common_app}?useSSL=false&createDatabaseIfNotExist=true&serverTimezone=America/Sao_Paulo
17+ spring.datasource.username =${DB_USERNAME :root}
18+ spring.datasource.password =${DB_PASSWORD :root}
1919spring.jpa.hibernate.ddl-auto =none
2020spring.jpa.properties.hibernate.dialect =org.hibernate.dialect.MySQL5Dialect
2121spring.jpa.properties.javax.persistence.validation.mode =none
@@ -46,3 +46,6 @@ spring.mail.properties.mail.smtp.starttls.enable=true
4646# templates
4747spring.resources.cache.period =0
4848
49+ # dev tools config
50+ spring.devtools.remote.secret =4ajG2rD
51+
You can’t perform that action at this time.
0 commit comments