Dokku uses sudo under the hood which isnt available in the python build pack, so just use docker to fetch info
This commit is contained in:
@@ -1,40 +1,76 @@
|
||||
<div class="muted">Generated at: {{ data.generated_at }}</div>
|
||||
|
||||
{% if data.warnings %}
|
||||
<div style="margin: 10px 0; padding: 10px; border: 1px solid #f2c037; background: #fff7db; border-radius: 8px;">
|
||||
<strong>Warnings</strong>
|
||||
<ul>
|
||||
{% for w in data.warnings %}
|
||||
<li>{{ w }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<h2>Apps</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>App</th>
|
||||
<th>URLs</th>
|
||||
<th>Running</th>
|
||||
<th>URL</th>
|
||||
<th>Status</th>
|
||||
<th>CPU</th>
|
||||
<th>RAM</th>
|
||||
<th>Dokku status</th>
|
||||
<th>Restarts</th>
|
||||
<th>Image</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for r in data.apps %}
|
||||
<tr>
|
||||
<td><strong>{{ r.app }}</strong></td>
|
||||
<td>
|
||||
{% if r.urls %}
|
||||
{% for u in r.urls %}
|
||||
<div><a href="{{ u }}">{{ u }}</a></div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<span class="muted">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ r.running or "—" }}</td>
|
||||
<td><a href="{{ r.url }}">{{ r.url }}</a></td>
|
||||
<td class="muted">{{ r.status }}</td>
|
||||
<td>{{ r.cpu or "—" }}</td>
|
||||
<td>
|
||||
{% if r.mem_used %}
|
||||
{{ r.mem_used }} / {{ r.mem_limit }} ({{ r.mem_pct }})
|
||||
{% else %}
|
||||
—
|
||||
{% endif %}
|
||||
{% else %} — {% endif %}
|
||||
</td>
|
||||
<td class="muted">{{ r.status_web_1 or "—" }}</td>
|
||||
<td>{{ r.restarts }}</td>
|
||||
<td class="muted">{{ r.image }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
{% if data.infra %}
|
||||
<h2 style="margin-top: 24px;">Infra</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Container</th>
|
||||
<th>Status</th>
|
||||
<th>CPU</th>
|
||||
<th>RAM</th>
|
||||
<th>Restarts</th>
|
||||
<th>Image</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for r in data.infra %}
|
||||
<tr>
|
||||
<td><strong>{{ r.container }}</strong></td>
|
||||
<td class="muted">{{ r.status }}</td>
|
||||
<td>{{ r.cpu or "—" }}</td>
|
||||
<td>
|
||||
{% if r.mem_used %}
|
||||
{{ r.mem_used }} / {{ r.mem_limit }} ({{ r.mem_pct }})
|
||||
{% else %} — {% endif %}
|
||||
</td>
|
||||
<td>{{ r.restarts }}</td>
|
||||
<td class="muted">{{ r.image }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user