Skip to content

Commit

Permalink
prepared the project for keycloak integration
Browse files Browse the repository at this point in the history
  • Loading branch information
numan947 committed Sep 20, 2024
1 parent 7c3b1f6 commit 28d66fd
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pipeline-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,6 @@ jobs:
platforms: linux/amd64
tags: ${{ secrets.DOCKERHUB_USERNAME }}/rent-a-tool-backend:${{ steps.extract_version.outputs.VERSION }},${{ secrets.DOCKERHUB_USERNAME }}/rent-a-tool-backend:latest
build-args: |
PROFILE=dev
PROFILE=prod
APP_VERSION=${{ steps.extract_version.outputs.VERSION }}
2 changes: 1 addition & 1 deletion docker/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN mvn clean package -DskipTests

# Runtime stage
FROM amazoncorretto:22.0.2-alpine3.20
ARG PROFILE=dev
ARG PROFILE=prod
ARG APP_VERSION=1.0.0

WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion rent-a-tool/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>
<groupId>com.numan947</groupId>
<artifactId>rent-a-tool</artifactId>
<version>1.0.0</version>
<version>1.1.0</version>
<name>rent-a-tool-api</name>
<description>The backend of a full-stack application that allows users to manage their tool collections and engage with a community of DIY enthusiasts and professionals.</description>
<url/>
Expand Down
8 changes: 4 additions & 4 deletions rent-a-tool/src/main/resources/application-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ spring:
database-platform: org.hibernate.dialect.PostgreSQLDialect

mail:
host: ${EMAIL_HOST_NAME}
port: 465
username: ${EMAIL_USER_NAME}
password: ${EMAIL_PASSWORD}
host: localhost
port: 1025
username: user
password: password
properties:
mail:
smtp:
Expand Down
50 changes: 50 additions & 0 deletions rent-a-tool/src/main/resources/application-prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
spring:
datasource:
url: jdbc:postgresql://localhost:5432/rent_a_tool_db
username: postgres
password: postgres
driver-class-name: org.postgresql.Driver
jpa:
hibernate:
ddl-auto: update
show-sql: false
properties:
hibernate:
format_sql: true
database: postgresql
database-platform: org.hibernate.dialect.PostgreSQLDialect

mail:
host: ${EMAIL_HOST_NAME}
port: 465
username: ${EMAIL_USER_NAME}
password: ${EMAIL_PASSWORD}
properties:
mail:
smtp:
auth: true
ssl:
enable: true
trust: "*"
starttls:
enable: true

application:
file:
uploads:
photos-directory: ./uploads
security:
jwt:
secret-key: 63FDD813AA2A9922746B3EA81DCC1ABCDEFFEDCBA99999FFFDDDEEFF9999FFDDABCDEF
expiration: 86400000
mailing:
frontend:
activation-url: http://localhost:4200/activate-account
activation-code-length: 6 # in characters
activation-code-expiration: 15 # in minutes
activation-code-characters: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
activation-code-subject: Activate your account
cors:
origins: http://localhost:4200,http://localhost:8080
server:
port: 9999

0 comments on commit 28d66fd

Please sign in to comment.