Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 22 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1 +1,22 @@
REDIS_URL=rediss://default:SENHA@SEU-HOST-UPSTASH:6379
DB_URL=
DB_USERNAME=
DB_PASSWORD=
DB_NAME=
DB_PORT=
DB_SSLMODE=

CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
CLOUDINARY_FOLDER_PREFIX=solier

# URL do OpenTelemetry Collector
# dev local -> kubectl port-forward svc/otel-collector 4318:4318 e usar http://localhost:4318
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
# Identidade do servico no backend de observabilidade
SERVICE_VERSION=dev
DEPLOYMENT_ENVIRONMENT=local
# taxa de requests normais irem para o collector | padrão em 100% pois collectoe abrange essa funcionalidade
OTEL_TRACES_SAMPLING_PROBABILITY=1.0
REDIS_URL=rediss://default:SENHA@SEU-HOST-UPSTASH:6379
GOOGLE_TRANSLATE_API_KEY=SUA-CHAVE-DA-GOOGLE-TRANSLATE-API
13 changes: 13 additions & 0 deletions .github/workflows/qa-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Sync main <> QA

on:
push:
branches:
- main

jobs:
sync:
permissions:
contents: write
pull-requests: write
uses: Solierrr/.github/.github/workflows/qa-sync.yml@main
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Release

on:
workflow_dispatch:
push:
branches:
- main

jobs:
release:
runs-on: ubuntu-latest

steps:
- run: echo "Release ainda não configurada."
uses: Solierrr/.github/.github/workflows/docker-publish.yml@main
secrets: inherit
13 changes: 13 additions & 0 deletions .github/workflows/repo-cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Cleanup branches

on:
push:
branches:
- main

jobs:
cleanup:
permissions:
contents: write
pull-requests: read
uses: Solierrr/.github/.github/workflows/repo-cleanup.yml@main
217 changes: 110 additions & 107 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,107 +1,110 @@
# Environment variables / secrets
.env
.env.*
!.env.example

# VS Code
.vscode/
!.vscode/settings.json
!.vscode/extensions.json

# JetBrains
.idea/
*.iml
*.iws
*.ipr

# Eclipse
.classpath
.project
.settings/
.factorypath

# NetBeans
/nbproject/private/
/nbbuild/
/dist/
/.nb-gradle/

# Visual Studio
.vs/
*.user
*.userosscache
*.suo
*.userprefs

# Visual Studio Code / Cursor
.cursor/

# Claude Code
.claude/

# Fleet
.fleet/

# Sublime Text
*.sublime-workspace
*.sublime-project

# Vim
*.swp
*.swo
*~

# Emacs
*~
\#*\#

# macOS
.DS_Store

# Windows
Thumbs.db
Desktop.ini

# Linux
.directory

# Compiled class files / packages
*.class
*.jar
*.war
*.nar
*.ear

# Maven
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/wrapper/maven-wrapper.jar
.mvn/timing.properties

# Gradle
.gradle/
!gradle/wrapper/gradle-wrapper.jar
!gradle/wrapper/gradle-wrapper.properties

# Kotlin
.kotlin/

# Logs / crash dumps
*.log
hs_err_pid*
replay_pid*

# HELP.md (gerado pelo Spring Initializr)
HELP.md

# Project-specific: keep generated sources tracked under src/main and src/test
!**/src/main/**/target/
!**/src/test/**/target/
!**/src/main/**/build/
!**/src/test/**/build/
# Environment variables / secrets
.env
.env.*
!.env.example

# VS Code
.vscode/
!.vscode/settings.json
!.vscode/extensions.json

# JetBrains
.idea/
*.iml
*.iws
*.ipr

# Eclipse
.classpath
.project
.settings/
.factorypath

# NetBeans
/nbproject/private/
/nbbuild/
/dist/
/.nb-gradle/

# Visual Studio
.vs/
*.user
*.userosscache
*.suo
*.userprefs

# Visual Studio Code / Cursor
.cursor/

# SonarQube
.sonar/

# Claude Code
.claude/

# Fleet
.fleet/

# Sublime Text
*.sublime-workspace
*.sublime-project

# Vim
*.swp
*.swo
*~

# Emacs
*~
\#*\#

# macOS
.DS_Store

# Windows
Thumbs.db
Desktop.ini

# Linux
.directory

# Compiled class files / packages
*.class
*.jar
*.war
*.nar
*.ear

# Maven
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/wrapper/maven-wrapper.jar
.mvn/timing.properties

# Gradle
.gradle/
!gradle/wrapper/gradle-wrapper.jar
!gradle/wrapper/gradle-wrapper.properties

# Kotlin
.kotlin/

# Logs / crash dumps
*.log
hs_err_pid*
replay_pid*

# HELP.md (gerado pelo Spring Initializr)
HELP.md

# Project-specific: keep generated sources tracked under src/main and src/test
!**/src/main/**/target/
!**/src/test/**/target/
!**/src/main/**/build/
!**/src/test/**/build/
48 changes: 29 additions & 19 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.solaria</groupId>
<artifactId>persistence</artifactId>
<artifactId>core</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>persistence</name>
<name>core</name>
<description/>
<url/>
<licenses>
Expand All @@ -34,6 +34,11 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
Expand All @@ -54,23 +59,6 @@
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-oauth2-jose</artifactId>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
<version>0.11.5</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<version>0.11.5</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId>
<version>0.11.5</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
Expand All @@ -90,6 +78,28 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>com.cloudinary</groupId>
<artifactId>cloudinary-http5</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-opentelemetry</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-logback-appender-1.0</artifactId>
<version>2.21.0-alpha</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webmvc-test</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.solaria.persistence.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;

@Configuration
@EnableAsync
public class AsyncConfig {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.solaria.persistence.config;

import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.cloudinary.Cloudinary;
import com.cloudinary.utils.ObjectUtils;

@Configuration
@EnableConfigurationProperties(CloudinaryProperties.class)
public class CloudinaryConfig {

@Bean
public Cloudinary cloudinary(CloudinaryProperties properties) {
return new Cloudinary(ObjectUtils.asMap(
"cloud_name", properties.getCloudName(),
"api_key", properties.getApiKey(),
"api_secret", properties.getApiSecret(),
"secure", true));
}
}
Loading
Loading