Skip to content

Commit

Permalink
feat: prod 서버를 aws로 이관한다. (#16)
Browse files Browse the repository at this point in the history
* feat: prod 서버를 aws로 이관한다.

* chore: remove deploy trigger
  • Loading branch information
rlarltj authored Sep 24, 2024
1 parent 7ec1770 commit 46783db
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions .docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ services:
NCP_SECRET_KEY: ${NCP_SECRET_KEY}
ACTIVE_PROFILE: ${ACTIVE_PROFILE}
DB_ROOT_PASSWORD_DEV: ${DB_ROOT_PASSWORD_DEV}
DB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
APPLE_PRIVATE_KEY: ${APPLE_PRIVATE_KEY}
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ jobs:
- name: Send env file
uses: appleboy/scp-action@master
with:
username: root
host: ${{ secrets.NCP_PROD_IP }}
password: ${{ secrets.NCP_PROD_PASSWORD }}
username: ubuntu
host: ${{ secrets.AWS_PROD_IP }}
key: ${{ secrets.AWS_PROD_PASSWORD }}
source: "./.env"
target: "/home/ubuntu"

Expand All @@ -51,9 +51,9 @@ jobs:
- name: Send docker-compose.yml
uses: appleboy/scp-action@master
with:
username: root
host: ${{ secrets.NCP_PROD_IP }}
password: ${{ secrets.NCP_PROD_PASSWORD }}
username: ubuntu
host: ${{ secrets.AWS_PROD_IP }}
key: ${{ secrets.AWS_PROD_PASSWORD }}
port: 22
source: "./.docker/docker-compose.yml"
target: "/home/ubuntu/"
Expand All @@ -62,9 +62,9 @@ jobs:
- name: Deploy to Prod
uses: appleboy/ssh-action@master
with:
username: root
host: ${{ secrets.NCP_PROD_IP }}
password: ${{ secrets.NCP_PROD_PASSWORD }}
username: ubuntu
host: ${{ secrets.AWS_PROD_IP }}
key: ${{ secrets.AWS_PROD_PASSWORD }}
script: |
sudo cp /home/ubuntu/.docker/docker-compose.yml /home/ubuntu
cd /home/ubuntu
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spring:
datasource:
db:
pool-name: moneymong
jdbc-url: jdbc:mysql://101.101.216.85:3306/moneymong?useSSL=false&&allowPublicKeyRetrieval=true
jdbc-url: jdbc:mysql://rds-moneymong.ct8sumky2j68.ap-northeast-2.rds.amazonaws.com:3306/moneymong?useSSL=false&allowPublicKeyRetrieval=true
username: root
password: ${DB_ROOT_PASSWORD}
driver-class-name: com.mysql.cj.jdbc.Driver
Expand Down

0 comments on commit 46783db

Please sign in to comment.