{% extends "base.html" %} {% block title %}{{ app.name }} - Painel de Deploy & Gestão{% endblock %} {% block header_title %}{{ app.name }}{% endblock %} {% block header_actions %} Voltar ao Servidor {% endblock %} {% block content %}

{{ app.name }}

{% if app.access_type == 'ip_direct' %} 🌐 IP DIRETO {% else %} 🔀 NGINX PROXY {% endif %} {{ app.status }}
{{ health.reason }}
URL de acesso atual: {{ app.current_access_url }}

MATRIZ DE SAÚDE EM TEMPO REAL DA APLICAÇÃO

Serviço Systemd
{% if health.systemd_active %}🟢 Ativo{% else %}🔴 Inativo{% endif %}
{{ health.service_name }}
Porta de Escuta
{% if health.port_listening %}🟢 Escutando{% else %}🔴 Fechada{% endif %}
0.0.0.0:{{ health.port }}
HTTP Local (127.0.0.1)
HTTP {{ health.local_code }}
Latência: {{ health.local_ms }} ms
HTTP Público (IP)
{% if health.public_code > 0 %}HTTP {{ health.public_code }}{% else %}🔴 Timeout / Bloqueado{% endif %}
Latência: {{ health.public_ms }} ms

ATRIBUTOS DE REDE & VPS

Servidor VPS
{{ app.server.name }} ({{ app.server.ip }})
Domínio Ativo
{{ app.active_domain or 'Nenhum' }}
Portas (Ext ➔ Int)
:{{ app.external_port or app.internal_port }} ➔ :{{ app.internal_port }}
Diretório do App
{{ app.path }}

Histórico de Releases & Artefatos Imutáveis

{% for dep in app.deployments %} {% else %} {% endfor %}
Release Versão & Hash SHA-256 Data do Deploy Status Ações Coerentes
Release #{{ dep.release_number or loop.revindex }} {% if dep.is_active == 1 or (loop.first and dep.status == 'success' and not app.deployments|selectattr('is_active', 'equalto', 1)|list) %} ATUAL {% endif %}
{{ dep.version }}
{% if dep.sha256_hash %}
SHA-256: {{ dep.sha256_hash[:12] }}...
{% endif %}
{{ dep.description or 'Sem descrição' }}
{{ dep.deployed_at }} {% if dep.status == 'success' %} Sucesso ({{ dep.duration_seconds }}s) {% else %} Falhou {% endif %}
{% if dep.diagnostic %} {% endif %} {% if dep.stored_zip_path %} BAIXAR ZIP {% endif %} {% if dep.status == 'success' and not (dep.is_active == 1) %} {% elif dep.status == 'failed' %} {% endif %}
Nenhuma release registrada ainda. Envie um arquivo ZIP para realizar o primeiro deploy automatizado!

GERENCIADOR DE ARQUIVOS DO SERVIDOR

Diretório no VPS: {{ app.path }}
Nome do Item Tamanho Modificado em Permissão Ações
Carregando arquivos do VPS via SSH...

SNAPSHOTS E PORTABILIDADE COMPLETA

Gere snapshots do estado atual de produção ou exporte o projeto inteiro com 1 clique.
📦 EXPORTAR APLICAÇÃO COMPLETA
{% for b in app.backups %} {% else %} {% endfor %}
Nome do Snapshot / Dump Tipo Tamanho Data de Criação Status
{{ b.file_name }} {{ b.backup_type|upper }} {{ b.file_size_mb }} MB {{ b.created_at }} Salvo
Nenhum snapshot ou dump gerado recentemente.

LOGS DO SERVIÇO SYSTEMD (journalctl -u {{ health.service_name }})

Clique em "LOGS AO VIVO" para carregar as últimas 100 linhas via SSH...

CONFIGURAÇÃO DE EXECUÇÃO & ENTRYPOINT

Arquivo Entrypoint
{{ app.entrypoint_file or 'app.py' }}
Objeto WSGI
{{ app.entrypoint_object or 'app' }}
Workers / Timeout
3 Workers | 600s Timeout
Usuário do Serviço
root (Linux VPS)
Comando Completo de Inicialização Systemd
{{ app.path }}/venv/bin/gunicorn --bind 0.0.0.0:{{ app.internal_port }} --workers 3 --timeout 600 {{ (app.entrypoint_file or 'app.py').split('.')[0] }}:{{ app.entrypoint_object or 'app' }}
{% if app.database %}

{{ app.database.name }}

Tipo: {{ app.database.db_type }}
Host: {{ app.database.host }}:{{ app.database.port }}
Tamanho: {{ app.database.size_mb }} MB
Último Backup: {{ app.database.last_backup_at or 'Pendente' }}

Histórico de Dumps do Banco

{% for b in app.backups %}
{{ b.file_name }}
{{ b.file_size_mb }} MB
{% else %}
Nenhum dump de banco salvo recentemente.
{% endfor %}
{% else %}
🗄

Nenhum Banco de Dados Associado a Esta Aplicação

O DeployHub pode verificar os arquivos do seu projeto (.env, requirements.txt, config.py) para identificar a presença de PostgreSQL ou MySQL automaticamente.

{% endif %}

ZONA DE PERIGO: Excluir / Desinstalar Aplicação

Esta ação remove a aplicação do painel e pode desinstalar completamente o serviço do VPS.

Impacto Estimado da Exclusão
Esta aplicação possui:
  • {{ impact.release_count }} releases registradas ({{ impact.valid_release_count }} releases válidas de sucesso)
  • {{ impact.artifact_storage_mb }} MB de artefatos ZIP armazenados
  • {{ impact.db_backup_count }} backups de banco de dados
{% endblock %}