Skip to content

Jacquline-Parser-Solution #319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ build-iPhoneSimulator/

# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc
.DS_Store
.DS_Store
6 changes: 6 additions & 0 deletions Kotlin-Project/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.gradle
build
.idea
.git
gradlew
Kotlin-Project/gradle
50 changes: 50 additions & 0 deletions Kotlin-Project/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Gradle
.gradle/
build/
out/

# Kotlin specific
*.kotlin_modules
*.kotlin_bin/
*.idea/

# IntelliJ IDEA
Kotlin-Project/.idea/
*.iml

# Build directory
/build/
# Gradle Wrapper files
.gradle/

# Log files
*.log

# IntelliJ IDEA project files
*.ipr
*.iws
Kotlin-Project/.idea/

# OS-specific files
.DS_Store
Thumbs.db

# Windows Installer files
ehthumbs.db

# macOS Finder directory settings
.AppleDouble
.LSOverride

# Spring Boot
spring.log

# Generated files
*.jar
*.war
*.ear

# Other generated files
*.class
*.war
*.ear
29 changes: 29 additions & 0 deletions Kotlin-Project/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM eclipse-temurin:17-jdk

# Set the working directory inside the container
WORKDIR /app

# Copy the Gradle wrapper
COPY gradlew .
COPY gradle ./gradle

# Make the Gradle wrapper executable
RUN chmod +x ./gradlew

# Copy only the build files initially to leverage Docker layer caching
COPY build.gradle settings.gradle ./

# Resolve dependencies and download them (this can take time)
RUN ./gradlew dependencies --stacktrace

# Copy the application source code
COPY ../src ./src

# Build the application
RUN ./gradlew bootJar

# Specify the application to run
ENTRYPOINT ["java", "-jar", "/app/build/libs/van-gough-0.0.1-SNAPSHOT.jar"]

# Expose the port your Spring Boot application runs on (default is 8080)
EXPOSE 8080
41 changes: 41 additions & 0 deletions Kotlin-Project/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.9.25'
id 'org.jetbrains.kotlin.plugin.spring' version '1.9.25'
id 'org.springframework.boot' version '3.4.4'
id 'io.spring.dependency-management' version '1.1.7'
}

group = 'com.example'
version = '0.0.1-SNAPSHOT'

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

repositories {
mavenCentral()
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'com.fasterxml.jackson.module:jackson-module-kotlin'
implementation 'org.jetbrains.kotlin:kotlin-reflect'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit5'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
implementation("org.seleniumhq.selenium:selenium-java:4.20.0")
testImplementation("org.mockito.kotlin:mockito-kotlin:5.2.1")
}

kotlin {
compilerOptions {
freeCompilerArgs.addAll '-Xjsr305=strict'
}
}

tasks.named('test') {
useJUnitPlatform()
}
9 changes: 9 additions & 0 deletions Kotlin-Project/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
services:
app:
build: ..
container_name: van-gogh-parser
ports:
- "8080:8080"
volumes:
- .:/app
working_dir: /app
Binary file added Kotlin-Project/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions Kotlin-Project/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading