Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
6533608
Base Configuration
Ben-SS1 Dec 4, 2024
77009d5
feature: Criação da entidade de Autenticação
Ben-SS1 Dec 4, 2024
e72345f
Adição: Arquivo LoginFlowEnum
Ben-SS1 Dec 4, 2024
ba97954
Feature: Exceções personalizadas
Ben-SS1 Dec 4, 2024
fa5ee97
Adição: Entidades (Models e Repositories)
Ben-SS1 Dec 4, 2024
3846c2a
Inicio das configurações principais do micro serviço
Ben-SS1 Dec 4, 2024
b7bc223
Ajustes: Adição de dependencias no pom.xml, ajustes no aplication pro…
Ben-SS1 Dec 4, 2024
2debaf3
Ajuste no Security Filter, Token Service e Authentication controller.
Ben-SS1 Dec 6, 2024
a64cb64
Ajuste no application.properties
CarlosfcPinheiro Dec 7, 2024
65d71a8
Adicionar controller RedisTestController para testar conexão com o re…
CarlosfcPinheiro Dec 7, 2024
d29428c
Configuração dos metodos do Redis, ajuste no metodo logout e no Token…
Ben-SS1 Dec 8, 2024
cfb7187
Ajuste no application.properties:
CarlosfcPinheiro Dec 8, 2024
3c7ac95
Ajuste no endpoint /session e /logout na classe AuthenticationControl…
CarlosfcPinheiro Dec 8, 2024
daba481
Alterações na classe SecurityFilter:
CarlosfcPinheiro Dec 8, 2024
9362dda
Alterações no método verifySession:
CarlosfcPinheiro Dec 8, 2024
746c1df
Mudança nos imports da classe AuthenticationService:
CarlosfcPinheiro Dec 8, 2024
3bd74ce
Adicionar classe de configuração do Redis:
CarlosfcPinheiro Dec 8, 2024
60d36ed
Ajustes:
CarlosfcPinheiro Dec 8, 2024
d7c8d9c
Criação do arquivo dev.yml para o processo de deploy do micro serviço
CarlosfcPinheiro Dec 8, 2024
9a52bae
Reajuste nas classes SecurityFilter e TokenService
CarlosfcPinheiro Dec 8, 2024
3bcc077
Merge pull request #1 from Pronto-Recife/redis
CarlosfcPinheiro Dec 8, 2024
3722b6c
Ajuste nos imports e exports
CarlosfcPinheiro Dec 9, 2024
b52adc1
Merge branch 'redis' into Develop
CarlosfcPinheiro Dec 9, 2024
77515ed
Atualização nos models e no aplication.properties
Ben-SS1 Dec 10, 2024
30d93c4
Ajuste no aplication.properties
Ben-SS1 Dec 10, 2024
302fb6c
Implementação do Web configuration
Ben-SS1 Dec 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/mvnw text eol=lf
*.cmd text eol=crlf
26 changes: 26 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Deploy in Railway -> Dev

on:
push:
branches:
- Develop

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v2

- name: Install curl
run: |
sudo apt-get update && sudo apt-get install -y curl

- name: Install Railway CLI
run: |
curl -fsSL https://railway.app/install.sh | sh

- name: Deploy to Railway
run: |
RAILWAY_TOKEN=${{ secrets.RAILWAY_TOKEN }} railway up --service=prontorecife_auth --environment dev --verbose
33 changes: 33 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### VS Code ###
.vscode/
19 changes: 19 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
wrapperVersion=3.3.2
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM maven:3.9.8-amazoncorretto-21 AS build
WORKDIR /app
COPY . .

RUN mvn clean package -DskipTests -Dmaven.resources.encoding=UTF-8

FROM openjdk:21-jdk
WORKDIR /app

EXPOSE 8080

COPY --from=build /app/target/auth-0.0.1-SNAPSHOT.jar app.jar
ENTRYPOINT ["java", "-jar", "app.jar"]
46 changes: 46 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
services:
mysql:
image: mysql:8.0.40-debian
container_name: mysql
environment:
MYSQL_DATABASE: prontorecife
MYSQL_USER: root
MYSQL_PASSWORD: root
MYSQL_ROOT_PASSWORD: root
ports:
- "3307:3306"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-proot"]
interval: 10s
retries: 5
start_period: 30s
timeout: 10s

app:
depends_on:
mysql:
condition: service_healthy
build: .
container_name: prontorecife_app
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://mysql:3306/prontorecife
SPRING_DATASOURCE_USERNAME: root
SPRING_DATASOURCE_PASSWORD: root
ports:
- "8081:8080"

flyway:
image: flyway/flyway:8.5.11
depends_on:
mysql:
condition: service_healthy
container_name: flyway
restart: always # Adicionado
environment:
FLYWAY_URL: jdbc:mysql://mysql:3306/prontorecife?allowPublicKeyRetrieval=true&useSSL=false
FLYWAY_USER: root
FLYWAY_PASSWORD: root
FLYWAY_SCHEMAS: prontorecife
volumes:
- ./flyway:/flyway/sql
command: -connectRetries=10 migrate
Loading