-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
107 additions
and
28 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Use the official Kotlin image | ||
FROM openjdk:21-jdk-slim as build | ||
|
||
# Set the working directory | ||
WORKDIR /server | ||
|
||
# Copy the build.gradle.kts and settings.gradle.kts | ||
COPY build.gradle.kts settings.gradle.kts ./ | ||
|
||
# Copy the source code | ||
COPY src ./src | ||
|
||
# Build the application | ||
RUN ./gradlew build -x test | ||
|
||
# Second stage to create the final image | ||
FROM openjdk:21-jre-slim | ||
|
||
# Set the working directory | ||
WORKDIR /server | ||
|
||
# Copy the built JAR file from the previous stage | ||
COPY --from=build /server/build/libs/*.jar server.jar | ||
|
||
# Expose the port your application runs on | ||
EXPOSE 8080 | ||
|
||
ENV DISCORD_BOT_TOKEN="YOUr TOKEN" | ||
|
||
# Command to run the application | ||
ENTRYPOINT ["java", "-jar", "app.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// empty, no build configuration needed for this module |