diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ca5113a..102a5d0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -21,14 +21,6 @@ jobs: echo "${{ secrets.EC2_SSH_KEY }}" > key.pem chmod 600 key.pem ssh -o StrictHostKeyChecking=no -i key.pem -t ec2-user@${{ secrets.EC2_INSTANCE_IP }} << 'EOF' - sudo yum update -y - sudo yum install -y docker - sudo service docker start - sudo usermod -a -G docker ec2-user - - sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose - sudo chmod +x /usr/local/bin/docker-compose - sudo docker pull public.ecr.aws/h7p2f6d8/ticats_ai:latest sudo docker-compose down sudo docker-compose up -d diff --git a/Dockerfile b/Dockerfile index 4a9af80..699a37f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,14 @@ FROM python:3.9 +# 작업 디렉토리 설정 WORKDIR /code -COPY ./ /code/ +# 종속성 파일 복사 및 설치 +COPY ./requirements.txt /code/ +RUN pip install --no-cache-dir --upgrade -r requirements.txt + +# 필요한 라이브러리 설치 (예: libcrypt.so.1) +RUN apt-get update && apt-get install -y libcrypt1 -RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt \ No newline at end of file +# 애플리케이션 코드 복사 +COPY ./ /code/