Fix: Reorganizar workflow para forzar regeneración de config
All checks were successful
deploy-meshcentral / deploy (push) Successful in 14s
All checks were successful
deploy-meshcentral / deploy (push) Successful in 14s
- Detener contenedor ANTES de eliminar config.json - Eliminar certificados y bases de datos viejas - Generar config.json limpio con OIDC configurado - Evitar duplicación de steps en el workflow
This commit is contained in:
@@ -32,10 +32,25 @@ jobs:
|
||||
mkdir -p meshcentral-backup
|
||||
mkdir -p meshcentral-config
|
||||
|
||||
- name: Pull latest MeshCentral image
|
||||
run: docker pull ghcr.io/ylianst/meshcentral:latest
|
||||
|
||||
- name: Pull fresh images used in compose
|
||||
run: docker compose pull
|
||||
|
||||
- name: Clean up existing stack
|
||||
run: docker compose --project-name $APP_NAME down
|
||||
|
||||
- name: Remove old config to force regeneration
|
||||
run: |
|
||||
rm -f meshcentral-data/config.json
|
||||
rm -f meshcentral-data/*.db
|
||||
rm -f meshcentral-data/*.crt
|
||||
rm -f meshcentral-data/*.key
|
||||
rm -f meshcentral-data/serverstate.txt
|
||||
|
||||
- name: Generate MeshCentral config.json
|
||||
run: |
|
||||
# Forzar regeneración del config.json
|
||||
rm -f meshcentral-data/config.json
|
||||
cat > meshcentral-data/config.json <<'EOF'
|
||||
{
|
||||
"settings": {
|
||||
@@ -92,15 +107,6 @@ jobs:
|
||||
chmod -R 755 meshcentral-backup
|
||||
chmod -R 755 meshcentral-config
|
||||
|
||||
- name: Pull latest MeshCentral image
|
||||
run: docker pull ghcr.io/ylianst/meshcentral:latest
|
||||
|
||||
- name: Pull fresh images used in compose
|
||||
run: docker compose pull
|
||||
|
||||
- name: Clean up existing stack
|
||||
run: docker compose --project-name $APP_NAME down
|
||||
|
||||
- name: Start MeshCentral stack
|
||||
run: docker compose --project-name $APP_NAME up -d --remove-orphans --wait
|
||||
|
||||
|
||||
Reference in New Issue
Block a user