Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.20 - The rewrite #47

Merged
merged 34 commits into from
Jan 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
ac1356d
Merge pull request #36 from lllllllillllllillll/main
lllllllillllllillll Dec 16, 2023
d49ab1a
auth middleware, pm2, fixed missing session data
lllllllillllllillll Dec 17, 2023
385e2e8
Merge branch 'dev' of https://github.com/lllllllillllllillll/DweebUI …
lllllllillllllillll Dec 17, 2023
9a065a8
created pages for images, networks, and volumes
lllllllillllllillll Dec 17, 2023
837c21f
fixed test page.
lllllllillllllillll Dec 17, 2023
e99dc84
removed extra if statements and sqlite queries.
lllllllillllllillll Dec 18, 2023
56b18cd
added helmet. updated readme and changelog.
lllllllillllllillll Dec 19, 2023
2c8d999
fixed* helmet
lllllllillllllillll Dec 19, 2023
0cbf922
The rewrite. v0.20
lllllllillllllillll Jan 8, 2024
7f77605
Delete .gitignore
lllllllillllllillll Jan 8, 2024
569df8f
Fixed css and js resource links
lllllllillllllillll Jan 8, 2024
20c987f
Merge branch 'dev' of https://github.com/lllllllillllllillll/DweebUI …
lllllllillllllillll Jan 8, 2024
ec3ccc1
Fixed LastLogin not updating on register.
lllllllillllllillll Jan 8, 2024
190b902
Added rate limiter
lllllllillllllillll Jan 8, 2024
d4fed30
First draft of working images page
lllllllillllllillll Jan 8, 2024
68cc67d
Fixed image size displayed on images.js
lllllllillllllillll Jan 8, 2024
bd34d78
enabled rate limit, added "MB" to image size.
lllllllillllllillll Jan 9, 2024
3e7f714
Updated images, networks, and volumes pages.
lllllllillllllillll Jan 9, 2024
a105e5f
updated volumes page. added new screenshots.
lllllllillllllillll Jan 9, 2024
6d8a919
Portal page for regular users. Fix apps.js submit.
lllllllillllllillll Jan 11, 2024
b22894f
fixed routing for non-admin users
lllllllillllllillll Jan 11, 2024
4d78177
merged logout with login.js. Fixed app search.
lllllllillllllillll Jan 12, 2024
40bd0b6
re-implemented the install and uninstall functions
lllllllillllllillll Jan 12, 2024
3fac676
Fixed hide/resetView. Renamed app.js to server.js.
lllllllillllllillll Jan 13, 2024
093b27d
fixed typo.
lllllllillllllillll Jan 13, 2024
5b8157a
v0.20-dev changes
lllllllillllllillll Jan 13, 2024
b6faa97
uninstalls the right app now.
lllllllillllllillll Jan 13, 2024
81a98d3
updated screenshots
lllllllillllllillll Jan 14, 2024
e6ad8df
updated logo. removed comments.
lllllllillllllillll Jan 14, 2024
df242f2
css and js changes.
lllllllillllllillll Jan 14, 2024
0911a15
visual tweaks. fixed install logging.
lllllllillllllillll Jan 15, 2024
109e77c
fix network page.
lllllllillllllillll Jan 15, 2024
5629978
release date
lllllllillllllillll Jan 20, 2024
9c79290
added buymeacoffee
lllllllillllllillll Jan 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
github: [lllllllillllllillll]
patreon: DweebUI
patreon: DweebUI
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
labels:
- "🤖 Dependencies"
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
**/node_modules/
**/database.sqlite
**/appdata/
.github
test
.dockerignore
.gitignore
docker-compose.yaml
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
## v0.20 (Jan 20th 2024) - The rewrite. Jumping all the way to v0.20.
* Changed to ES6 imports.
* Cleaned up file structure and code layout.
* Updated DweebUI logo.
* Visual tweaks to login and registration pages.
* Added .gitignore and .dockerignore files.
* Syslogs - View logs for sign-in and registration attempts. :new:
* Docker socket now uses default connection.
* Updated Users page displays 'inactive' if no sign-ins within 30 days.
* Dashboard updates now triggered by Docker events.
* Massive reduction in the amount of HTML, CSS, and JS on client side.
* Container graphs are significantly more efficent and no longer use localStorage.
* Made dark mode the default theme.
* Created intervals to allow application to idle or scale with more users.
* Pages for images, volumes, and networks. :new:
* Localized fonts.
* CORS.
* Testing with Mocha and Supertest.
* Created Portal page. :new:


## <del>v0.09 (dev)</del> dead. (It had so many problems that I essentially rewrote everything)
* Added authentication middleware to router.
* Added gzip compression.
* Added PM2.
* Added Helmet.
* Fixed missing session data.
* Reduced sqlite queries.

## v0.08 (Dec 15th 2023)
* Updates to compose file and instructions from [steveiliop56](https://github.com/steveiliop56)
* Added SECRET field to compose file as a basic security measure.
Expand Down
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
# syntax=docker/dockerfile:1

FROM node:21-alpine

ENV NODE_ENV=production

WORKDIR /app


RUN --mount=type=bind,source=package.json,target=package.json \
--mount=type=bind,source=package-lock.json,target=package-lock.json \
--mount=type=cache,target=/root/.npm \
npm ci --omit=dev


USER root

COPY . .

EXPOSE 8000

CMD node app.js
CMD ["node", "server.js"]
64 changes: 29 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,46 @@
# DweebUI
DweebUI is a simple Docker web interface created using Javascript, Node.JS, and Express.
DweebUI is a web interface for managing Docker, with a zero-config dashboard for controlling and monitoring your containers.

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


[:warning: DweebUI is a management interface and should not be directly exposed to the internet :warning:](https://github.com/lllllllillllllillll/DweebUI/wiki/Exposing-DweebUI-to-the-Internet)

[![GitHub Stars](https://img.shields.io/github/stars/lllllllillllllillll/DweebUI)](https://github.com/lllllllillllllillll)
[![GitHub Activity](https://img.shields.io/github/commit-activity/y/lllllllillllllillll/DweebUI)](https://github.com/lllllllillllllillll)
[![Docker Pulls](https://img.shields.io/docker/pulls/lllllllillllllillll/dweebui)](https://hub.docker.com/repository/docker/lllllllillllllillll/dweebui)
[![GitHub License](https://img.shields.io/github/license/lllllllillllllillll/DweebUI)](https://github.com/lllllllillllllillll/DweebUI/blob/main/LICENSE)
[![GitHub License](https://img.shields.io/badge/-buy_me_a%C2%A0coffee-gray?logo=buy-me-a-coffee)](https://www.buymeacoffee.com/lllllllillllllillll)

* This is a personal project I started to get more familiar with Javascript and Node.js.
* Some UI elements are placeholders and every version may have breaking changes.
* Please post issues and discussions so I know what bugs and features to focus on.

* This is a personal project that I decided to share. I'm sure it has plenty of bugs and mistakes.
* I haven't used Github very much and I'm still new to Javascript.
* I probably should have waited a lot longer to share this :|

<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/dashboard1.png"><img src="https://raw.githubusercontent.com/lllllllillllllillll/DweebUI/main/screenshots/dashboard1.png" width="25%"/></a>
<a href="https://raw.githubusercontent.com/lllllllillllllillll/DweebUI/main/screenshots/dashboard2.png"><img src="https://raw.githubusercontent.com/lllllllillllllillll/DweebUI/main/screenshots/dashboard2.png" width="25%"/></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="25%"/></a>
<a href="https://raw.githubusercontent.com/lllllllillllllillll/DweebUI/main/screenshots/images.png"><img src="https://raw.githubusercontent.com/lllllllillllllillll/DweebUI/main/screenshots/images.png" width="25%"/></a>
<a href="https://raw.githubusercontent.com/lllllllillllllillll/DweebUI/main/screenshots/register.png"><img src="https://raw.githubusercontent.com/lllllllillllllillll/DweebUI/main/screenshots/register.png" width="25%"/></a>
<a href="https://raw.githubusercontent.com/lllllllillllllillll/DweebUI/main/screenshots/login.png"><img src="https://raw.githubusercontent.com/lllllllillllllillll/DweebUI/main/screenshots/login.png" width="25%"/></a>
<a href="https://raw.githubusercontent.com/lllllllillllllillll/DweebUI/main/screenshots/syslogs.png"><img src="https://raw.githubusercontent.com/lllllllillllllillll/DweebUI/main/screenshots/syslogs.png" width="25%"/></a>
<a href="https://raw.githubusercontent.com/lllllllillllllillll/DweebUI/main/screenshots/volumes.png"><img src="https://raw.githubusercontent.com/lllllllillllllillll/DweebUI/main/screenshots/volumes.png" width="25%"/></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>


## Features
* [x] Dashboard provides server metrics, container metrics, and container controls, on a single page.
* [x] View container logs.
* [ ] Update containers (planned).
* [ ] Manage your Docker networks, images, and volumes (planned).
* [ ] Manage your Docker networks, images, and volumes (in development).
* [x] Light/Dark Mode.
* [x] Easy to install app templates.
* [x] Proxy manager for Caddy (Optional).
* [x] Multi-User built-in.
* [ ] User pages (planned).
* [ ] Permissions system (in development).
* [x] Support for Windows, Linux, and MacOS.
* [ ] Docker compose support (planned).
* [ ] Docker compose import (in development).
* [x] Templates.json maintains compatability with Portainer, allowing you to use the template without needing to use DweebUI.
* [x] Automatically persists data in docker volumes if bind mount isn't used.
* [ ] Preset variables (planned).
* [ ] Offline/Local Icons (planned).


## Setup
Expand All @@ -42,37 +49,27 @@ Docker Compose:
```
version: "3.9"
services:

dweebui:
container_name: dweebui
image: lllllllillllllillll/dweebui:v0.08
# build:
# context: .
image: lllllllillllllillll/dweebui:v0.20
environment:
NODE_ENV: production
PORT: 8000
SECRET: MrWiskers
#Proxy_Manager: enabled
restart: unless-stopped
ports:
- 8000:8000
volumes:
- dweebui:/app
- caddyfiles:/app/caddyfiles
- /var/run/docker.sock:/var/run/docker.sock
#- ./custom-templates.json:/app/custom-templates.json
#- ./composefiles:/app/composefiles
networks:
- dweeb_network

- dweebui_net

volumes:
dweebui:
caddyfiles:


networks:
dweeb_network:
dweebui_net:
driver: bridge
```

Expand All @@ -83,18 +80,15 @@ Compose setup:
* You may need to use ```docker-compose up -d``` or execute the command as root with either ```sudo docker compose up -d``` or ```sudo docker-compose up -d```.


Using setup.sh:
```
Extract DweebUI.zip and navigate to /DweebUI
cd DweebUI
chmod +x setup.sh
sudo ./setup.sh
```


## Credits

* Dockerode and dockerode-compose by Apocas: https://github.com/apocas/dockerode
* UI was built using HTML and CSS elements from https://tabler.io/
* Apps template based on Portainer template provided by Lissy93: https://github.com/Lissy93/portainer-templates
* Icons from Walkxcode with some renames and additions: https://github.com/walkxcode/dashboard-icons
* Icons from Walkxcode with some renames and additions: https://github.com/walkxcode/dashboard-icons


## Supporters

* MM (Patreon)
143 changes: 0 additions & 143 deletions app.js

This file was deleted.

1 change: 0 additions & 1 deletion caddyfiles/Caddyfile

This file was deleted.

Loading