mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-20 23:05:09 +00:00
huge step split into smaller steps
This commit is contained in:
parent
e24129631e
commit
6e3032330a
1 changed files with 30 additions and 14 deletions
44
.github/workflows/deploy.yml
vendored
44
.github/workflows/deploy.yml
vendored
|
|
@ -139,27 +139,43 @@ jobs:
|
|||
echo '${{ secrets.GITHUB_TOKEN }}' | docker login ${{ env.REGISTRY }} -u ${{ github.actor }} --password-stdin
|
||||
"
|
||||
|
||||
- name: Update and restart services
|
||||
- name: Pull latest images
|
||||
run: |
|
||||
ssh ${{ env.HETZNER_USER }}@${{ env.HETZNER_HOST }} "
|
||||
cd ${{ env.DEPLOY_PATH }}
|
||||
|
||||
# Pull latest images
|
||||
docker compose pull
|
||||
|
||||
# Stop services gracefully
|
||||
"
|
||||
|
||||
- name: Stop services
|
||||
run: |
|
||||
ssh ${{ env.HETZNER_USER }}@${{ env.HETZNER_HOST }} "
|
||||
cd ${{ env.DEPLOY_PATH }}
|
||||
docker compose down --timeout 30
|
||||
|
||||
# Start services
|
||||
"
|
||||
|
||||
- name: Start services
|
||||
run: |
|
||||
ssh ${{ env.HETZNER_USER }}@${{ env.HETZNER_HOST }} "
|
||||
cd ${{ env.DEPLOY_PATH }}
|
||||
docker compose up -d
|
||||
|
||||
# Wait for services to be ready
|
||||
sleep 30
|
||||
|
||||
# Run migrations on all sites
|
||||
"
|
||||
|
||||
- name: Wait for services to be ready
|
||||
run: |
|
||||
echo "Waiting for services to start..."
|
||||
sleep 30
|
||||
|
||||
- name: Run migrations
|
||||
run: |
|
||||
ssh ${{ env.HETZNER_USER }}@${{ env.HETZNER_HOST }} "
|
||||
cd ${{ env.DEPLOY_PATH }}
|
||||
./scripts/migrate-all-sites.sh
|
||||
|
||||
# Show status
|
||||
"
|
||||
|
||||
- name: Check service status
|
||||
run: |
|
||||
ssh ${{ env.HETZNER_USER }}@${{ env.HETZNER_HOST }} "
|
||||
cd ${{ env.DEPLOY_PATH }}
|
||||
docker compose ps
|
||||
"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue