mirror of
https://github.com/louislam/dockge.git
synced 2025-08-15 14:12:38 +02:00
Compare commits
2 Commits
master
...
fix-consol
Author | SHA1 | Date | |
---|---|---|---|
8902db0ae4 | |||
cdbf7f1843 |
@ -106,7 +106,7 @@ docker compose pull && docker compose up -d
|
|||||||
## Motivations
|
## Motivations
|
||||||
|
|
||||||
- I have been using Portainer for some time, but for the stack management, I am sometimes not satisfied with it. For example, sometimes when I try to deploy a stack, the loading icon keeps spinning for a few minutes without progress. And sometimes error messages are not clear.
|
- I have been using Portainer for some time, but for the stack management, I am sometimes not satisfied with it. For example, sometimes when I try to deploy a stack, the loading icon keeps spinning for a few minutes without progress. And sometimes error messages are not clear.
|
||||||
- Try to develop with ES Module + TypeScript
|
- Try to develop with ES Module + TypeScript (Originally, I planned to use Deno or Bun.js, but they don't have support for arm64, so I stepped back to Node.js)
|
||||||
|
|
||||||
If you love this project, please consider giving it a ⭐.
|
If you love this project, please consider giving it a ⭐.
|
||||||
|
|
||||||
|
@ -311,12 +311,7 @@ export class MainSocketHandler extends SocketHandler {
|
|||||||
throw new ValidationError("dockerRunCommand must be a string");
|
throw new ValidationError("dockerRunCommand must be a string");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Option: 'latest' | 'v2x' | 'v3x'
|
const composeTemplate = composerize(dockerRunCommand);
|
||||||
let composeTemplate = composerize(dockerRunCommand, "", "latest");
|
|
||||||
|
|
||||||
// Remove the first line "name: <your project name>"
|
|
||||||
composeTemplate = composeTemplate.split("\n").slice(1).join("\n");
|
|
||||||
|
|
||||||
callback({
|
callback({
|
||||||
ok: true,
|
ok: true,
|
||||||
composeTemplate,
|
composeTemplate,
|
||||||
|
@ -10,7 +10,7 @@ FROM louislam/dockge:base AS build
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --chown=node:node ./package.json ./package.json
|
COPY --chown=node:node ./package.json ./package.json
|
||||||
COPY --chown=node:node ./package-lock.json ./package-lock.json
|
COPY --chown=node:node ./package-lock.json ./package-lock.json
|
||||||
RUN npm ci --omit=dev
|
RUN npm ci
|
||||||
|
|
||||||
############################################
|
############################################
|
||||||
# ⭐ Main Image
|
# ⭐ Main Image
|
||||||
|
@ -32,7 +32,6 @@ const languageList = {
|
|||||||
"hu": "Magyar",
|
"hu": "Magyar",
|
||||||
"ca": "Català",
|
"ca": "Català",
|
||||||
"ga": "Gaeilge",
|
"ga": "Gaeilge",
|
||||||
"de-CH": "Schwiizerdütsch",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let messages = {
|
let messages = {
|
||||||
|
@ -1,132 +0,0 @@
|
|||||||
{
|
|
||||||
"languageName": "Schwiizerdütsch",
|
|
||||||
"Create your admin account": "Erstell dis Admin-Konto",
|
|
||||||
"authIncorrectCreds": "Falsche Benutzername oder falsches Passwort.",
|
|
||||||
"PasswordsDoNotMatch": "Passwörter stimmed nöd überein.",
|
|
||||||
"Repeat Password": "Passwort wiederhole",
|
|
||||||
"Create": "Erstelle",
|
|
||||||
"signedInDisp": "Agmeldet als {0}",
|
|
||||||
"signedInDispDisabled": "Ameldig deaktiviert.",
|
|
||||||
"home": "Startsiite",
|
|
||||||
"console": "Konsole",
|
|
||||||
"registry": "Container Registry",
|
|
||||||
"compose": "Compose",
|
|
||||||
"addFirstStackMsg": "Stell din erste Stack zämme!",
|
|
||||||
"stackName": "Stack-Name",
|
|
||||||
"deployStack": "Deploye",
|
|
||||||
"deleteStack": "Lösche",
|
|
||||||
"stopStack": "Ahalte",
|
|
||||||
"restartStack": "Neustarte",
|
|
||||||
"updateStack": "Aktualisiere",
|
|
||||||
"startStack": "Starte",
|
|
||||||
"editStack": "Bearbeite",
|
|
||||||
"discardStack": "Verwerfe",
|
|
||||||
"saveStackDraft": "Speicher",
|
|
||||||
"notAvailableShort": "N/V",
|
|
||||||
"deleteStackMsg": "Wotsch de Stack würklich lösche?",
|
|
||||||
"stackNotManagedByDockgeMsg": "De Stack wird nöd vo Dockge verwaltet.",
|
|
||||||
"primaryHostname": "Primäre Hostname",
|
|
||||||
"general": "Allgemein",
|
|
||||||
"container": "Container",
|
|
||||||
"scanFolder": "Stacks-Ordner durchsueche",
|
|
||||||
"dockerImage": "Image",
|
|
||||||
"restartPolicyUnlessStopped": "Falls nöd gstoppt",
|
|
||||||
"restartPolicyAlways": "Immer",
|
|
||||||
"restartPolicyOnFailure": "Bimene Fehler",
|
|
||||||
"restartPolicyNo": "Kein Neustart",
|
|
||||||
"environmentVariable": "Umgebigsvariable",
|
|
||||||
"restartPolicy": "Neustart Richtlinie",
|
|
||||||
"containerName": "Container-Name",
|
|
||||||
"port": "Port / Ports",
|
|
||||||
"volume": "Volume / Volumes",
|
|
||||||
"network": "Netzwerk | Netzwerke",
|
|
||||||
"dependsOn": "Container-Abhängigkeit/e",
|
|
||||||
"addListItem": "{0} hinzuefüege",
|
|
||||||
"deleteContainer": "Lösche",
|
|
||||||
"addContainer": "Container hinzuefüege",
|
|
||||||
"addNetwork": "Netzwerk hinzuefüege",
|
|
||||||
"disableauth.message1": "Bisch der sicher, dass du d'<strong>Ameldung deaktiviere</strong> wotsch?",
|
|
||||||
"disableauth.message2": "Es isch für Szenarien vorgseh, <strong>in dene du beabsichtigsch, e Drittabüter-Authentifizierig</strong> vor Dockge z'implementiere, wie zum Bispiel Cloudflare Access, Authelia oder anderi Authentifizierigsmechanisme.",
|
|
||||||
"passwordNotMatchMsg": "s'wiederholte Passwort stimmt nöd überein.",
|
|
||||||
"autoGet": "Automatisch lade",
|
|
||||||
"add": "Hinzuefüege",
|
|
||||||
"Edit": "Bearbeite",
|
|
||||||
"applyToYAML": "Uf s'YAML awende",
|
|
||||||
"createExternalNetwork": "Erstelle",
|
|
||||||
"addInternalNetwork": "Hinzuefüege",
|
|
||||||
"Save": "Speichere",
|
|
||||||
"Language": "Sprach",
|
|
||||||
"Current User": "Aktuelle Benutzer",
|
|
||||||
"Change Password": "Passwort ändere",
|
|
||||||
"Current Password": "Aktuells Passwort",
|
|
||||||
"New Password": "Neus Passwort",
|
|
||||||
"Repeat New Password": "Neus Passwort wiederhole",
|
|
||||||
"Update Password": "Passwort aktualisiere",
|
|
||||||
"Advanced": "Erwiitert",
|
|
||||||
"Please use this option carefully!": "Bitte verwend die Option sorgfältig!",
|
|
||||||
"Enable Auth": "Ameldig aktiviere",
|
|
||||||
"Disable Auth": "Ameldig deaktiviere",
|
|
||||||
"I understand, please disable": "Ich verstah, bitte deaktiviere",
|
|
||||||
"Leave": "Verlah",
|
|
||||||
"Frontend Version": "Frontend Version",
|
|
||||||
"Check Update On GitHub": "Update uf GitHub überprüefe",
|
|
||||||
"Show update if available": "Update azeige, wenn verfüegbar",
|
|
||||||
"Also check beta release": "Au Beta-Version überprüefe",
|
|
||||||
"Remember me": "Agmeldet blibe",
|
|
||||||
"Login": "Amelde",
|
|
||||||
"Username": "Benutzername",
|
|
||||||
"Password": "Passwort",
|
|
||||||
"Settings": "Istellige",
|
|
||||||
"Logout": "Abmelde",
|
|
||||||
"Lowercase only": "Nur Chliibuechstabe",
|
|
||||||
"Convert to Compose": "In Compose-Syntax umwandle",
|
|
||||||
"Docker Run": "Docker Run",
|
|
||||||
"active": "aktiv",
|
|
||||||
"exited": "beendet",
|
|
||||||
"inactive": "inaktiv",
|
|
||||||
"Appearance": "Erschiinigsbild",
|
|
||||||
"Security": "Sicherheit",
|
|
||||||
"About": "Über",
|
|
||||||
"Allowed commands:": "Zueglasseni Befehl:",
|
|
||||||
"Internal Networks": "Interni Netzwerk",
|
|
||||||
"External Networks": "Externi Netzwerk",
|
|
||||||
"No External Networks": "Kei externi Netzwerk",
|
|
||||||
"Cannot connect to the socket server.": "Kei Verbindig zum Socket Server.",
|
|
||||||
"reverseProxyMsg1": "Wird en Reverse Proxy benutzt?",
|
|
||||||
"reconnecting...": "Erneute Verbindigsufbau…",
|
|
||||||
"downStack": "Stoppe & Deaktiviere",
|
|
||||||
"extra": "Extra",
|
|
||||||
"url": "URL / URLs",
|
|
||||||
"reverseProxyMsg2": "Lern wie er für WebSockets z'konfiguriere isch.",
|
|
||||||
"connecting...": "Verbindigsufbau zum Socket Server…",
|
|
||||||
"newUpdate": "Neues Update",
|
|
||||||
"dockgeAgent": "Dockge Agent | Dockge Agente",
|
|
||||||
"currentEndpoint": "Aktuell",
|
|
||||||
"dockgeURL": "Dockge URL (z. B. http://127.0.0.1:5001)",
|
|
||||||
"agentOnline": "Online",
|
|
||||||
"agentOffline": "Offline",
|
|
||||||
"connecting": "Verbinde",
|
|
||||||
"connect": "Verbinde",
|
|
||||||
"addAgent": "Agent Hinzuefüege",
|
|
||||||
"agentAddedSuccessfully": "Agent erfolgriich hinzuegfüegt.",
|
|
||||||
"agentRemovedSuccessfully": "Agent erfolgriich entfernt.",
|
|
||||||
"removeAgent": "Agent Entferne",
|
|
||||||
"removeAgentMsg": "Bisch der sicher, dass du de Agent entferne wotsch?",
|
|
||||||
"LongSyntaxNotSupported": "Lange Syntax wird nöd unterstützt. Bitte verwend de YAML-Editor.",
|
|
||||||
"Lost connection to the socket server. Reconnecting...": "Verbindig zum Socket Server verlore. Verbinde...",
|
|
||||||
"Saved": "Gspeicheret",
|
|
||||||
"Deleted": "Glöscht",
|
|
||||||
"Started": "Gstartet",
|
|
||||||
"Stopped": "Gstoppt",
|
|
||||||
"Restarted": "Neugstartet",
|
|
||||||
"New Container Name...": "Neue Container Name...",
|
|
||||||
"Network name...": "Netzwerkname...",
|
|
||||||
"Select a network...": "Netzwerk uswähle...",
|
|
||||||
"Updated": "Aktualisiert",
|
|
||||||
"Deployed": "Deployed",
|
|
||||||
"Switch to sh": "Zu sh wechsle",
|
|
||||||
"terminal": "Terminal",
|
|
||||||
"CurrentHostname": "(nöd gsetzt: verwendet aktuelli Hostname)",
|
|
||||||
"Downed": "Abegfahre",
|
|
||||||
"NoNetworksAvailable": "Kei Netzwerk verfüegbar. Du muesch zersch interni Netzwerk hinzuefüege oder externi Netzwerk uf de rechte Siite aktiviere."
|
|
||||||
}
|
|
@ -25,7 +25,6 @@
|
|||||||
"saveStackDraft": "Save",
|
"saveStackDraft": "Save",
|
||||||
"notAvailableShort": "N/A",
|
"notAvailableShort": "N/A",
|
||||||
"deleteStackMsg": "Are you sure you want to delete this stack?",
|
"deleteStackMsg": "Are you sure you want to delete this stack?",
|
||||||
"cancel": "Cancel",
|
|
||||||
"stackNotManagedByDockgeMsg": "This stack is not managed by Dockge.",
|
"stackNotManagedByDockgeMsg": "This stack is not managed by Dockge.",
|
||||||
"primaryHostname": "Primary Hostname",
|
"primaryHostname": "Primary Hostname",
|
||||||
"general": "General",
|
"general": "General",
|
||||||
@ -129,10 +128,5 @@
|
|||||||
"New Container Name...": "New Container Name...",
|
"New Container Name...": "New Container Name...",
|
||||||
"Network name...": "Network name...",
|
"Network name...": "Network name...",
|
||||||
"Select a network...": "Select a network...",
|
"Select a network...": "Select a network...",
|
||||||
"NoNetworksAvailable": "No networks available. You need to add internal networks or enable external networks in the right side first.",
|
"NoNetworksAvailable": "No networks available. You need to add internal networks or enable external networks in the right side first."
|
||||||
"Console is not enabled": "Console is not enabled",
|
|
||||||
"ConsoleNotEnabledMSG1": "Console is a powerful tool that allows you to execute any commands such as <code>docker</code>, <code>rm</code> within the Dockge's container in this Web UI.",
|
|
||||||
"ConsoleNotEnabledMSG2": "It might be dangerous since this Dockge container is connecting to the host's Docker daemon. Also Dockge could be possibly taken down by commands like <code>rm -rf</code>" ,
|
|
||||||
"ConsoleNotEnabledMSG3": "If you understand the risk, you can enable it by setting <code>DOCKGE_ENABLE_CONSOLE=true</code> in the environment variables.",
|
|
||||||
"confirmLeaveStack": "You are currently editing a stack. Are you sure you want to leave?"
|
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<transition name="slide-fade" appear>
|
<transition name="slide-fade" appear>
|
||||||
<div>
|
<div>
|
||||||
<h1 v-if="isAdd" class="mb-3">{{ $t("compose") }}</h1>
|
<h1 v-if="isAdd" class="mb-3">{{$t("compose")}}</h1>
|
||||||
<h1 v-else class="mb-3">
|
<h1 v-else class="mb-3">
|
||||||
<Uptime :stack="globalStack" :pill="true" /> {{ stack.name }}
|
<Uptime :stack="globalStack" :pill="true" /> {{ stack.name }}
|
||||||
<span v-if="$root.agentCount > 1" class="agent-name">
|
<span v-if="$root.agentCount > 1" class="agent-name">
|
||||||
@ -150,7 +150,7 @@
|
|||||||
|
|
||||||
<!-- Combined Terminal Output -->
|
<!-- Combined Terminal Output -->
|
||||||
<div v-show="!isEditMode">
|
<div v-show="!isEditMode">
|
||||||
<h4 class="mb-3">{{ $t("terminal") }}</h4>
|
<h4 class="mb-3">{{$t("terminal")}}</h4>
|
||||||
<Terminal
|
<Terminal
|
||||||
ref="combinedTerminal"
|
ref="combinedTerminal"
|
||||||
class="mb-3 terminal"
|
class="mb-3 terminal"
|
||||||
@ -229,7 +229,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Delete Dialog -->
|
<!-- Delete Dialog -->
|
||||||
<BModal v-model="showDeleteDialog" :cancelTitle="$t('cancel')" :okTitle="$t('deleteStack')" okVariant="danger" @ok="deleteDialog">
|
<BModal v-model="showDeleteDialog" :okTitle="$t('deleteStack')" okVariant="danger" @ok="deleteDialog">
|
||||||
{{ $t("deleteStackMsg") }}
|
{{ $t("deleteStackMsg") }}
|
||||||
</BModal>
|
</BModal>
|
||||||
</div>
|
</div>
|
||||||
@ -491,11 +491,6 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
requestServiceStatus() {
|
requestServiceStatus() {
|
||||||
// Do not request if it is add mode
|
|
||||||
if (this.isAdd) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$root.emitAgent(this.endpoint, "serviceStatusList", this.stack.name, (res) => {
|
this.$root.emitAgent(this.endpoint, "serviceStatusList", this.stack.name, (res) => {
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
this.serviceStatusList = res.serviceStatusList;
|
this.serviceStatusList = res.serviceStatusList;
|
||||||
@ -508,7 +503,7 @@ export default {
|
|||||||
|
|
||||||
exitConfirm(next) {
|
exitConfirm(next) {
|
||||||
if (this.isEditMode) {
|
if (this.isEditMode) {
|
||||||
if (confirm(this.$t("confirmLeaveStack"))) {
|
if (confirm("You are currently editing a stack. Are you sure you want to leave?")) {
|
||||||
this.exitAction();
|
this.exitAction();
|
||||||
next();
|
next();
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,15 +1,23 @@
|
|||||||
<template>
|
<template>
|
||||||
<transition name="slide-fade" appear>
|
<transition name="slide-fade" appear>
|
||||||
<div v-if="!processing">
|
<div v-if="!processing">
|
||||||
<h1 class="mb-3">{{ $t("console") }}</h1>
|
<h1 class="mb-3">Console</h1>
|
||||||
|
|
||||||
<Terminal v-if="enableConsole" class="terminal" :rows="20" mode="mainTerminal" name="console" :endpoint="endpoint"></Terminal>
|
<Terminal v-if="enableConsole" class="terminal" :rows="20" mode="mainTerminal" name="console" :endpoint="endpoint"></Terminal>
|
||||||
|
|
||||||
<div v-else class="alert alert-warning shadow-box" role="alert">
|
<div v-else class="alert alert-warning shadow-box" role="alert">
|
||||||
<h4 class="alert-heading">{{ $t("Console is not enabled") }}</h4>
|
<h4 class="alert-heading">Console is not enabled</h4>
|
||||||
<p v-html="$t('ConsoleNotEnabledMSG1')"></p>
|
<p>
|
||||||
<p v-html="$t('ConsoleNotEnabledMSG2')"></p>
|
Console is a powerful tool that allows you to execute any commands such as <code>docker</code>, <code>rm</code> within the Dockge's container in this Web UI.
|
||||||
<p v-html="$t('ConsoleNotEnabledMSG3')"></p>
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
It might be dangerous since this Dockge container is connecting to the host's Docker daemon. Also Dockge could be possibly taken down by commands like <code>rm -rf</code>.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
If you understand the risk, you can enable it by setting <code>DOCKGE_ENABLE_CONSOLE=true</code> in the environment variables.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dockge",
|
"name": "dockge",
|
||||||
"version": "1.5.0",
|
"version": "1.4.2",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 22.14.0"
|
"node": ">= 22.14.0"
|
||||||
|
Reference in New Issue
Block a user