From f4109b1b2cb2b9c8faa0801e46ce1d920e18c347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemek=20Draga=C5=84czuk?= Date: Fri, 14 Feb 2020 20:17:56 +0100 Subject: [PATCH] Added basic docker support --- Dockerfile | 14 ++++++++++++++ docker-compose.yml | 12 ++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..94ca3a9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM gradle:jdk11 AS build +COPY --chown=gradle:gradle . /home/gradle/src +WORKDIR /home/gradle/src +RUN gradle build --no-daemon + +FROM openjdk:11-jre-slim + +EXPOSE 4567 + +RUN mkdir /app + +COPY --from=build /home/gradle/src/build/libs/*.jar /app/application.jar + +ENTRYPOINT ["java", "-jar","/app/application.jar"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..764631b --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +version: "3" +services: + url: + # TODO: Publish to docker hub + build: + context: . + ports: + - 4567:4567 + environment: + - file.location=/urls.csv + volumes: + - ./urls.csv:/urls.csv \ No newline at end of file