From 699088ab61bbe09648487516d69e063ee3d22d64 Mon Sep 17 00:00:00 2001 From: Stan Runge Date: Wed, 22 Jan 2025 04:55:23 +0100 Subject: [PATCH] chore: remove aws fargate deployment --- .github/workflows/ci-cd.yml | 54 ---------------------------------- .github/workflows/taskdef.json | 54 ---------------------------------- 2 files changed, 108 deletions(-) delete mode 100755 .github/workflows/ci-cd.yml delete mode 100755 .github/workflows/taskdef.json diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml deleted file mode 100755 index 0f1394b..0000000 --- a/.github/workflows/ci-cd.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Deploy to Production - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout Code - uses: actions/checkout@v4 - - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@0e613a0980cbf65ed5b322eb7a1e075d28913a83 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ secrets.AWS_REGION }} - - - name: Log into Amazon ECR - id: login-ecr - uses: aws-actions/amazon-ecr-login@v2 - - - name: Build, tag, and push image to Amazon ECR - id: build-image - env: - ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} - IMAGE_TAG: ${{ github.sha }} - run: | - docker build -t $ECR_REGISTRY/stan/personal-website:$IMAGE_TAG --build-arg DB_URL='${{ secrets.DB_URL }}' --build-arg AUTH_TOKEN='${{ secrets.AUTH_TOKEN }}' packages/web - docker push $ECR_REGISTRY/stan/personal-website:$IMAGE_TAG - echo "image=$ECR_REGISTRY/stan/personal-website:$IMAGE_TAG" >> $GITHUB_OUTPUT - - - name: Render ECS Task Definition - id: task-def - uses: aws-actions/amazon-ecs-render-task-definition@c804dfbdd57f713b6c079302a4c01db7017a36fc - with: - task-definition: .github/workflows/taskdef.json - container-name: web - image: ${{ steps.build-image.outputs.image }} - - - name: Deploy to Amazon ECS - uses: aws-actions/amazon-ecs-deploy-task-definition@df9643053eda01f169e64a0e60233aacca83799a - with: - task-definition: ${{ steps.task-def.outputs.task-definition }} - service: main-service - cluster: PersonalWebsiteCluster - wait-for-service-stability: true diff --git a/.github/workflows/taskdef.json b/.github/workflows/taskdef.json deleted file mode 100755 index f71e1ba..0000000 --- a/.github/workflows/taskdef.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "family": "personal-website", - "containerDefinitions": [ - { - "name": "web", - "image": "949678216675.dkr.ecr.eu-west-1.amazonaws.com/stan/personal-website", - "cpu": 0, - "portMappings": [ - { - "containerPort": 3000, - "hostPort": 3000, - "protocol": "tcp" - } - ], - "essential": true, - "environment": [ - { - "name": "ORIGIN", - "value": "https://stanrunge.dev" - } - ], - "mountPoints": [], - "volumesFrom": [], - "secrets": [ - { - "name": "DB_URL", - "valueFrom": "arn:aws:secretsmanager:eu-west-1:949678216675:secret:DB_URL-NmGgN8:DB_URL::" - }, - { - "name": "AUTH_TOKEN", - "valueFrom": "arn:aws:secretsmanager:eu-west-1:949678216675:secret:personal-website/auth-token-odxL2n:PERSONAL_TOKEN::" - } - ], - "logConfiguration": { - "logDriver": "awslogs", - "options": { - "awslogs-group": "/ecs/personal-website", - "awslogs-region": "eu-west-1", - "awslogs-stream-prefix": "ecs" - } - }, - "systemControls": [] - } - ], - "executionRoleArn": "arn:aws:iam::949678216675:role/ecsTaskExecutionRole", - "networkMode": "awsvpc", - "volumes": [], - "placementConstraints": [], - "requiresCompatibilities": [ - "FARGATE" - ], - "cpu": "256", - "memory": "512" -} \ No newline at end of file