ci(stack): carregar .env antes do docker stack deploy (envsubst)\n\n- Usa set -o allexport && source .env para popular MACHINE_PROVISIONING_SECRET e afins.\n- Garante substituicao de variaveis no stack.yml em producao.
This commit is contained in:
parent
82a71ea092
commit
8efa574b76
1 changed files with 4 additions and 0 deletions
4
.github/workflows/ci-cd-web-desktop.yml
vendored
4
.github/workflows/ci-cd-web-desktop.yml
vendored
|
|
@ -158,6 +158,10 @@ jobs:
|
|||
- name: Swarm deploy (stack.yml)
|
||||
run: |
|
||||
cd "$EFFECTIVE_APP_DIR"
|
||||
# Exporta variáveis do .env para substituição no stack (ex.: MACHINE_PROVISIONING_SECRET)
|
||||
set -o allexport
|
||||
if [ -f .env ]; then . ./.env; fi
|
||||
set +o allexport
|
||||
APP_DIR="$EFFECTIVE_APP_DIR" RELEASE_SHA=${{ github.sha }} docker stack deploy --with-registry-auth -c stack.yml sistema
|
||||
|
||||
- name: Restart web service with new code
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue