Skip to content

Commit

Permalink
add: ec2 환경 테스트용 도커 파일 생성
Browse files Browse the repository at this point in the history
  • Loading branch information
pandahwang committed Oct 6, 2024
1 parent b363c22 commit 4eede12
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Dockerfile-prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM openjdk:17-jdk

COPY build/libs/*SNAPSHOT.jar app.jar

ENTRYPOINT ["java", "-jar", "-Dspring.profiles.active=prod", "/app.jar"]
18 changes: 18 additions & 0 deletions compose-prod.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4eede12

Please sign in to comment.