Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM eclipse-temurin:25-jre AS build
WORKDIR /app
COPY .mvn .mvn
COPY mvnw pom.xml ./
RUN ./mvnw dependency:go-offline -q
COPY src ./src
RUN ./mvnw package -DskipTests -q

FROM eclipse-temurin:25-jre
WORKDIR /app
COPY --from=build /app/target/*.jar app.jar
ENTRYPOINT ["java", "-jar", "app.jar"]
14 changes: 7 additions & 7 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@ spring.datasource.url=jdbc:postgresql://localhost:5432/arende
spring.datasource.username=arende
spring.datasource.password=arende

spring.jpa.hibernate.ddl-auto=create-drop
spring.jpa.hibernate.ddl-auto=update
spring.jpa.open-in-view=false
spring.sql.init.mode=always
spring.jpa.defer-datasource-initialization=true
spring.datasource.driver-class-name=org.postgresql.Driver
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect

# GitHub OAuth2 Login(hide credentials in production)
spring.security.oauth2.client.registration.github.client-id=Ov23liH2WD75Mu6yIMRq
spring.security.oauth2.client.registration.github.client-secret=63c07ed3f40021ed9a877c06ca09be0a6ef55883
spring.security.oauth2.client.registration.github.client-id=${GITHUB_CLIENT_ID}
spring.security.oauth2.client.registration.github.client-secret=${GITHUB_CLIENT_SECRET}
spring.security.oauth2.client.registration.github.scope=read:user,user:email
logging.level.org.springframework.security=INFO

# AWS S3 Configuration
spring.cloud.aws.s3.endpoint=http://localhost:9000
# Cloudflare R2 Configuration
spring.cloud.aws.s3.endpoint=${S3_ENDPOINT:http://localhost:9000}
spring.cloud.aws.credentials.access-key=${S3_ACCESS_KEY}
spring.cloud.aws.credentials.secret-key=${S3_SECRET_KEY}
spring.cloud.aws.region.static=us-east-1
spring.cloud.aws.region.static=${S3_REGION:auto}
spring.cloud.aws.s3.path-style-access-enabled=true
app.s3.bucket=documents
app.s3.bucket=${S3_BUCKET:documents}

# Multipart configuration
spring.servlet.multipart.max-file-size=10MB
Expand Down