diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..5d3dae0
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,5 @@
+**/db.sqlite
+**/node_modules
+**/appdata
+.gitignore
+**/screenshots
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 7631158..c6bc597 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,3 @@
-**/node_modules/
-**/database.sqlite
-**/appdata/
-.github
-test
-.dockerignore
-.gitignore
-docker-compose.yaml
\ No newline at end of file
+**/db.sqlite
+**/node_modules
+**/appdata
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 718c750..e844b8c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,27 @@
+## v0.40 (Feb 26th 2024) - HTMX rewrite
+* Pages rewritten to use HTMX.
+* Removed Socket.io.
+* Changed view files to *.HTML instead of *.EJS.
+* Removed "USER root" from Dockerfile.
+* Express sessions configured to use memorystore.
+* Improved chart rendering.
+* Improvements to container charts.
+* Created Variables page.
+* Created Supporters page.
+* Ability to remove images, volumes, or networks.
+* Fixed list.js sorting.
+* Fixed apps.js page navigation.
+* Removed stackfiles from templates.json and updated some icons.
+* New logo.
+* Improved handling of Docker events.
+* Improved dashboard responsiveness.
+* Updated server metrics styles.
+* Container cards display pending action.
+* Container charts only rendered if container running.
+* Created permissions modal.
+* Podman support (untested).
+* Started a new template for FOSS apps.
+
## 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.
diff --git a/Dockerfile b/Dockerfile
index 47f4b4e..cbc3500 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,19 +1,7 @@
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 . .
-
+COPY . /app
+RUN npm install
EXPOSE 8000
-
-CMD ["node", "server.js"]
+CMD node server.js
\ No newline at end of file
diff --git a/README.md b/README.md
index dd3b37c..fd3fb1b 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
# DweebUI
DweebUI is a web interface for managing Docker, with a zero-config dashboard for controlling and monitoring your containers.
-Alpha v0.20 ( :fire: Experimental :fire: )
+Alpha v0.40 ( :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)
@@ -10,7 +10,7 @@ Alpha v0.20 ( :fire: Experimental :fire: )
[![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)
+[![Coffee](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.
@@ -31,8 +31,9 @@ Alpha v0.20 ( :fire: Experimental :fire: )
* [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 (in development).
+* [x] Manage your Docker networks, images, and volumes.
* [x] Light/Dark Mode.
+* [x] Mobile Friendly.
* [x] Easy to install app templates.
* [x] Multi-User built-in.
* [ ] Permissions system (in development).
@@ -41,6 +42,7 @@ Alpha v0.20 ( :fire: Experimental :fire: )
* [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).
+* [ ] Themes (planned).
## Setup
@@ -51,9 +53,8 @@ version: "3.9"
services:
dweebui:
container_name: dweebui
- image: lllllllillllllillll/dweebui:v0.20
+ image: lllllllillllllillll/dweebui:v0.40
environment:
- NODE_ENV: production
PORT: 8000
SECRET: MrWiskers
restart: unless-stopped
@@ -61,7 +62,11 @@ services:
- 8000:8000
volumes:
- dweebui:/app
+ # Docker socket
- /var/run/docker.sock:/var/run/docker.sock
+ # Podman socket
+ #- /run/podman/podman.sock:/var/run/docker.sock
+
networks:
- dweebui_net
@@ -91,4 +96,5 @@ Compose setup:
## Supporters
-* MM (Patreon)
\ No newline at end of file
+* MM (Patreon)
+* PD (Buymeacoffee)
\ No newline at end of file
diff --git a/components/containerCard.js b/components/containerCard.js
index fcd9690..5637d08 100644
--- a/components/containerCard.js
+++ b/components/containerCard.js
@@ -1,32 +1,29 @@
-// export for app.js
export const containerCard = (data) => {
let { name, service, state, external_port, internal_port, ports, link } = data;
let wrapped = name;
- let chart = name;
+ let disable = "";
+ let chartName = name.replace(/-/g, '');
- if (name.length > 13) {
- wrapped = name.slice(0, 10) + '...';
- }
-
- //disable controls for a docker container depending on its name
- let actions = "";
- if (name.startsWith('dweebui')) {
- actions = 'disabled=""';
- }
+ // shorten long names
+ if (name.length > 13) { wrapped = name.slice(0, 10) + '...'; }
+ // disable buttons for dweebui
+ if (name.startsWith('dweebui')) { disable = 'disabled=""'; }
if ( external_port == undefined ) { external_port = 0; }
if ( internal_port == undefined ) { internal_port = 0; }
-
let state_indicator = 'green';
if (state == 'exited') {
- state = 'stopped';
- state_indicator = 'red';
+ state = 'stopped';
+ state_indicator = 'red';
} else if (state == 'paused') {
- state_indicator = 'orange';
+ state_indicator = 'orange';
}
+ let noChart = 'hx-swap="none"';
+ if (state == 'running') { noChart = ''; }
+
let ports_data = [];
if (ports) {
ports_data = ports;
@@ -49,7 +46,7 @@ export const containerCard = (data) => {
return `
-
+
@@ -60,16 +57,16 @@ export const containerCard = (data) => {
-
@@ -105,13 +102,27 @@ export const containerCard = (data) => {
-
-
- ${state}
-
+
-
+
+
+
+
@@ -206,18 +217,35 @@ export const containerCard = (data) => {
+
+
+
+
+ User:
+
+
+
+
+
+
+