File tree Expand file tree Collapse file tree 5 files changed +45
-2
lines changed Expand file tree Collapse file tree 5 files changed +45
-2
lines changed Original file line number Diff line number Diff line change 3333/.nb-gradle /
3434
3535# ## VS Code ###
36- .vscode /
36+ .vscode /
37+
38+ src /main /resources /application.conf
Original file line number Diff line number Diff line change 1+ # Use a base image with the desired JDK version
2+ FROM adoptopenjdk:11-jdk-hotspot
3+
4+ # Set the working directory inside the container
5+ WORKDIR /app
6+
7+ # Copy the gradlew file and the gradle directory to the container
8+ COPY gradlew .
9+ COPY gradle ./gradle
10+
11+ # Give execute permission to gradlew
12+ RUN chmod +x ./gradlew
13+
14+ # Copy the build.gradle.kts and settings.gradle.kts files to the container
15+ COPY build.gradle.kts settings.gradle.kts ./
16+
17+ # Copy the source code to the container
18+ COPY src ./src
19+
20+ RUN ./gradlew build
21+
22+ EXPOSE 8080
23+
24+ # Start the application when the container starts
25+ CMD ["java" , "-jar" , "build/libs/food-api-all.jar" ]
Original file line number Diff line number Diff line change 11val ktor_version: String by project
22val kotlin_version: String by project
33val logback_version: String by project
4+ val exposed_version: String by project
5+ val postgresql_version: String by project
6+ val kotlinx_datetime_version: String by project
47
58plugins {
69 kotlin(" jvm" ) version " 1.9.23"
@@ -22,6 +25,10 @@ repositories {
2225 mavenCentral()
2326}
2427
28+ tasks.shadowJar {
29+ mergeServiceFiles()
30+ }
31+
2532dependencies {
2633 implementation(" io.ktor:ktor-server-core-jvm" )
2734 implementation(" io.ktor:ktor-server-content-negotiation-jvm" )
@@ -30,4 +37,10 @@ dependencies {
3037 implementation(" ch.qos.logback:logback-classic:$logback_version " )
3138 testImplementation(" io.ktor:ktor-server-tests-jvm" )
3239 testImplementation(" org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version " )
40+ implementation(" org.jetbrains.exposed:exposed-core:$exposed_version " )
41+ implementation(" org.jetbrains.exposed:exposed-dao:$exposed_version " )
42+ implementation(" org.jetbrains.exposed:exposed-jdbc:$exposed_version " )
43+ implementation(" org.postgresql:postgresql:$postgresql_version " )
44+ implementation(" org.jetbrains.kotlinx:kotlinx-datetime:$kotlinx_datetime_version " )
45+ implementation(" org.jetbrains.exposed:exposed-java-time:$exposed_version " )
3346}
Original file line number Diff line number Diff line change 11ktor_version =2.3.9
22kotlin_version =1.9.23
33logback_version =1.4.14
4+ exposed_version = 0.41.1
5+ postgresql_version = 42.5.1
6+ kotlinx_datetime_version = 0.5.0
47kotlin.code.style =official
Original file line number Diff line number Diff line change 1- rootProject.name = " food-api"
1+ rootProject.name = " food-api"
You can’t perform that action at this time.
0 commit comments