Skip to content

Commit

Permalink
fix: deploy aws (#218)
Browse files Browse the repository at this point in the history
* rename bucket name

* fix encrypted properties value

* fix github actions

* fix deploy sh

* fix deploy sh

* fix deploy sh

* fix health check

* deploy sh check log

* fix jdbc url

* fix flyway config

* fix jdbc url

* fix jdbc url

* remove docker compose command

* fix flyway config

* fix jdbc url

* fix jdbc url

* fix deploy sh

* add hikari maximum pool size

* fix s3 bucket source
  • Loading branch information
chicori3 authored Jul 25, 2024
1 parent c7ccc73 commit 33d19a6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
11 changes: 7 additions & 4 deletions module-domain/src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
spring:
datasource:
hikari:
maximum-pool-size: 14

flyway:
url: ENC(J6WzF+M0VMn7+ODxW5FL5nCxGLAAb0idtCItGsn+uHiexwkesIBOcF93WTXBdyrSOq6A8dtJYx2p4ZMT6lfCjL9KtpaCwQxZNf/ChXA9CRIUZcJQJKUepQaLVZ2Ww28pwd9BIpLT0ouYybz+4e/g7ZgyCN6RytW1t3IgLYqoGFYGVMELO1FS26FkpLlM6xMzxxEa4cHzCXhE91wnPhCit3sj8g6d/Zg3MS2JAnJG9PwemDrRGOyvaGZ626zjKRYzXGcFItn5KLT7kbrIePcHsbWXkHZ4++PGVLrt85RbXMk27ZEb0nxNGrUIIfcmSGFy)
url: jdbc:mysql://inspiration-rds-a.cbzl7uckd4zx.ap-northeast-2.rds.amazonaws.com:3306/inspiration?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Seoul&rewriteBatchedStatements=true
user: ENC(jZEdjhanW1BDicsE9g4W205D8n3mIXUiVUchGBakPhNNKx2BB6Ig2SczCQ7P0P3M)
password: ENC(wHtJt3OkgAgOD8+3nc1BBuVswm2VozoyOxXBjrANQp69+Jd0ugUSXkO5LkbocVtQ)
mail:
Expand All @@ -13,17 +17,16 @@ cloud:
access-key: ENC(TytE6PoRN2G8XiwPq3IU+4GFVHPcNmWXUkYk2MApOEY2a6IZZg0pjew8eXWoa6aWmbUfk/xWWapJee+bucL5Qg==)
secret-key: ENC(VvzJa/x/ByNQuonkVRPTWD5zK0EA0YwCBtwhwytxgezkOe95PE6UYMObHiRsKNEmLiH9iIuh1b16M6vy1K3uvSXSa9supz8GR+Kkuz2we5E=)
s3:
bucket: ENC(PuGrKff6b61oLzn8MOMis/s+ddimZXme4J8HTemFL4seX6C0y4n44vdXRO2PvcLq0W4nx7cX0Jq7a5ZfQWms6g==)
bucket: ENC(AdrRa6vr8/16pDxF/6sz2ZG0W0jJ4cgAn14lIqana/vQoTl0wSnWnQfdgoTqgSdGSHL1iZE2DvkMzxAn6tX3wg==)

logging:
file:
name: spring.log


ygtang:
domain:
datasource:
jdbcUrl: ENC(J6WzF+M0VMn7+ODxW5FL5nCxGLAAb0idtCItGsn+uHiexwkesIBOcF93WTXBdyrSOq6A8dtJYx2p4ZMT6lfCjL9KtpaCwQxZNf/ChXA9CRIUZcJQJKUepQaLVZ2Ww28pwd9BIpLT0ouYybz+4e/g7ZgyCN6RytW1t3IgLYqoGFYGVMELO1FS26FkpLlM6xMzxxEa4cHzCXhE91wnPhCit3sj8g6d/Zg3MS2JAnJG9PwemDrRGOyvaGZ626zjKRYzXGcFItn5KLT7kbrIePcHsbWXkHZ4++PGVLrt85RbXMk27ZEb0nxNGrUIIfcmSGFy)
jdbcUrl: jdbc:mysql://inspiration-rds-a.cbzl7uckd4zx.ap-northeast-2.rds.amazonaws.com:3306/inspiration?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Seoul&rewriteBatchedStatements=true
username: ENC(jZEdjhanW1BDicsE9g4W205D8n3mIXUiVUchGBakPhNNKx2BB6Ig2SczCQ7P0P3M)
password: ENC(wHtJt3OkgAgOD8+3nc1BBuVswm2VozoyOxXBjrANQp69+Jd0ugUSXkO5LkbocVtQ)
driver-class-name: com.mysql.cj.jdbc.Driver
Expand Down
1 change: 1 addition & 0 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cp ${APP_PATH}/deploy/.env ${APP_PATH}/source/.env
export $(cat ${APP_PATH}/source/.env | grep -v ^# | xargs) >/dev/null
cd ${SCRIPT_PATH}
chmod +x login_ecr.sh
$SCRIPT_PATH/login_ecr.sh ${AWS_CLI_REGION} ${AWS_CLI_ACCOUNT_ID}
Expand Down
4 changes: 2 additions & 2 deletions scripts/health_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ APP_PATH=/home/ubuntu/app/inspiration

export $(cat ${APP_PATH}/source/.env | grep -v ^# | xargs) >/dev/null
echo "> Start health check of WAS at '${TARGET_URL}:${PORT}' ..."
echo "> Start health check of WAS at '${TARGET_URL}:8080' ..."
for RETRY_COUNT in 1 2 3 4 5 6 7 8 9 10; do
echo "> #${RETRY_COUNT} trying..."
RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" ${TARGET_URL}:"${PORT}"/health)
RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" ${TARGET_URL}:8080/health)
if [ ${RESPONSE_CODE} -eq 200 ]; then
echo "> New WAS successfully running"
Expand Down

0 comments on commit 33d19a6

Please sign in to comment.