From 6503af009638188e42380e3b6a7d220f2d539ed0 Mon Sep 17 00:00:00 2001 From: Anthony Debucquoy Date: Mon, 26 Feb 2024 13:20:03 +0100 Subject: [PATCH] Adding docker entry for backend This allow you to run `docker-compose up` in the backend directory to run the whole backend in a docker. by default the port is set to 4000 --- backend/Dockerfile | 4 ++++ backend/compose.yaml | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 backend/Dockerfile diff --git a/backend/Dockerfile b/backend/Dockerfile new file mode 100644 index 0000000..bcf424a --- /dev/null +++ b/backend/Dockerfile @@ -0,0 +1,4 @@ +FROM eclipse-temurin:21-jdk-alpine +VOLUME /tmp +COPY build/libs/backend-0.0.1-SNAPSHOT.jar /app.jar +ENTRYPOINT ["java", "-jar", "/app.jar"] diff --git a/backend/compose.yaml b/backend/compose.yaml index 7c8044f..80902c9 100644 --- a/backend/compose.yaml +++ b/backend/compose.yaml @@ -1,4 +1,8 @@ services: + backend: + build: . + ports: + - 4000:8080 postgres: image: 'postgres:latest' environment: