From 7d72055bdb2be279f0b9935fc55dadf92f787b6e Mon Sep 17 00:00:00 2001 From: sonwonjae Date: Tue, 22 Apr 2025 02:34:00 +0900 Subject: [PATCH 1/2] feat: add docker resource --- docker-compose.template.yml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/docker-compose.template.yml b/docker-compose.template.yml index 58f82e5..cd29cf1 100644 --- a/docker-compose.template.yml +++ b/docker-compose.template.yml @@ -1,4 +1,4 @@ -version: '3' +version: '3.8' services: client-weplate: container_name: client-weplate @@ -8,6 +8,11 @@ services: image: $ECR_REGISTRY/weplate/client-weplate:$VERSION ports: - "1111:1111" + deploy: + resources: + limits: + cpus: '0.5' + memory: 1024M server-api: container_name: server-api @@ -17,6 +22,11 @@ services: image: $ECR_REGISTRY/weplate/server-api:$VERSION ports: - "7777:7777" + deploy: + resources: + limits: + cpus: '0.25' + memory: 512M server-auth: container_name: server-auth @@ -26,6 +36,11 @@ services: image: $ECR_REGISTRY/weplate/server-auth:$VERSION ports: - "5555:5555" + deploy: + resources: + limits: + cpus: '0.25' + memory: 512M nginx: container_name: nginx @@ -37,6 +52,11 @@ services: - client-weplate - server-api - server-auth + deploy: + resources: + limits: + cpus: '0.1' + memory: 256M nginx-health-check: container_name: nginx-health-check @@ -48,3 +68,8 @@ services: - client-weplate - server-api - server-auth + deploy: + resources: + limits: + cpus: '0.1' + memory: 256M From fd415291c431b46a76043f49ca2925d7fe5fe5ac Mon Sep 17 00:00:00 2001 From: sonwonjae Date: Tue, 22 Apr 2025 02:41:11 +0900 Subject: [PATCH 2/2] fix: delete main check --- .github/workflows/Release.yml | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 70ad3f8..6991ec8 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -15,39 +15,8 @@ env: CODEDEPLOY_DEPLOYMENT_GROUP: weplate-deploy-group jobs: - check-main-updated: + deploy: runs-on: ubuntu-latest - outputs: - should_deploy: ${{ steps.compare.outputs.should_deploy }} - steps: - - name: Checkout main - uses: actions/checkout@v4 - with: - fetch-depth: 0 - ref: main - - - name: Compare main with origin/main - id: compare - run: | - git remote set-url origin https://github.com/${{ github.repository }}.git - git fetch origin main - LOCAL_SHA=$(git rev-parse HEAD) - REMOTE_SHA=$(git rev-parse origin/main) - - echo "📟 Local HEAD: $LOCAL_SHA" - echo "📟 Remote HEAD: $REMOTE_SHA" - - if [ "$LOCAL_SHA" = "$REMOTE_SHA" ]; then - echo "✅ No changes. Skipping deploy." - echo "should_deploy=false" >> $GITHUB_OUTPUT - else - echo "🚀 Main branch changed. Proceeding with deploy." - echo "should_deploy=true" >> $GITHUB_OUTPUT - - deploy-if-updated: - runs-on: ubuntu-latest - needs: check-main-updated - if: needs.check-main-updated.outputs.should_deploy == 'true' steps: - name: Checkout main uses: actions/checkout@v4