ci/deploy: force rollout of web service via RELEASE_SHA + service update to pick new code
This commit is contained in:
parent
8b1715a3da
commit
27d78d6171
2 changed files with 8 additions and 1 deletions
7
.github/workflows/ci-cd-web-desktop.yml
vendored
7
.github/workflows/ci-cd-web-desktop.yml
vendored
|
|
@ -73,7 +73,12 @@ jobs:
|
|||
if: ${{ hashFiles(format('{0}/stack.yml', env.APP_DIR)) != '' }}
|
||||
run: |
|
||||
cd "$APP_DIR"
|
||||
docker stack deploy --with-registry-auth -c stack.yml sistema
|
||||
RELEASE_SHA=${{ github.sha }} docker stack deploy --with-registry-auth -c stack.yml sistema
|
||||
|
||||
- name: Ensure web service restarts with new code
|
||||
if: ${{ hashFiles(format('{0}/stack.yml', env.APP_DIR)) != '' }}
|
||||
run: |
|
||||
docker service update --force sistema_web || true
|
||||
|
||||
convex_deploy:
|
||||
name: Deploy Convex functions
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ services:
|
|||
NPM_CONFIG_PRODUCTION: "false"
|
||||
# Mantém o SQLite fora do repositório
|
||||
DATABASE_URL: "file:/app/data/db.sqlite"
|
||||
# Usado para forçar novo rollout a cada deploy (setado pelo CI)
|
||||
RELEASE_SHA: "${RELEASE_SHA:-dev}"
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue