From dd8305a38204abc3164084e8c5fc655b298823a4 Mon Sep 17 00:00:00 2001 From: kkanggu Date: Sun, 21 Jan 2024 23:06:04 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=ED=95=84=EC=9A=94=20=EC=97=86=EB=8A=94?= =?UTF-8?q?=20=ED=8C=8C=EC=9D=BC=20=EC=82=AD=EC=A0=9C=20=EB=B0=8F=20?= =?UTF-8?q?=EB=84=A4=EC=9D=B4=EB=B0=8D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{deploy-ecs.yml => deploy-ec2.yml} | 4 +- Dockerfile | 4 - docker-compose.yml | 31 ------- task-definition.json | 89 ------------------- 4 files changed, 2 insertions(+), 126 deletions(-) rename .github/workflows/{deploy-ecs.yml => deploy-ec2.yml} (94%) delete mode 100644 Dockerfile delete mode 100644 docker-compose.yml delete mode 100644 task-definition.json diff --git a/.github/workflows/deploy-ecs.yml b/.github/workflows/deploy-ec2.yml similarity index 94% rename from .github/workflows/deploy-ecs.yml rename to .github/workflows/deploy-ec2.yml index 59f20ca1..fb4c5e0c 100644 --- a/.github/workflows/deploy-ecs.yml +++ b/.github/workflows/deploy-ec2.yml @@ -1,4 +1,4 @@ -name: Deploy to Amazon ECS CI/CD +name: Deploy to Amazon EC2 CI/CD on: push: @@ -49,5 +49,5 @@ jobs: host: ${{ secrets.EC2_HOST }} username: ${{ secrets.EC2_USER_NAME }} key: ${{ secrets.EC2_PRIVATE_KEY }} - source: "build/libs/*.jar" + source: "build/libs/daitssu-api.jar" target: ${{ secrets.EC2_PATH }} diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 51937b7d..00000000 --- a/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -FROM openjdk:17 -COPY build/libs/daitssu-api.jar / - -ENTRYPOINT ["java", "-Dspring.profiles.active=dev", "-jar","/daitssu-api.jar"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 9756d2eb..00000000 --- a/docker-compose.yml +++ /dev/null @@ -1,31 +0,0 @@ -# docker-compose.yml -version: '3.7' - -services: - db: - image: postgres:10-alpine - container_name: daitssu_postgres - hostname: daitssu_postgres - # 서비스 배포 및 실행 옵션 - deploy: - # 조건을 만족하는 Node에서만 실행 - placement: - constraints: - - node.role==manager - environment: - TZ: Asia/Seoul - POSTGRES_USER: daitssu - POSTGRES_PASSWORD: daitssu - # 컨테이너 상태 체크 - healthcheck: - test: [ "CMD", "pg_isready", "-U", "postgres" ] - ports: - - "5432:5432" - restart: unless-stopped - volumes: - - daitssu_mysql_volume:/var/lib/postgresql/data - # - ./table.sql:/docker-entrypoint-initdb.d/init-database.sql - -# 도커 볼륨 -volumes: - daitssu_mysql_volume: \ No newline at end of file diff --git a/task-definition.json b/task-definition.json deleted file mode 100644 index aabcb7bc..00000000 --- a/task-definition.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "taskDefinitionArn": "arn:aws:ecs:ap-northeast-2:268306063505:task-definition/daitssu-api:1", - "containerDefinitions": [ - { - "name": "daitssu-api", - "image": "268306063505.dkr.ecr.ap-northeast-2.amazonaws.com/daitssu:latest", - "cpu": 0, - "portMappings": [ - { - "name": "daitssu-api-8080-tcp", - "containerPort": 8080, - "hostPort": 8080, - "protocol": "tcp", - "appProtocol": "http" - } - ], - "essential": true, - "environment": [], - "environmentFiles": [], - "mountPoints": [], - "volumesFrom": [], - "ulimits": [], - "logConfiguration": { - "logDriver": "awslogs", - "options": { - "awslogs-create-group": "true", - "awslogs-group": "/ecs/daitssu-api", - "awslogs-region": "ap-northeast-2", - "awslogs-stream-prefix": "ecs" - } - } - } - ], - "family": "daitssu-api", - "executionRoleArn": "arn:aws:iam::268306063505:role/ecsTaskExecutionRole", - "networkMode": "awsvpc", - "revision": 1, - "volumes": [], - "status": "ACTIVE", - "requiresAttributes": [ - { - "name": "com.amazonaws.ecs.capability.logging-driver.awslogs" - }, - { - "name": "ecs.capability.execution-role-awslogs" - }, - { - "name": "com.amazonaws.ecs.capability.ecr-auth" - }, - { - "name": "com.amazonaws.ecs.capability.docker-remote-api.1.19" - }, - { - "name": "ecs.capability.execution-role-ecr-pull" - }, - { - "name": "ecs.capability.extensible-ephemeral-storage" - }, - { - "name": "com.amazonaws.ecs.capability.docker-remote-api.1.18" - }, - { - "name": "ecs.capability.task-eni" - }, - { - "name": "com.amazonaws.ecs.capability.docker-remote-api.1.29" - } - ], - "placementConstraints": [], - "compatibilities": [ - "EC2", - "FARGATE" - ], - "requiresCompatibilities": [ - "FARGATE" - ], - "cpu": "512", - "memory": "2048", - "ephemeralStorage": { - "sizeInGiB": 21 - }, - "runtimePlatform": { - "cpuArchitecture": "X86_64", - "operatingSystemFamily": "LINUX" - }, - "registeredAt": "2023-07-17T05:01:45.539Z", - "registeredBy": "arn:aws:iam::268306063505:root", - "tags": [] -} \ No newline at end of file