Skip to content

Commit

Permalink
add docker and docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
ecostanzi committed May 17, 2024
1 parent d8009d7 commit 98e0b21
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Use a base image with Java 17 installed
FROM eclipse-temurin:21

# Set the working directory inside the container
WORKDIR /app

# Copy the JAR file into the container
COPY target/twelve-factor-demo.jar my-app.jar

# Expose the port your application listens on (if applicable)
EXPOSE 8080

# Set the command to run your application when the container starts
CMD ["java", "-jar", "my-app.jar"]
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: '3'
services:
12-factor-demo:
image: intesys/twelve-factor-app-kotlin:latest
environment:
- SERVER_PORT=8080
- CUSTOM_MESSAGE=Hello World From Docker
ports:
- 8085:8080

0 comments on commit 98e0b21

Please sign in to comment.