Skip to content

Commit

Permalink
Merge pull request #12 from lllllllillllllillll/dev
Browse files Browse the repository at this point in the history
dev to main: v0.05 release
  • Loading branch information
lllllllillllllillll authored Nov 17, 2023
2 parents 02a9cb5 + 83cd7ce commit 8ac19ad
Show file tree
Hide file tree
Showing 17 changed files with 505 additions and 244 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## v0.05 ( Nov 17th 2023 )
* Environment Variables and Labels are now unchecked by default.
* Support for Docker volumes.
* Fixed app uninstall.
* Fixed Proxy Manager.
* Updated functions to ignore the three DweebUI containers: DweebUI, DweebCache(redis), and DweebProxy(caddy).
* Visual updates: Tabs for networks, images, and volumes. Added 'update' option in container drop-down.
* Updated main.js to prevent javascript errors.
* Fix for templates using 'set' instead of 'default' in environment variables.
* Fixes for templates with no volumes or no labels.
* New README.md.
* New screenshots.
* Automatically persists data in docker volumes if there is no bind mount.

## v0.04 (Nov 11th 2023)
* Docker Image and Compose file available.
* The containers DweebUI and DweebCache are hidden from the dashboard.
Expand Down
96 changes: 60 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,82 @@
# DweebUI
DweebUI is a simple Docker web interface created with javascript and node.js

