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