test build and deploy #10

Open
RaiLinKey wants to merge 13 commits from fix into test
Showing only changes of commit 832568450a - Show all commits

View File

@@ -93,22 +93,22 @@ jobs:
context: .
push: false
load: true
tags: fastapi-app:latest
tags: git.rlkdev.ru/RLK/fastapi-app:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache,mode=max
- name: Stop and remove old container
run: |
docker stop fastapi-container || true
docker rm fastapi-container || true
docker stop fastapi-test-container || true
docker rm fastapi-test-container || true
- name: Run new container
run: |
docker run -d \
--name fastapi-container \
--name fastapi-test-container \
-p 8080:8000 \
--restart unless-stopped \
fastapi-app:latest
git.rlkdev.ru/RLK/fastapi-app:latest
- name: Wait for container to be ready
run: |
@@ -116,7 +116,7 @@ jobs:
interval=2
elapsed=0
while [ $elapsed -lt $timeout ]; do
if docker logs fastapi-container 2>&1 | grep -q "Application startup complete"; then
if docker logs fastapi-test-container 2>&1 | grep -q "Application startup complete"; then
echo "Application startup detected in logs"
echo "Deployment successful!"
exit 0