Skip to content

Commit

Permalink
추가
Browse files Browse the repository at this point in the history
  • Loading branch information
rrosiee committed Jul 9, 2024
1 parent 3726dbf commit 99aa057
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Deploy to EC2
run: |
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 docker pull public.ecr.aws/h7p2f6d8/ticats_ai:latest
sudo docker-compose down
sudo docker-compose up -d
EOF
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
Expand Down
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ FROM python:3.9
# 작업 디렉토리 설정
WORKDIR /code

# 필요한 라이브러리 설치
RUN apt-get update && apt-get install -y libxcrypt-compat

# 종속성 파일 복사 및 설치
COPY ./requirements.txt /code/
RUN pip install --no-cache-dir --upgrade -r requirements.txt
Expand Down

0 comments on commit 99aa057

Please sign in to comment.