Commit 8eac02d4 authored by RenanMontenegro3's avatar RenanMontenegro3

feat: "adiciona docker-compose.yml e configuração .env para MySQL e Spring Boot"

parent 5330f168
DB_DRIVER_CLASS_NAME="com.mysql.cj.jdbc.Driver"
DB_PLATFORM="org.hibernate.dialect.MySQL8Dialect"
DB_PLATFORM="org.hibernate.dialect.MySQLDialect"
DB_URL="jdbc:mysql://localhost:3306/porto10?createDatabaseIfNotExist=true&serverTimezone=UTC"
DB_USERNAME="root"
DB_PASSWORD="root"
DB_URL_DOCKER="jdbc:mysql://host.docker.internal:3306/porto?createDatabaseIfNotExist=true&serverTimezone=UTC"
DB_URL_DOCKER="jdbc:mysql://mysql:3306/porto10?createDatabaseIfNotExist=true&serverTimezone=UTC"
SPRING_SERVLET_MULTIPART_MAX_FILE_SIZE="2GB"
SPRING_SERVLET_MULTIPART_MAX_REQUEST_SIZE="2GB"
......@@ -31,3 +31,5 @@ JWT_REFRESH_EXPIRES_IN="7200"
DISCO_RAIZ=C:\\fotos-java
DISCO_DIRETORIO_FOTOS=contato-disco
SPRINGDOC_SWAGGER_UI_PATH=/swagger-ui-custom.html
SPRINGDOC_SWAGGER_UI_OPERATIONSSORTER=method
version: '3.8'
services:
mysql:
image: mysql:8.0
container_name: mysql-db
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: porto10
ports:
- "3307:3306"
volumes:
- mysql_data:/var/lib/mysql
app:
build: .
container_name: spring-app
ports:
- "8080:8080"
depends_on:
- mysql
environment:
SPRING_DATASOURCE_URL: ${DB_URL_DOCKER}
SPRING_DATASOURCE_USERNAME: ${DB_USERNAME}
SPRING_DATASOURCE_PASSWORD: ${DB_PASSWORD}
DB_DRIVER_CLASS_NAME: com.mysql.cj.jdbc.Driver
SPRING_JPA_HIBERNATE_DDL_AUTO: update
SPRING_JPA_SHOW_SQL: true
volumes:
mysql_data:
......@@ -61,7 +61,8 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
<version>1.18.38</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
......
......@@ -8,6 +8,5 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
public class TwjobsApplication {
public static void main(String[] args) {
SpringApplication.run(TwjobsApplication.class, args);
}
}
......@@ -23,10 +23,10 @@ spring.data.web.pageable.one-indexed-parameters=${PAGEABLE_ONE_INDEXED_PARAMETER
spring.data.web.pageable.default-page-size=${PAGEABLE_DEFAULT_PAGE_SIZE}
spring.data.web.pageable.max-page-size=${PAGEABLE_MAX_PAGE_SIZE}
jwt.access.secret=${JWT_ACCESS_SECRET}
jwt.access.expires-in=${JWT_ACCESS_EXPIRES_IN}
jwt.refresh.secret=${JWT_REFRESH_SECRET}
jwt.refresh.expires-in=${JWT_REFRESH_EXPIRES_IN}
br.com.treinaweb.twjobs.jwt.accessSecret=${JWT_ACCESS_SECRET}
br.com.treinaweb.twjobs.jwt.accessExpiresIn=${JWT_ACCESS_EXPIRES_IN}
br.com.treinaweb.twjobs.jwt.refreshSecret=${JWT_REFRESH_SECRET}
br.com.treinaweb.twjobs.jwt.refreshExpiresIn=${JWT_REFRESH_EXPIRES_IN}
contato.disco.raiz = ${DISCO_RAIZ}
contato.disco.diretorio-fotos = ${DISCO_DIRETORIO_FOTOS}
......
DB_DRIVER_CLASS_NAME="com.mysql.cj.jdbc.Driver"
DB_PLATFORM="org.hibernate.dialect.MySQL8Dialect"
DB_PLATFORM="org.hibernate.dialect.MySQLDialect"
DB_URL="jdbc:mysql://localhost:3306/porto10?createDatabaseIfNotExist=true&serverTimezone=UTC"
DB_USERNAME="root"
DB_PASSWORD="root"
DB_URL_DOCKER="jdbc:mysql://host.docker.internal:3306/porto?createDatabaseIfNotExist=true&serverTimezone=UTC"
DB_URL_DOCKER="jdbc:mysql://mysql:3306/porto10?createDatabaseIfNotExist=true&serverTimezone=UTC"
SPRING_SERVLET_MULTIPART_MAX_FILE_SIZE="2GB"
SPRING_SERVLET_MULTIPART_MAX_REQUEST_SIZE="2GB"
......@@ -31,3 +31,5 @@ JWT_REFRESH_EXPIRES_IN="7200"
DISCO_RAIZ=C:\\fotos-java
DISCO_DIRETORIO_FOTOS=contato-disco
SPRINGDOC_SWAGGER_UI_PATH=/swagger-ui-custom.html
SPRINGDOC_SWAGGER_UI_OPERATIONSSORTER=method
......@@ -23,10 +23,10 @@ spring.data.web.pageable.one-indexed-parameters=${PAGEABLE_ONE_INDEXED_PARAMETER
spring.data.web.pageable.default-page-size=${PAGEABLE_DEFAULT_PAGE_SIZE}
spring.data.web.pageable.max-page-size=${PAGEABLE_MAX_PAGE_SIZE}
jwt.access.secret=${JWT_ACCESS_SECRET}
jwt.access.expires-in=${JWT_ACCESS_EXPIRES_IN}
jwt.refresh.secret=${JWT_REFRESH_SECRET}
jwt.refresh.expires-in=${JWT_REFRESH_EXPIRES_IN}
br.com.treinaweb.twjobs.jwt.accessSecret=${JWT_ACCESS_SECRET}
br.com.treinaweb.twjobs.jwt.accessExpiresIn=${JWT_ACCESS_EXPIRES_IN}
br.com.treinaweb.twjobs.jwt.refreshSecret=${JWT_REFRESH_SECRET}
br.com.treinaweb.twjobs.jwt.refreshExpiresIn=${JWT_REFRESH_EXPIRES_IN}
contato.disco.raiz = ${DISCO_RAIZ}
contato.disco.diretorio-fotos = ${DISCO_DIRETORIO_FOTOS}
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment