Skip to content

Commit

Permalink
Merge pull request #145 from 4m9d/test-server
Browse files Browse the repository at this point in the history
update test configuration
  • Loading branch information
D-w-nJ authored Dec 12, 2023
2 parents c259576 + 170f042 commit 51f2ca5
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 16 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/deploy-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main

jobs:
build:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -48,6 +48,7 @@ jobs:
docker build --build-arg SPRING_PROFILE=prod -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "IMAGE=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_ENV
## ECS task 정의
- name: Push the image ID in the ECS task definition
id: task-def
Expand All @@ -56,6 +57,7 @@ jobs:
task-definition: task-definition-release.json
container-name: be-container
image: ${{ env.IMAGE }}

## ECS 실행
- name: Deploy ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/deploy-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main

jobs:
build:
deploy-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -48,6 +48,7 @@ jobs:
docker build --build-arg SPRING_PROFILE=dev -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "IMAGE=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_ENV
## ECS task 정의
- name: Push the image ID in the ECS task definition
id: task-def
Expand All @@ -56,6 +57,7 @@ jobs:
task-definition: task-definition-test.json
container-name: be-container
image: ${{ env.IMAGE }}

## ECS 실행
- name: Deploy ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ spring:
profiles:
active: dev
datasource:
url: '{cipher}AQICAHiJ3G9QsgoCm+bUcAPegP56f6tkFnNiijhZN1RaChF0LwH1FqZ1SdLLml95t5OzNgT7AAAAuTCBtgYJKoZIhvcNAQcGoIGoMIGlAgEAMIGfBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHwCIvhnxcuo02acXAIBEIByDgapp5TYiqev3iAq9mzabK1qZ511Y99obDDHOG1Z8CSvdTuZ2AvSBDIMLLIHq/4Zb5G0mYKhaf2Mf+c6T6L+Eft24pZCja629MsnNgYcGscdSXGwDB9DVDPRb4pplK1xruZVNQB73C76Q+9cSt3gydvy'
username: '{cipher}AQICAHiJ3G9QsgoCm+bUcAPegP56f6tkFnNiijhZN1RaChF0LwH5uVWg4U1DxUi9QUWBoRKTAAAAZjBkBgkqhkiG9w0BBwagVzBVAgEAMFAGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQM+XRP/1NdxxJ3dPRDAgEQgCMRZrqJnMlF2dknzWSikAa4JNa5YmFEBGIqe14uutEXkkV+bA=='
password: '{cipher}AQICAHiJ3G9QsgoCm+bUcAPegP56f6tkFnNiijhZN1RaChF0LwG0SkyMOzk2KsOYKFgcgmG9AAAAcDBuBgkqhkiG9w0BBwagYTBfAgEAMFoGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMs/d0AVYz9XOaJnMaAgEQgC1tH81ho3hJEML+MHqSNbZ9GVR/OieGrCoEJjn8oEfrwp5b/sZWuc4mLYfX/MY='
url: '{cipher}AQICAHiGKnLyWc0ZUra/HszDAQiLV/XwHEAQgwJdRl7/UiE1gAHWpHBhzB+J7tcOrudb96vHAAAAvTCBugYJKoZIhvcNAQcGoIGsMIGpAgEAMIGjBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDLwcTYdyDLFUG1kGsAIBEIB26Lrzr2RbYYNSo5DStoEkTdSolHsNr8WtAB7nQOkmVDZrGStu0Sb3KH9HjfBhgvwLVgtUh1Suk+9fFRIfZgKC7VEyRQB+vrdKmILJRf20WYtUg0VKs8TJ5L3AVOYnuPtSf87hhUtzexYAfLhrRUHY8xVlu4bV6A=='
username: '{cipher}AQICAHiGKnLyWc0ZUra/HszDAQiLV/XwHEAQgwJdRl7/UiE1gAGWpwtXmWvsQVAseYqGO72hAAAAZjBkBgkqhkiG9w0BBwagVzBVAgEAMFAGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMipQ4aEXUYC7IIJpcAgEQgCPuBK6EIKV7Jd4Qb95oTx3qkEWWdHU6KsVuCAEAYp5wjee88A=='
password: '{cipher}AQICAHiGKnLyWc0ZUra/HszDAQiLV/XwHEAQgwJdRl7/UiE1gAFFXqObvvMFcqtUTmOTr955AAAAcDBuBgkqhkiG9w0BBwagYTBfAgEAMFoGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQM4QZGvOKuZLbQe6zsAgEQgC2AckJVEX/a1XTgS0fo2Sps8sQM3HHzkuzrvVmeXd56wF+1MPZt6H10pvklDR8='
# hikari:
# connection-timeout: 250
# max-lifetime: 500
Expand Down
16 changes: 8 additions & 8 deletions src/main/resources/logback-prod.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
</encoder>
</appender>

<appender name="stash" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<destination>15.164.211.181:5000</destination>
<encoder class="net.logstash.logback.encoder.LogstashEncoder" />
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>INFO</level>
</filter>
</appender>
<!-- <appender name="stash" class="net.logstash.logback.appender.LogstashTcpSocketAppender">-->
<!-- <destination>15.164.211.181:5000</destination>-->
<!-- <encoder class="net.logstash.logback.encoder.LogstashEncoder" />-->
<!-- <filter class="ch.qos.logback.classic.filter.ThresholdFilter">-->
<!-- <level>INFO</level>-->
<!-- </filter>-->
<!-- </appender>-->

<root level="INFO">
<appender-ref ref="console"/>
<appender-ref ref="stash"/>
<!-- <appender-ref ref="stash"/>-->
</root>

</configuration>
6 changes: 3 additions & 3 deletions task-definition-test.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"ipcMode": null,
"executionRoleArn": "arn:aws:iam::224066583965:role/AWSECSTaskExecutionRole",
"executionRoleArn": "arn:aws:iam::804073597504:role/AWSECSTaskExecutionRole",
"containerDefinitions": [
{
"dnsSearchDomains": null,
Expand Down Expand Up @@ -37,7 +37,7 @@
"memoryReservation": 500,
"volumesFrom": [],
"stopTimeout": null,
"image": "224066583965.dkr.ecr.ap-northeast-2.amazonaws.com/be-repo:test",
"image": "804073597504.dkr.ecr.ap-northeast-2.amazonaws.com/be-repo:test",
"startTimeout": null,
"firelensConfiguration": null,
"dependsOn": null,
Expand All @@ -59,7 +59,7 @@
],
"placementConstraints": [],
"memory": null,
"taskRoleArn": "arn:aws:iam::224066583965:role/AWSECSTaskExecutionRole",
"taskRoleArn": "arn:aws:iam::804073597504:role/AWSECSTaskExecutionRole",
"family": "be-test",
"pidMode": null,
"requiresCompatibilities": [
Expand Down

0 comments on commit 51f2ca5

Please sign in to comment.