Skip to content

Commit

Permalink
Merge pull request #47 from Leets-Official/feat/#46
Browse files Browse the repository at this point in the history
[feat] #46 운영 환경 변경
  • Loading branch information
jwnnoh authored Jan 3, 2025
2 parents e35bd98 + 5d5e788 commit 704bbcc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,27 @@ on:
- 'releases/**'

env:
AWS_REGION: ap-northeast-2
AWS_S3_BUCKET: gitactionbucket
AWS_CODE_DEPLOY_APPLICATION: cicd-test-cd
AWS_CODE_DEPLOY_GROUP: cicd-test-cd-group
APPLICATION: ${{ secrets.APPLICATION }}
WORKING_DIRECTORY: ./

jobs:
build-with-gradle:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: JDK 17 설치
uses: actions/setup-java@v3
- name: JDK 17 설정
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'corretto'

- name: 환경변수 설정
- name: applications.yml 환경변수 설정
run: |
echo "${{env.APPLICATION}}" > ./src/main/resources/application.yml
- name: gradlew에 실행 권한 부여
- name: gradlew 실행 권한 부여
run: chmod +x gradlew
working-directory: ${{ env.WORKING_DIRECTORY }}

Expand All @@ -57,7 +53,5 @@ jobs:
key: ${{ secrets.REMOTE_IDENTITYFILE }}
port: ${{ secrets.REMOTE_PORT }}
script: |
cd server
docker compose -f docker-compose.yml down leets-be
docker compose -f docker-compose.yml pull leets-be
docker compose -f docker-compose.yml up -d leets-be
cd docker-compose
sudo ./deploy.sh
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
# 기술스택
+ 프레임워크 : SpringBoot 3.0.9
+ 언어 : Java 17
+ 데이터베이스 : MariaDB
+ 데이터베이스 : MySQL
+ 인프라 : AWS EC2
+ CI/CD: GitHub Actions

<br>

# Environment
```java
```
# Cors 관련 환경변수
CORS_ORIGIN_DEVELOPMENT=
CORS_ORIGIN_PRODUCTION=
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dependencies {
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'

runtimeOnly 'org.mariadb.jdbc:mariadb-java-client'
runtimeOnly 'com.mysql:mysql-connector-j'

testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ spring:
profiles:
default: dev
datasource:
driver-class-name: org.mariadb.jdbc.Driver
driver-class-name: com.mysql.cj.jdbc.Driver
username: ${DATABASE_USERNAME}
url: ${DATABASE_URL}
password: ${DATABASE_PASSWORD}
jpa:
properties:
hibernate:
dialect: org.hibernate.dialect.MariaDBDialect
dialect: org.hibernate.dialect.MySQLDialect
format_sql: true
use_sql_comments: true
show_sql: true
Expand Down

0 comments on commit 704bbcc

Please sign in to comment.