From bc5bc73400bc8dbf5fd814e4075da7e20f8b147c Mon Sep 17 00:00:00 2001 From: FlyinPancake Date: Sun, 26 May 2024 00:14:43 +0200 Subject: [PATCH 01/12] feat: added dockge --- dockge/docker-compose.yml | 36 ++++++++++++++++++++++ dockge/entrypoint.sh | 47 ++++++++++++++++++++++++++++ dockge/umbrel-app.yml | 64 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 147 insertions(+) create mode 100644 dockge/docker-compose.yml create mode 100755 dockge/entrypoint.sh create mode 100644 dockge/umbrel-app.yml diff --git a/dockge/docker-compose.yml b/dockge/docker-compose.yml new file mode 100644 index 0000000000..07057d042d --- /dev/null +++ b/dockge/docker-compose.yml @@ -0,0 +1,36 @@ +version: "3.7" + +services: + app_proxy: + environment: + APP_HOST: dockge_dockge_1 + APP_PORT: 5001 + + docker: + image: docker:24.0.5-dind@sha256:3c6e4dca7a63c9a32a4e00da40461ce067f255987ccc9721cf18ffa087bcd1ef + privileged: true + network_mode: host + stop_grace_period: 1m + restart: on-failure + environment: + DOCKER_ENSURE_BRIDGE: "dind0:10.32.0.1/16" + entrypoint: /entrypoint.sh + command: > + dockerd + --bridge dind0 + --data-root /data/data + --exec-root /data/exec + --host unix:///data/docker.sock + --pidfile /data/docker.pid + volumes: + - ${APP_DATA_DIR}/entrypoint.sh:/entrypoint.sh + - ${APP_DATA_DIR}/data/docker:/data + + dockge: + image: louislam/dockge:1.4.2@sha256:ec889251baff476366783bc4a092aaa08c601f377537a0f30fb922754edcd9b7 + restart: on-failure + volumes: + - ${APP_DATA_DIR}/data/dockge/stacks:${APP_DATA_DIR}/data/dockge/stacks + - ${APP_DATA_DIR}/data/docker:/var/run + environment: + DOCKGE_STACKS_DIR: ${APP_DATA_DIR}/data/dockge/stacks diff --git a/dockge/entrypoint.sh b/dockge/entrypoint.sh new file mode 100755 index 0000000000..08740545c8 --- /dev/null +++ b/dockge/entrypoint.sh @@ -0,0 +1,47 @@ +#!/bin/sh + +# This hack can be removed if https://github.com/docker-library/docker/pull/444 gets merged. + +# Remove docker pidfile if it exists to ensure Docker can start up after a bad shutdown +pidfile="/var/run/docker.pid" +if [[ -f "${pidfile}" ]] +then + rm -f "${pidfile}" +fi + +# Use nftables as the backend for iptables +for command in iptables iptables-restore iptables-restore-translate iptables-save iptables-translate +do + ln -sf /sbin/xtables-nft-multi /sbin/$command +done + +# Ensure that a bridge exists with the given name +ensure_bridge_exists() { + local name="${1}" + local ip_range="${2}" + + # Check if the bridge already exists + if ip link show "${name}" &>/dev/null + then + echo "Bridge '${name}' already exists. Skipping creation." + ip addr show "${name}" + return + fi + + echo "Bridge '${name}' does not exist. Creating..." + ip link add "${name}" type bridge + ip addr add "${ip_range}" dev "${name}" + ip link set "${name}" up + + echo "Bridge '${name}' is now up with IP range '${ip_range}'." + ip addr show "${name}" +} + +if [[ "${DOCKER_ENSURE_BRIDGE}" != "" ]] +then + bridge="${DOCKER_ENSURE_BRIDGE%%:*}" + ip_range="${DOCKER_ENSURE_BRIDGE#*:}" + ensure_bridge_exists "${bridge}" "${ip_range}" +fi + +exec dockerd-entrypoint.sh $@ diff --git a/dockge/umbrel-app.yml b/dockge/umbrel-app.yml new file mode 100644 index 0000000000..9489dedd60 --- /dev/null +++ b/dockge/umbrel-app.yml @@ -0,0 +1,64 @@ +manifestVersion: 1 +id: dockge +category: developer +name: Dockge +version: "1.4.2" +tagline: Run custom Docker containers on your Umbrel +description: >- + ⚠️ Make sure to only use named Docker volumes for your stacks and containers. Data in bind-mounted volumes + will be lost when the Portainer app is restarted or updated. + + + ⚠️ Watch out for port conflicts between your custom Docker containers and your umbrelOS apps. + + + Dockge is a fancy, easy-to-use and reactive self-hosted docker compose.yaml stack-oriented manager to run custom Docker + containers on your Umbrel. + + 🛠️ Dockge on Umbrel is for power users, follow these best practices to avoid issues: + + + 1. Data persistence: Make sure to only used named Docker volumes for your stacks and containers. Data in bind-mounted + volumes will be lost when the Portainer app is restarted or updated. + + + 2. Port management: Watch out for potential port conflicts between your custom containers and umbrelOS' service containers, + apps you have installed from the Umbrel App Store or Community App Stores, and any apps you go to install in the future. + + + 3. Container restart policy: Set your containers to "unless-stopped" or "always" restart policies. This will allow your containers + to restart automatically when the Portainer app is restarted or updated. + + + 4. Web access to containers: Access your custom containers in your browser at umbrel.local:. For example, for a container + with a web UI running on port 4545, navigate to umbrel.local:4545 to access it. +website: https://dockge.kuma.pet +dependencies: [] +repo: https://github.com/louislam/dockge +support: https://github.com/louislam/dockge/issues +port: 5001 +gallery: + - 1.jpg + - 2.jpg + - 3.jpg +path: "" +defaultUsername: "" +defaultPassword: "" +releaseNotes: >- + 🐛 Bug Fixes + + #380 Fixed the startup issue that Dockge is no longer working after restart + #342 Fixed the login placeholder issue (Thanks @cyril59310) + + 🦎 Translation Contributions + + #340 #376 #381 Translations update from Kuma Weblate (Thanks @dng-nguyn @401U @Alanimdeo @MrEddX @NexiaMoe @Yirade @Zaid-maker @catfishlty @cyril59310 @gergepalfi @marco-doerig @nazo6 @oplexz @pacoculebras @queeup @stanol @tomeczekstecc) + #344 Added Hungarian (Thanks @gergepalfi) + #377 Added catalan (Thanks @pacoculebras) + #368 Added translate key (Thanks @cyril59310) + + Please let me know if your username is missing, if your pull request has been merged in this version, or your commit has been included in one of the pull requests. + +developer: Louis Lam (@louislam) +submitter: FlyinPancake +submission: https://github.com/getumbrel/umbrel-apps/pull/10000 From 57cb8d48911faf79692cecf1845d17c91a140201 Mon Sep 17 00:00:00 2001 From: FlyinPancake <36113055+FlyinPancake@users.noreply.github.com> Date: Mon, 27 May 2024 08:51:42 +0200 Subject: [PATCH 02/12] fix: add PR number Co-authored-by: highghlow <132668972+highghlow@users.noreply.github.com> --- dockge/umbrel-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockge/umbrel-app.yml b/dockge/umbrel-app.yml index 9489dedd60..8c8790a818 100644 --- a/dockge/umbrel-app.yml +++ b/dockge/umbrel-app.yml @@ -61,4 +61,4 @@ releaseNotes: >- developer: Louis Lam (@louislam) submitter: FlyinPancake -submission: https://github.com/getumbrel/umbrel-apps/pull/10000 +submission: https://github.com/getumbrel/umbrel-apps/pull/1106 From 738d05f7cacf1b6d039df736e1a60398c87e40e4 Mon Sep 17 00:00:00 2001 From: FlyinPancake Date: Mon, 27 May 2024 09:08:40 +0200 Subject: [PATCH 03/12] fix: description, removed notes --- dockge/umbrel-app.yml | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/dockge/umbrel-app.yml b/dockge/umbrel-app.yml index 8c8790a818..b0c6db3274 100644 --- a/dockge/umbrel-app.yml +++ b/dockge/umbrel-app.yml @@ -6,7 +6,7 @@ version: "1.4.2" tagline: Run custom Docker containers on your Umbrel description: >- ⚠️ Make sure to only use named Docker volumes for your stacks and containers. Data in bind-mounted volumes - will be lost when the Portainer app is restarted or updated. + will be lost when Dockge is restarted or updated. ⚠️ Watch out for port conflicts between your custom Docker containers and your umbrelOS apps. @@ -19,7 +19,7 @@ description: >- 1. Data persistence: Make sure to only used named Docker volumes for your stacks and containers. Data in bind-mounted - volumes will be lost when the Portainer app is restarted or updated. + volumes will be lost when Dockge is restarted or updated. 2. Port management: Watch out for potential port conflicts between your custom containers and umbrelOS' service containers, @@ -27,7 +27,7 @@ description: >- 3. Container restart policy: Set your containers to "unless-stopped" or "always" restart policies. This will allow your containers - to restart automatically when the Portainer app is restarted or updated. + to restart automatically when Dockge is restarted or updated. 4. Web access to containers: Access your custom containers in your browser at umbrel.local:. For example, for a container @@ -44,21 +44,8 @@ gallery: path: "" defaultUsername: "" defaultPassword: "" -releaseNotes: >- - 🐛 Bug Fixes - - #380 Fixed the startup issue that Dockge is no longer working after restart - #342 Fixed the login placeholder issue (Thanks @cyril59310) - - 🦎 Translation Contributions - - #340 #376 #381 Translations update from Kuma Weblate (Thanks @dng-nguyn @401U @Alanimdeo @MrEddX @NexiaMoe @Yirade @Zaid-maker @catfishlty @cyril59310 @gergepalfi @marco-doerig @nazo6 @oplexz @pacoculebras @queeup @stanol @tomeczekstecc) - #344 Added Hungarian (Thanks @gergepalfi) - #377 Added catalan (Thanks @pacoculebras) - #368 Added translate key (Thanks @cyril59310) - - Please let me know if your username is missing, if your pull request has been merged in this version, or your commit has been included in one of the pull requests. - +releaseNotes: "" + developer: Louis Lam (@louislam) submitter: FlyinPancake submission: https://github.com/getumbrel/umbrel-apps/pull/1106 From c370f032169ffb6308e90c3f399f2612c8a04828 Mon Sep 17 00:00:00 2001 From: nmfretz Date: Thu, 29 Aug 2024 11:55:15 +1000 Subject: [PATCH 04/12] trigger linter --- dockge/umbrel-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockge/umbrel-app.yml b/dockge/umbrel-app.yml index b0c6db3274..69e426f77c 100644 --- a/dockge/umbrel-app.yml +++ b/dockge/umbrel-app.yml @@ -48,4 +48,4 @@ releaseNotes: "" developer: Louis Lam (@louislam) submitter: FlyinPancake -submission: https://github.com/getumbrel/umbrel-apps/pull/1106 +submission: https://github.com/getumbrel/umbrel-apps/pull/1106 \ No newline at end of file From 267db36042e67c97d4a2ce538ff7a5b561c907ac Mon Sep 17 00:00:00 2001 From: FlyinPancake Date: Wed, 11 Sep 2024 14:02:05 +0200 Subject: [PATCH 05/12] fix: added dir gitkeeps --- dockge/data/docker/.gitkeep | 0 dockge/data/dockge/stacks/.gitkeep | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 dockge/data/docker/.gitkeep create mode 100644 dockge/data/dockge/stacks/.gitkeep diff --git a/dockge/data/docker/.gitkeep b/dockge/data/docker/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/dockge/data/dockge/stacks/.gitkeep b/dockge/data/dockge/stacks/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 From 9fa6e37ace0083517663c4e800704839efb6eb08 Mon Sep 17 00:00:00 2001 From: FlyinPancake <36113055+FlyinPancake@users.noreply.github.com> Date: Sun, 15 Sep 2024 18:55:58 +0200 Subject: [PATCH 06/12] fix: save dockge user data Co-authored-by: joaovictor.local --- dockge/docker-compose.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dockge/docker-compose.yml b/dockge/docker-compose.yml index 07057d042d..b4256d72d8 100644 --- a/dockge/docker-compose.yml +++ b/dockge/docker-compose.yml @@ -30,7 +30,8 @@ services: image: louislam/dockge:1.4.2@sha256:ec889251baff476366783bc4a092aaa08c601f377537a0f30fb922754edcd9b7 restart: on-failure volumes: - - ${APP_DATA_DIR}/data/dockge/stacks:${APP_DATA_DIR}/data/dockge/stacks - ${APP_DATA_DIR}/data/docker:/var/run + - ${APP_DATA_DIR}/data/dockge/data:/app/data + - ${APP_DATA_DIR}/data/dockge/stacks:/opt/stacks environment: - DOCKGE_STACKS_DIR: ${APP_DATA_DIR}/data/dockge/stacks + DOCKGE_STACKS_DIR: /opt/stacks From e880179b5feef547ed26c3656d0cf306dbfa8551 Mon Sep 17 00:00:00 2001 From: nmfretz Date: Wed, 18 Sep 2024 20:49:10 +1000 Subject: [PATCH 07/12] Change tagline to reflect official Dockge copywrite --- dockge/umbrel-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockge/umbrel-app.yml b/dockge/umbrel-app.yml index 69e426f77c..dbf08e036c 100644 --- a/dockge/umbrel-app.yml +++ b/dockge/umbrel-app.yml @@ -3,7 +3,7 @@ id: dockge category: developer name: Dockge version: "1.4.2" -tagline: Run custom Docker containers on your Umbrel +tagline: Easy to use Docker Compose manager description: >- ⚠️ Make sure to only use named Docker volumes for your stacks and containers. Data in bind-mounted volumes will be lost when Dockge is restarted or updated. From a2688ef307f02d50aa963ab1fb925ad35a7a8df8 Mon Sep 17 00:00:00 2001 From: nmfretz Date: Wed, 18 Sep 2024 20:54:35 +1000 Subject: [PATCH 08/12] Tweak app description --- dockge/umbrel-app.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dockge/umbrel-app.yml b/dockge/umbrel-app.yml index dbf08e036c..268c554aa8 100644 --- a/dockge/umbrel-app.yml +++ b/dockge/umbrel-app.yml @@ -5,7 +5,7 @@ name: Dockge version: "1.4.2" tagline: Easy to use Docker Compose manager description: >- - ⚠️ Make sure to only use named Docker volumes for your stacks and containers. Data in bind-mounted volumes + ⚠️ Make sure to only use named Docker volumes in your Compose files. Data in bind-mounted volumes will be lost when Dockge is restarted or updated. @@ -13,12 +13,13 @@ description: >- Dockge is a fancy, easy-to-use and reactive self-hosted docker compose.yaml stack-oriented manager to run custom Docker - containers on your Umbrel. + containers on your Umbrel. It has an interactive editor for compose files and can convert docker run commands into docker-compose.yaml. + 🛠️ Dockge on Umbrel is for power users, follow these best practices to avoid issues: - 1. Data persistence: Make sure to only used named Docker volumes for your stacks and containers. Data in bind-mounted + 1. Data persistence: Make sure to only used named Docker volumes in your Compose files. Data in bind-mounted volumes will be lost when Dockge is restarted or updated. From 272340e7bd8101f8e72e0e176e1ee9a87b24173f Mon Sep 17 00:00:00 2001 From: nmfretz Date: Wed, 18 Sep 2024 20:55:30 +1000 Subject: [PATCH 09/12] Modify developer field --- dockge/umbrel-app.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dockge/umbrel-app.yml b/dockge/umbrel-app.yml index 268c554aa8..31bd7e35a1 100644 --- a/dockge/umbrel-app.yml +++ b/dockge/umbrel-app.yml @@ -46,7 +46,6 @@ path: "" defaultUsername: "" defaultPassword: "" releaseNotes: "" - -developer: Louis Lam (@louislam) +developer: Louis Lam submitter: FlyinPancake submission: https://github.com/getumbrel/umbrel-apps/pull/1106 \ No newline at end of file From f8bb4cb9dfe082fd712845cefaae17208d375652 Mon Sep 17 00:00:00 2001 From: nmfretz Date: Wed, 18 Sep 2024 21:05:35 +1000 Subject: [PATCH 10/12] add stacks dir and refactor volume names --- dockge/data/{dockge/stacks => dockge-data}/.gitkeep | 0 dockge/data/dockge-stacks/.gitkeep | 0 dockge/docker-compose.yml | 4 ++-- 3 files changed, 2 insertions(+), 2 deletions(-) rename dockge/data/{dockge/stacks => dockge-data}/.gitkeep (100%) create mode 100644 dockge/data/dockge-stacks/.gitkeep diff --git a/dockge/data/dockge/stacks/.gitkeep b/dockge/data/dockge-data/.gitkeep similarity index 100% rename from dockge/data/dockge/stacks/.gitkeep rename to dockge/data/dockge-data/.gitkeep diff --git a/dockge/data/dockge-stacks/.gitkeep b/dockge/data/dockge-stacks/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/dockge/docker-compose.yml b/dockge/docker-compose.yml index b4256d72d8..caf3570cac 100644 --- a/dockge/docker-compose.yml +++ b/dockge/docker-compose.yml @@ -31,7 +31,7 @@ services: restart: on-failure volumes: - ${APP_DATA_DIR}/data/docker:/var/run - - ${APP_DATA_DIR}/data/dockge/data:/app/data - - ${APP_DATA_DIR}/data/dockge/stacks:/opt/stacks + - ${APP_DATA_DIR}/data/dockge-data:/app/data + - ${APP_DATA_DIR}/data/dockge-stacks:/opt/stacks environment: DOCKGE_STACKS_DIR: /opt/stacks From ed524a8f2d50f39531fb2a2c5ddc595dbf9a926b Mon Sep 17 00:00:00 2001 From: nmfretz Date: Wed, 18 Sep 2024 21:09:22 +1000 Subject: [PATCH 11/12] Change port to 5005 to avoid clash with libreoffice --- dockge/umbrel-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockge/umbrel-app.yml b/dockge/umbrel-app.yml index 31bd7e35a1..9b180fadea 100644 --- a/dockge/umbrel-app.yml +++ b/dockge/umbrel-app.yml @@ -37,7 +37,7 @@ website: https://dockge.kuma.pet dependencies: [] repo: https://github.com/louislam/dockge support: https://github.com/louislam/dockge/issues -port: 5001 +port: 5005 gallery: - 1.jpg - 2.jpg From 60b1f77731d6ce24d4bbd63854b659d33bcaae27 Mon Sep 17 00:00:00 2001 From: nmfretz Date: Thu, 3 Oct 2024 16:25:48 +1000 Subject: [PATCH 12/12] tweak description --- dockge/umbrel-app.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dockge/umbrel-app.yml b/dockge/umbrel-app.yml index 9b180fadea..a13415d4b4 100644 --- a/dockge/umbrel-app.yml +++ b/dockge/umbrel-app.yml @@ -13,7 +13,7 @@ description: >- Dockge is a fancy, easy-to-use and reactive self-hosted docker compose.yaml stack-oriented manager to run custom Docker - containers on your Umbrel. It has an interactive editor for compose files and can convert docker run commands into docker-compose.yaml. + containers. It has an interactive editor for compose files and can convert docker run commands into docker-compose.yaml. 🛠️ Dockge on Umbrel is for power users, follow these best practices to avoid issues: @@ -31,7 +31,7 @@ description: >- to restart automatically when Dockge is restarted or updated. - 4. Web access to containers: Access your custom containers in your browser at umbrel.local:. For example, for a container + 4. Web access to containers: Access your custom containers in your browser at umbrel.local:PORT_NUMBER. For example, for a container with a web UI running on port 4545, navigate to umbrel.local:4545 to access it. website: https://dockge.kuma.pet dependencies: []