diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index 64946e8..115ca13 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - feat/** # 권한 설정 permissions: @@ -30,9 +31,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_PASSWORD }} source: "./.env" target: "/home/ubuntu" @@ -51,9 +52,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_PASSWORD }} port: 22 source: "./.docker/docker-compose.yml" target: "/home/ubuntu/" @@ -62,9 +63,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_PASSWORD }} script: | sudo cp /home/ubuntu/.docker/docker-compose.yml /home/ubuntu cd /home/ubuntu diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index ab73cdf..4f65042 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -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