Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
petriichuk committed Dec 7, 2023
1 parent ac7f0c3 commit bd75692
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,18 @@ jobs:
IMAGE_TAG: latest
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
- name: Configure SSH
run: |
mkdir -p /.ssh/
echo "${{secrets.SSH_KEY}}" > ~/.ssh/dev.key
chmod 600 ~/.ssh/dev.key
Host dev
HostName ${{ secrets.INSTANCE_IP_ADDRESS }}
User ${{ secrets.INSTANCE_USER }}
IdentifyFile ~/.ssh/dev.key
StrictHostKeyChecking no
END
- name: Pull and Start
run: |
scp -i ~/.ssh/dev.key -o StrictHostKeyChecking=no -r docker-compose-prod.yml ${{ secrets.INSTANCE_USER }}@${{ secrets.INSTANCE_IP_ADDRESS }}:./
10 changes: 10 additions & 0 deletions docker-compose-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: "3.8"

services:
web:
restart: always
container_name: u1_web
ports:
- "80:8000"
image: ${BE_IMAGE}
command: gunicorn u1django.wsgi:application --bind 0.0.0.0:8050 --workers=1 --timeout=60

0 comments on commit bd75692

Please sign in to comment.