Skip to content

Commit

Permalink
Merge branch 'master' into feat/dockge-agents-friendly-name
Browse files Browse the repository at this point in the history
  • Loading branch information
lohrbini authored Nov 6, 2024
2 parents 5b2ac56 + 0190620 commit 29cc257
Show file tree
Hide file tree
Showing 43 changed files with 4,839 additions and 3,627 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
ci:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, ARM64]
node: [18.17.1] # Can be changed
os: [ubuntu-latest, windows-latest, macos-latest, ARM, ARM64]
node: [22] # Can be changed
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/json-yaml-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
json-yaml-validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: json-yaml-validate
id: json-yaml-validate
uses: GrantBirki/json-yaml-validate@v1.3.0
uses: GrantBirki/json-yaml-validate@v2.6.1
with:
comment: "false" # enable comment mode
exclude_file: ".github/config/exclude.txt" # gitignore style file for exclusions
2 changes: 2 additions & 0 deletions backend/agent-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ export class AgentManager {
if (bean) {
await R.trash(bean);
let endpoint = bean.endpoint;
this.disconnect(endpoint);
this.sendAgentList();
delete this.agentSocketList[endpoint];
} else {
throw new Error("Agent not found");
Expand Down
25 changes: 17 additions & 8 deletions backend/agent-socket-handlers/docker-socket-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export class DockerSocketHandler extends AgentSocketHandler {
callbackResult({
ok: true,
msg: "Deployed",
msgi18n: true,
}, callback);
stack.joinCombinedTerminal(socket);
} catch (e) {
Expand All @@ -30,7 +31,8 @@ export class DockerSocketHandler extends AgentSocketHandler {
await this.saveStack(server, name, composeYAML, composeENV, isAdd);
callbackResult({
ok: true,
"msg": "Saved"
msg: "Saved",
msgi18n: true,
}, callback);
server.sendStackList();
} catch (e) {
Expand All @@ -56,7 +58,8 @@ export class DockerSocketHandler extends AgentSocketHandler {
server.sendStackList();
callbackResult({
ok: true,
msg: "Deleted"
msg: "Deleted",
msgi18n: true,
}, callback);

} catch (e) {
Expand Down Expand Up @@ -94,7 +97,8 @@ export class DockerSocketHandler extends AgentSocketHandler {
server.sendStackList();
callbackResult({
ok: true,
msg: "Updated"
msg: "Updated",
msgi18n: true,
}, callback);
} catch (e) {
callbackError(e, callback);
Expand All @@ -114,7 +118,8 @@ export class DockerSocketHandler extends AgentSocketHandler {
await stack.start(socket);
callbackResult({
ok: true,
msg: "Started"
msg: "Started",
msgi18n: true,
}, callback);
server.sendStackList();

Expand All @@ -138,7 +143,8 @@ export class DockerSocketHandler extends AgentSocketHandler {
await stack.stop(socket);
callbackResult({
ok: true,
msg: "Stopped"
msg: "Stopped",
msgi18n: true,
}, callback);
server.sendStackList();
} catch (e) {
Expand All @@ -159,7 +165,8 @@ export class DockerSocketHandler extends AgentSocketHandler {
await stack.restart(socket);
callbackResult({
ok: true,
msg: "Restarted"
msg: "Restarted",
msgi18n: true,
}, callback);
server.sendStackList();
} catch (e) {
Expand All @@ -180,7 +187,8 @@ export class DockerSocketHandler extends AgentSocketHandler {
await stack.update(socket);
callbackResult({
ok: true,
msg: "Updated"
msg: "Updated",
msgi18n: true,
}, callback);
server.sendStackList();
} catch (e) {
Expand All @@ -201,7 +209,8 @@ export class DockerSocketHandler extends AgentSocketHandler {
await stack.down(socket);
callbackResult({
ok: true,
msg: "Downed"
msg: "Downed",
msgi18n: true,
}, callback);
server.sendStackList();
} catch (e) {
Expand Down
1 change: 0 additions & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.8"
services:
dockge:
image: louislam/dockge:1
Expand Down
3 changes: 1 addition & 2 deletions docker/Base.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Due to the bug of #145, Node.js's version cannot be changed, unless upstream is fixed.
FROM node:18.17.1-bookworm-slim
FROM node:22-bookworm-slim
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN apt update && apt install --yes --no-install-recommends \
Expand Down
7 changes: 7 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ COPY --from=build /app/node_modules /app/node_modules
COPY --chown=node:node . .
RUN mkdir ./data


# It is just for safe, as by default, it is disabled in the latest Node.js now.
# Read more:
# - https://github.com/sagemathinc/cocalc/issues/6963
# - https://github.com/microsoft/node-pty/issues/630#issuecomment-1987212447
ENV UV_USE_IO_URING=0

VOLUME /app/data
EXPOSE 5001
HEALTHCHECK --interval=60s --timeout=30s --start-period=60s --retries=5 CMD extra/healthcheck
Expand Down
1 change: 0 additions & 1 deletion extra/templates/mariadb/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.8"
services:
mariadb:
image: mariadb:latest
Expand Down
1 change: 0 additions & 1 deletion extra/templates/nginx-proxy-manager/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.8'
services:
nginx-proxy-manager:
image: 'jc21/nginx-proxy-manager:latest'
Expand Down
1 change: 0 additions & 1 deletion extra/templates/uptime-kuma/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.8'
services:
uptime-kuma:
image: louislam/uptime-kuma:1
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/ArraySelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ul v-if="isArrayInited" class="list-group">
<li v-for="(value, index) in array" :key="index" class="list-group-item">
<select v-model="array[index]" class="no-bg domain-input">
<option value="">Select a network...</option>
<option value="">{{ $t(`Select a network...`) }}</option>
<option v-for="option in options" :key="option" :value="option">{{ option }}</option>
</select>

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/Container.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
</label>

<div v-if="networkList.length === 0 && service.networks && service.networks.length > 0" class="text-warning mb-3">
No networks available. You need to add internal networks or enable external networks in the right side first.
{{ $t("NoNetworksAvailable") }}
</div>

<ArraySelect name="networks" :display-name="$t('network')" placeholder="Network Name" :options="networkList" />
Expand All @@ -127,7 +127,7 @@
<label class="form-label">
{{ $t("dependsOn") }}
</label>
<ArrayInput name="depends_on" :display-name="$t('dependsOn')" placeholder="Container Name" />
<ArrayInput name="depends_on" :display-name="$t('dependsOn')" :placeholder="$t(`containerName`)" />
</div>
</div>
</transition>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/NetworkInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<h5>{{ $t("Internal Networks") }}</h5>
<ul class="list-group">
<li v-for="(networkRow, index) in networkList" :key="index" class="list-group-item">
<input v-model="networkRow.key" type="text" class="no-bg domain-input" placeholder="Network name..." />
<input v-model="networkRow.key" type="text" class="no-bg domain-input" :placeholder="$t(`Network name...`)" />
<font-awesome-icon icon="times" class="action remove ms-2 me-3 text-danger" @click="remove(index)" />
</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Terminal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ export default {

<style lang="scss">
.terminal {
padding: 10px 15px;
background-color: black !important;
height: 100%;
}
</style>
2 changes: 1 addition & 1 deletion frontend/src/components/settings/General.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<input
v-model="settings.primaryHostname"
class="form-control"
placeholder="(Unset: Follow current hostname)"
:placeholder="$t(`CurrentHostname`)"
/>
<button class="btn btn-outline-primary" type="button" @click="autoGetPrimaryHostname">
{{ $t("autoGet") }}
Expand Down
1 change: 1 addition & 0 deletions frontend/src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const languageList = {
"vi": "Tiếng Việt",
"hu": "Magyar",
"ca": "Català",
"ga": "Gaeilge",
};

let messages = {
Expand Down
15 changes: 13 additions & 2 deletions frontend/src/lang/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"restartPolicyAlways": "دائماً",
"restartPolicyOnFailure": "عند الفشل",
"restartPolicyNo": "لا",
"environmentVariable": "متغير البيئة | متغيرات البيئة",
"environmentVariable": "متغير | متغيرات",
"restartPolicy": "سياسة إعادة التشغيل",
"containerName": "اسم الحاوية",
"port": "منفذ | منافذ",
Expand Down Expand Up @@ -98,5 +98,16 @@
"url": "رابط | روابط",
"extra": "إضافات",
"reverseProxyMsg1": "هل تستدخم خادم عكسي؟",
"connecting...": "جاري الاتصال بخادم المقبس…"
"connecting...": "جاري الاتصال بخادم المقبس…",
"newUpdate": "تحديث جديد",
"currentEndpoint": "السياق: الوكيل الحالي",
"dockgeURL": "رابط Dockge (مثلا http://127.0.0.1:5001)",
"agentOnline": "متصل",
"agentOffline": "غير متصل",
"connecting": "جاري الإتصال",
"connect": "ارتبط",
"dockgeAgent": "سيرفر Dockge",
"removeAgent": "حذف الوكيل",
"removeAgentMsg": "هل انت متأكد من حذف هذا الوكيل؟",
"LongSyntaxNotSupported": "كتابة النصوص المدعومة غير المدعومة هنا. الرجاء استخدام محرر YAML."
}
116 changes: 116 additions & 0 deletions frontend/src/lang/be.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
{
"active": "акт.",
"LongSyntaxNotSupported": "Доўгі сінтаксіс тут не падтрымліваецца. Выкарыстоўвайце рэдактар YAML.",
"removeAgentMsg": "Вы ўпэўнены, што хочаце выдаліць гэтага агента?",
"languageName": "Беларуская",
"Create your admin account": "Стварыце ўліковы запіс адміністратара",
"authIncorrectCreds": "Няправільны лагін ці пароль.",
"PasswordsDoNotMatch": "Паролі не супадаюць.",
"Repeat Password": "Паўтарыце пароль",
"Create": "Стварыць",
"signedInDisp": "Аўтарызаваны як {0}",
"signedInDispDisabled": "Аўтарызацыя выключана.",
"home": "Галоўная",
"console": "Кансоль",
"registry": "Рэестр (Registry)",
"compose": "Compose",
"addFirstStackMsg": "Стварыце свой першы стэк!",
"stackName": "Назва стэка",
"deployStack": "Разгарнуць",
"deleteStack": "Выдаліць",
"stopStack": "Спыніць",
"restartStack": "Перазапусціць",
"updateStack": "Абнавіць",
"startStack": "Запусціць",
"downStack": "Спыніць і дэактываваць",
"editStack": "Рэдагаваць",
"discardStack": "Скасаваць",
"saveStackDraft": "Захаваць",
"notAvailableShort": "Н/Д",
"deleteStackMsg": "Вы ўпэўнены, што хочаце выдаліць гэты стэк?",
"stackNotManagedByDockgeMsg": "Дадзены стэк не кіруецца Dockge.",
"primaryHostname": "Імя хоста",
"general": "Агульныя",
"container": "Кантэйнер | Кантэйнеры",
"scanFolder": "Сканаваць папку стэкаў",
"dockerImage": "Вобраз",
"restartPolicyUnlessStopped": "Пакуль не будзе спынены",
"restartPolicyAlways": "Заўсёды",
"restartPolicyOnFailure": "Пры падзенні",
"restartPolicyNo": "Ніколі",
"environmentVariable": "Зменная асяроддзя | Зменныя асяроддзя",
"restartPolicy": "Палітыка рэстарту",
"containerName": "Імя кантэйнера",
"port": "Порт | Порты",
"volume": "Сховішча | Сховішчы",
"network": "Сетка | Сеткі",
"dependsOn": "Залежнасць кантэйнера | Залежнасці кантэйнера",
"addListItem": "Дадаць {0}",
"deleteContainer": "Выдаліць",
"addContainer": "Дадаць кантэйнер",
"addNetwork": "Дадаць сетку",
"disableauth.message1": "Вы ўпэўнены, што хочаце <strong>адключыць аўтэнтыфікацыю</strong>?",
"Show update if available": "Паказаць абнаўленне, калі яно даступна",
"Also check beta release": "Атрымліваць бэта-версіі",
"disableauth.message2": "Гэта прызначана для сцэнарыяў, <strong>калі вы збіраецеся выкарыстоўваць староннюю аўтэнтыфікацыю</strong> перад Dockge, напрыклад, Cloudflare Access, Authelia або іншыя механізмы аўтэнтыфікацыі.",
"passwordNotMatchMsg": "Паўторны пароль не супадае.",
"autoGet": "Аўта",
"add": "Дадаць",
"Edit": "Змяніць",
"applyToYAML": "Ужыць да YAML",
"createExternalNetwork": "Стварыць",
"addInternalNetwork": "Дадаць",
"Save": "Захаваць",
"Language": "Мова",
"Current User": "Бягучы карыстальнік",
"Change Password": "Змяніць пароль",
"Current Password": "Бягучы пароль",
"New Password": "Новы пароль",
"Repeat New Password": "Паўтарыце новы пароль",
"Update Password": "Абнавіць пароль",
"Advanced": "Пашыраныя",
"Please use this option carefully!": "Выкарыстоўвайце гэтую опцыю асцярожна!",
"Enable Auth": "Уключыць аўтэнтыфікацыю",
"Disable Auth": "Адключыць аўтэнтыфікацыю",
"I understand, please disable": "Я разумею, адключыце",
"Leave": "Пакінуць",
"Frontend Version": "Версія знешняга інтэрфейсу",
"Check Update On GitHub": "Праверыць абнаўленні на GitHub",
"Remember me": "Запомніць мяне",
"Login": "Лагін",
"Username": "Імя карыстальніка",
"Password": "Пароль",
"Settings": "Налады",
"Logout": "Выйсці",
"Lowercase only": "Толькі ніжні рэгістр",
"Convert to Compose": "Пераўтварыць у Compose",
"Docker Run": "Docker Run",
"exited": "спын.",
"inactive": "неакт.",
"Appearance": "Знешні выгляд",
"Security": "Бяспека",
"About": "Аб праграме",
"Allowed commands:": "Дазволеныя каманды:",
"Internal Networks": "Унутраныя сеткі",
"External Networks": "Знешнія сеткі",
"No External Networks": "Няма знешніх сетак",
"reverseProxyMsg1": "Выкарыстоўваеце зваротны проксі?",
"reverseProxyMsg2": "Праверце, як наладзіць яго для WebSocket",
"Cannot connect to the socket server.": "Не ўдалося падключыцца да сокет-сервера.",
"reconnecting...": "Перападключэнне…",
"connecting...": "Падключэнне да сокет-сервера…",
"url": "URL-адрас | URL-адрасы",
"extra": "Дадаткова",
"newUpdate": "Даступна абнаўленне",
"dockgeAgent": "Агент Dockge | Агенты Dockge",
"currentEndpoint": "Бягучы",
"dockgeURL": "URL-адрас Dockge (напрыклад: http://127.0.0.1:5001)",
"agentOnline": "У сетцы",
"agentOffline": "Не ў сетцы",
"connecting": "Падключэнне",
"connect": "Падключыць",
"addAgent": "Дадаць Агента",
"agentAddedSuccessfully": "Агент паспяхова дададзены.",
"agentRemovedSuccessfully": "Агент паспяхова выдалены.",
"removeAgent": "Выдаліць агента"
}
3 changes: 2 additions & 1 deletion frontend/src/lang/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,6 @@
"Please use this option carefully!": "Si us plau, utilitzeu aquesta opció amb cura!",
"Enable Auth": "Habilitar autenticació",
"I understand, please disable": "Ho entenc, si us plau deshabilita",
"Password": "Contrasenya"
"Password": "Contrasenya",
"LongSyntaxNotSupported": "La sintaxi llarga no està suportada aquí. Si us plau, fes servir l'editor YAML."
}
3 changes: 2 additions & 1 deletion frontend/src/lang/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,6 @@
"agentAddedSuccessfully": "Agent succesfuld tilføjet.",
"agentRemovedSuccessfully": "Agent succesfuld fjernet.",
"removeAgent": "Fjern agent",
"removeAgentMsg": "Er du sikker på at du vil fjerne denne agent?"
"removeAgentMsg": "Er du sikker på at du vil fjerne denne agent?",
"LongSyntaxNotSupported": "Langt syntaks er ikke understøttet her. Forsøg venligst med YAML-editoren."
}
2 changes: 1 addition & 1 deletion frontend/src/lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"Cannot connect to the socket server.": "Keine Verbindung zum Socket Server.",
"reverseProxyMsg1": "Wird ein Reverse Proxy genutzt?",
"reconnecting...": "Erneuter Verbindungsaufbau…",
"downStack": "Stopp & Inaktiv",
"downStack": "Stoppen & Deaktivieren",
"extra": "Extra",
"url": "URL / URLs",
"reverseProxyMsg2": "Lerne wie dieser für WebSockets zu konfigurieren ist.",
Expand Down
Loading

0 comments on commit 29cc257

Please sign in to comment.