Pre-Pre-Pre-Pre-Pre Alpha v0.05 ( :fire: Experimental. Don't install on any servers you care about :fire: )

DweebUI is a simple Docker web interface created with javascript and node.js
[![GitHub License](https://img.shields.io/github/license/lllllllillllllillll/DweebUI)](https://github.com/lllllllillllllillll/DweebUI/blob/main/LICENSE)
[![GitHub activity](https://img.shields.io/github/commit-activity/y/lllllllillllllillll/DweebUI)](https://github.com/lllllllillllllillll)

Pre-Pre-Pre-Pre-Pre Alpha v 0.04 ( :fire: Experimental. Don't install on any servers you care about :fire: )

* I haven't used Github very much and I'm still new to javascript.
* This is the first project I've ever released and I'm sure it's full of plenty of bugs and mistakes.
* I probably should have waited a lot longer to share this :|

Requirements: Docker
<a href="https://raw.githubusercontent.com//lllllllillllllillll/DweebUI/main/screenshots/dashboard.png"><img src="https://raw.githubusercontent.com/lllllllillllllillll/DweebUI/main/screenshots/dashboard.png" width="50%"/></a>

<a href="https://raw.githubusercontent.com/lllllllillllllillll/DweebUI/main/screenshots/apps.png"><img src="https://raw.githubusercontent.com/lllllllillllllillll/DweebUI/main/screenshots/apps.png" width="50%"/></a>

![DweebUI](https://raw.githubusercontent.com/lllllllillllllillll/DweebUI/main/DweebUI.png)

## Features
* [x] Dashboard provides server metrics (cpu, ram, network, disk) and container controls on a single page.
* [x] Light/Dark Mode.
* [x] Easy to install app templates.
* [x] Automatically persists data in docker volumes if bind mount isn't used.
* [x] Proxy manager for Caddy.
* [x] Partial Portainer Template Support (Network Mode, Ports, Volumes, Enviroment Variables, Labels, Commands, Restart Policy, Nvidia Hardware Acceleration).
* [x] Multi-User built-in.
* [ ] User pages: Shortcuts, Requests, Support. (planned)
* [x] Support for Windows, Linux, and MacOS.
* [ ] Import compose files. (planned)
* [x] Pure javascript. No frameworks or typescript.
* [x] Templates.json maintains compatability with Portainer, allowing you to use the template without needing to use DweebUI.
* [ ] Manage your Docker networks, images, and volumes. (planned)
* [ ] Preset variables. (planned)

* Dashboard provides server metrics (cpu, ram, network, disk) and container controls on a single page.
* Partial Portainer Template Support (Network Mode, Ports, Volumes, Enviroment Variables, Labels, Commands, Restart Policy, Nvidia Hardware Acceleration).
* Light/Dark Mode.
* Support for multiple users is built in (but unused).
* ~~Caddy Proxy Manager (very simple. proof of concept)~~ Broken since moving to docker container.
* Pure javascript. No frameworks or typescript.
* User data is stored in a sqlite database and uses browser sessions and a redis store for authentication.
* Templates.json maintains compatability with Portainer, so you can use the template without needing to use DweebUI.

## Setup

* Docker compose.yaml:
```
services:
  dweebui:
    container_name: DweebUI
    image: lllllllillllllillll/dweebui:v0.04
    ports:
      - 8000:8000
    depends_on:
      - cache
    links:
      - cache
    volumes:
      - dweebui:/app
      - /var/run/docker.sock:/var/run/docker.sock
  cache:
    container_name: DweebCache
    image: redis:6.2-alpine
    restart: always
    command: redis-server --save 20 1 --loglevel warning --requirepass eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81
    volumes:
      - cache:/data
 
dweebui:
container_name: DweebUI
image: lllllllillllllillll/dweebui:v0.05
restart: unless-stopped
ports:
- 8000:8000
depends_on:
- cache
links:
- cache
volumes:
- dweebui:/app
- ./caddyfiles/Caddyfile:/app/caddyfiles/Caddyfile
- ./caddyfiles/sites:/app/caddyfiles/sites
- /var/run/docker.sock:/var/run/docker.sock
cache:
container_name: DweebCache
image: redis:6.2-alpine
restart: always
command: redis-server --save 20 1 --loglevel warning --requirepass eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81
volumes:
- cache:/data
proxy:
container_name: DweebProxy
image: caddy:2.4.5-alpine
depends_on:
- dweebui
restart: unless-stopped
network_mode: host
volumes:
- caddy:/data
- caddy:/config
- ./caddyfiles/Caddyfile:/etc/caddy/Caddyfile
- ./caddyfiles/sites:/etc/caddy/sites
volumes:
  dweebui:
  cache:
dweebui:
cache:
caddy:
```

* Using setup.sh:
Expand All @@ -61,8 +86,7 @@ cd DweebUI
chmod +x setup.sh
sudo ./setup.sh
```
Once setup is complete, I recommend installing Caddy first, then something like code-server.
The template is very rough.


## Credit

Expand Down
2 changes: 2 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ const app = express();
const routes = require("./routes");

const { serverStats, containerList, containerStats, containerAction } = require('./functions/system_information');
const { RefreshSites } = require('./controllers/site_actions');

let sent_list, clicked;
app.locals.site_list = '';

const redisClient = require('redis').createClient({
url: 'redis://DweebCache:6379',
Expand Down
1 change: 1 addition & 0 deletions caddyfiles/Caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import ./sites/*
13 changes: 7 additions & 6 deletions components/appCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@ function appCard(data) {
try {
let volumes = data.volumes[i];
let volume_check = volumes ? "checked" : "";
let volume_bind = volumes.bind.split(":")[0] ? volumes.bind.split(":")[0] : "";
let volume_container = volumes.container.split(":")[0] ? volumes.container.split(":")[0] : "";
let volume_readwrite = "rw"
let volume_bind = volumes.bind ? volumes.bind : "";
let volume_container = volumes.container ? volumes.container.split(":")[0] : "";
let volume_readwrite = "rw";

if ((volumes.readonly == true) || (volumes.container.endsWith(":ro"))) {
if (volumes.readonly == true) {
volume_readwrite = "ro";
}

Expand All @@ -166,8 +166,9 @@ function appCard(data) {
// Get environment details
try {
let env = data.env[i];
let env_check = env ? "checked" : "";
let env_check = "";
let env_default = env.default ? env.default : "";
if (env.set) { env_default = env.set;}
let env_description = env.description ? env.description : "";
let env_label = env.label ? env.label : "";
let env_name = env.name ? env.name : "";
Expand All @@ -193,7 +194,7 @@ function appCard(data) {

try {
let label = data.labels[i];
let label_check = label ? "checked" : "";
let label_check = "";
let label_name = label.name ? label.name : "";
let label_value = label.value ? label.value : "";

Expand Down
Loading

0 comments on commit 8ac19ad

Please sign in to comment.