Files
nucleoDocs/.gitea/workflows/build-and-deploy.yml
josedario87 7ee9e69b28
All checks were successful
build-and-deploy / build (push) Successful in 10s
build-and-deploy / deploy (push) Successful in 3s
Configurar MCP en mismo dominio de la app principal
- Cambiar router MCP para usar APP_DOMAIN/mcp en lugar de dominio separado
- Prioridad 200 para que tenga precedencia sobre otros routers
- Eliminar variable MCP_DOMAIN del workflow y .env.example
- Actualizar README con nueva configuración de endpoints
- El servidor MCP estará en docs.nucleoriofrio.com/mcp sin Authentik
2025-10-13 19:39:32 -06:00

69 lines
2.5 KiB
YAML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: build-and-deploy
on:
push:
branches: [ main, master ]
jobs:
#───────────────── build & push ─────────────────
build:
runs-on: docker
env:
REG: ${{ vars.REGISTRY_URL }}
APP_NAME: ${{ vars.APP_NAME }}
REPO_OWNER: ${{ github.repository_owner }}
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: ${{ vars.REGISTRY_URL }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build+push ${{ vars.APP_NAME }}
run: |
cd nuxt4
docker build -t $REG/$REPO_OWNER/$APP_NAME:${{ github.sha }} -t $REG/$REPO_OWNER/$APP_NAME:latest .
docker push $REG/$REPO_OWNER/$APP_NAME:${{ github.sha }}
docker push $REG/$REPO_OWNER/$APP_NAME:latest
- name: Build+push MCP Docker Server
run: |
cd mcp-docker-server
docker build -t $REG/$REPO_OWNER/mcp-docker-server:${{ github.sha }} -t $REG/$REPO_OWNER/mcp-docker-server:latest .
docker push $REG/$REPO_OWNER/mcp-docker-server:${{ github.sha }}
docker push $REG/$REPO_OWNER/mcp-docker-server:latest
#───────────────── deploy ─────────────────
deploy:
needs: build
runs-on: docker
env:
REG: ${{ vars.REGISTRY_URL }}
REPO_OWNER: ${{ github.repository_owner }}
APP_NAME: ${{ vars.APP_NAME }}
# Variables de entorno para docker-compose
APP_DOMAIN: ${{ vars.APP_DOMAIN }}
NUXT_PUBLIC_APP_URL: ${{ vars.NUXT_PUBLIC_APP_URL }}
steps:
- uses: actions/checkout@v3
- name: Login to registry
run: docker login ${{ vars.REGISTRY_URL }} -u ${{ secrets.REGISTRY_USERNAME }} -p ${{ secrets.REGISTRY_PASSWORD }}
- name: Info about environment
run: |
echo " Deploying ${{ vars.APP_NAME }}"
echo " Domain: ${{ vars.APP_DOMAIN }}"
echo " Image: ${{ vars.REGISTRY_URL }}/${{ github.repository_owner }}/${{ vars.APP_NAME }}:latest"
echo " Network: principal"
- name: Pull fresh images used in compose
run: docker compose pull
- name: Clean up stack
run: docker compose --project-name $APP_NAME down
- name: Update stack
run: docker compose --project-name $APP_NAME up -d --remove-orphans --wait