From 4eede125e96f247c38e713bb1f9ff1294470ef17 Mon Sep 17 00:00:00 2001 From: pandahwang Date: Sun, 6 Oct 2024 21:08:45 +0900 Subject: [PATCH] =?UTF-8?q?add:=20ec2=20=ED=99=98=EA=B2=BD=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=EC=9A=A9=20=EB=8F=84=EC=BB=A4=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile-prod | 5 +++++ compose-prod.yml | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 Dockerfile-prod create mode 100644 compose-prod.yml diff --git a/Dockerfile-prod b/Dockerfile-prod new file mode 100644 index 0000000..06fd374 --- /dev/null +++ b/Dockerfile-prod @@ -0,0 +1,5 @@ +FROM openjdk:17-jdk + +COPY build/libs/*SNAPSHOT.jar app.jar + +ENTRYPOINT ["java", "-jar", "-Dspring.profiles.active=prod", "/app.jar"] \ No newline at end of file diff --git a/compose-prod.yml b/compose-prod.yml new file mode 100644 index 0000000..f49b224 --- /dev/null +++ b/compose-prod.yml @@ -0,0 +1,18 @@ +services: + api-server: + build: + context: . + dockerfile: ./Dockerfile-prod + ports: + - 8080:8080 + depends_on: + cache-server: + condition: service_healthy + cache-server: + image: redis + ports: + - 6379:6379 + healthcheck: + test: [ "CMD", "redis-cli", "ping" ] + interval: 5s + retries: 10 \ No newline at end of file