Skip to content

Commit 9c78e3d

Browse files
authored
Infra 설정 완료 (#5)
* chore: gradle wrapper git에 추가 * chore: jdk 변경 * chore: jdk 변경 * chore: dockerfile의 jar 파일명 변경 * chore: dockerfile의 jar 파일명 변경 * chore: deploy.yml 수정 * chore: db 설정 환경변수로 수정 * chore: nginx 수정 * chore: db 접속 url 변경 * chore: ddl auto로 변경
1 parent bba10de commit 9c78e3d

8 files changed

Lines changed: 16 additions & 14 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@ jobs:
5656
ssh -o StrictHostKeyChecking=no -i private_key.pem ec2-user@${{ secrets.EC2_HOST }} << 'EOF'
5757
set -e
5858
cd ~
59-
docker compose pull
60-
docker compose up -d
59+
docker-compose pull
60+
docker-compose up -d
6161

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# JDK 21 기반 공식 이미지 사용
2-
FROM openjdk:17-jdk-slim
1+
# JDK 17 기반 공식 이미지 사용
2+
FROM eclipse-temurin:17-jdk-jammy
33

44
# 컨테이너 내 작업 디렉토리 설정
55
WORKDIR /app
66

77
# 빌드된 JAR 파일을 컨테이너에 복사
8-
COPY build/libs/project-0.0.1-SNAPSHOT.jar intro.jar
8+
COPY build/libs/devpath-backend-1.0.0.jar intro.jar
99

1010
# (필요시 포트 노출)
1111
EXPOSE 8080

gradle/wrapper/gradle-wrapper.jar

42.7 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nginx.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
events {}
2+
13
http {
24
upstream spring_app {
35
server intro-app:8080;

src/main/resources/application-dev.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
spring:
22
datasource:
3-
url: jdbc:mysql://localhost:3306/intro
4-
username: root
5-
password: rhkrwogus1!
3+
url: jdbc:mysql://db:3306/intro?serverTimezone=UTC&allowPublicKeyRetrieval=true&useSSL=false
4+
username: ${DB_USER}
5+
password: ${DB_PASSWORD}
66
driver-class-name: com.mysql.cj.jdbc.Driver
77
jpa:
88
show-sql: false
99
generate-ddl: true
1010
properties:
1111
hibernate:
1212
hbm2ddl:
13-
auto: create
13+
auto: update
1414
format_sql: false
1515
use_sql_comments: true
1616
default_batch_fetch_size: 1000

0 commit comments

Comments
 (0)