Compare commits

...

11 Commits
1.0.0 ... 1.0.1

Author SHA1 Message Date
3dca9e735a Update to 1.0.1 2023-11-12 16:39:48 +08:00
200ba0ca07 Update 2023-11-12 16:39:21 +08:00
dd58a9cbc4 Update 2023-11-12 16:31:38 +08:00
7f41cc099c Update 2023-11-12 16:29:17 +08:00
4ce696181b Add release process 2023-11-12 16:27:02 +08:00
959dbba776 Set a title with hostname 2023-11-12 16:14:35 +08:00
ffa978eea1 feat: Using monospace fonts in editors (#4)
*  feat: Using monospace fonts in editors

Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>

* Update README

---------

Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>
Co-authored-by: Louis Lam <louislam@users.noreply.github.com>
2023-11-12 15:52:31 +08:00
9fd0c6416a Update README.md 2023-11-12 13:41:15 +08:00
e6fc623758 Update README.md 2023-11-12 12:51:36 +08:00
209dedf682 Update README.md 2023-11-12 02:38:20 +08:00
cf49a2ef2a Update README.md 2023-11-12 02:11:03 +08:00
11 changed files with 129 additions and 8 deletions

View File

@ -4,15 +4,17 @@
# Dockge
A fancy, easy-to-use and reactive docker `compose.yaml` stack-oriented manager.
A fancy, easy-to-use and reactive self-hosted docker compose.yaml stack-oriented manager.
<img src="https://github.com/louislam/dockge/assets/1336778/26a583e1-ecb1-4a8d-aedf-76157d714ad7" width="900" alt="" />
[View Video](https://youtu.be/AWAlOQeNpgU?t=48)
View Video: https://youtu.be/AWAlOQeNpgU?t=48
## ⭐ Features
- Manage `compose.yaml`
- Create/Edit/Start/Stop/Restart/Delete
- Update Docker Images
- Interactive Editor for `compose.yaml`
- Interactive Web Terminal
- Reactive
@ -25,6 +27,8 @@ A fancy, easy-to-use and reactive docker `compose.yaml` stack-oriented manager.
<img src="https://github.com/louislam/dockge/assets/1336778/cc071864-592e-4909-b73a-343a57494002" width=300 />
![](https://github.com/louislam/dockge/assets/1336778/89fc1023-b069-42c0-a01c-918c495f1a6a)
## 🔧 How to Install
Requirements:
@ -97,6 +101,9 @@ docker compose up -d
## Screenshots
![](https://github.com/louislam/dockge/assets/1336778/e7ff0222-af2e-405c-b533-4eab04791b40)
![](https://github.com/louislam/dockge/assets/1336778/7139e88c-77ed-4d45-96e3-00b66d36d871)
![](https://github.com/louislam/dockge/assets/1336778/f019944c-0e87-405b-a1b8-625b35de1eeb)
@ -112,6 +119,10 @@ docker compose up -d
If you love this project, please consider giving this project a ⭐.
## 🗣️ Discussion / Ask for Help
Please go to https://github.com/louislam/dockge/discussions
## FAQ
#### "Dockge"?

View File

@ -86,8 +86,8 @@ export const TERMINAL_COLS = 105;
export const TERMINAL_ROWS = 10;
export const PROGRESS_TERMINAL_ROWS = 8;
export const COMBINED_TERMINAL_COLS = 56;
export const COMBINED_TERMINAL_ROWS = 15;
export const COMBINED_TERMINAL_COLS = 58;
export const COMBINED_TERMINAL_ROWS = 20;
export const ERROR_TYPE_VALIDATION = 1;

20
extra/env2arg.js Normal file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env node
import childProcess from "child_process";
let env = process.env;
let cmd = process.argv[2];
let args = process.argv.slice(3);
let replacedArgs = [];
for (let arg of args) {
for (let key in env) {
arg = arg.replaceAll(`$${key}`, env[key]);
}
replacedArgs.push(arg);
}
let child = childProcess.spawn(cmd, replacedArgs);
child.stdout.pipe(process.stdout);
child.stderr.pipe(process.stderr);

9
extra/test-docker.ts Normal file
View File

@ -0,0 +1,9 @@
// Check if docker is running
import { exec } from "child_process";
exec("docker ps", (err, stdout, stderr) => {
if (err) {
console.error("Docker is not running. Please start docker and try again.");
process.exit(1);
}
});

64
extra/update-version.ts Normal file
View File

@ -0,0 +1,64 @@
import pkg from "../package.json";
import childProcess from "child_process";
import fs from "fs";
const newVersion = process.env.VERSION;
console.log("New Version: " + newVersion);
if (! newVersion) {
console.error("invalid version");
process.exit(1);
}
const exists = tagExists(newVersion);
if (! exists) {
// Process package.json
pkg.version = newVersion;
fs.writeFileSync("package.json", JSON.stringify(pkg, null, 4) + "\n");
commit(newVersion);
tag(newVersion);
} else {
console.log("version exists");
}
/**
* Commit updated files
* @param {string} version Version to update to
*/
function commit(version) {
let msg = "Update to " + version;
let res = childProcess.spawnSync("git", [ "commit", "-m", msg, "-a" ]);
let stdout = res.stdout.toString().trim();
console.log(stdout);
if (stdout.includes("no changes added to commit")) {
throw new Error("commit error");
}
}
/**
* Create a tag with the specified version
* @param {string} version Tag to create
*/
function tag(version) {
let res = childProcess.spawnSync("git", [ "tag", version ]);
console.log(res.stdout.toString().trim());
}
/**
* Check if a tag exists for the specified version
* @param {string} version Version to check
* @returns {boolean} Does the tag already exist
*/
function tagExists(version) {
if (! version) {
throw new Error("invalid version");
}
let res = childProcess.spawnSync("git", [ "tag", "-l", version ]);
return res.stdout.toString().trim() === version;
}

View File

@ -77,8 +77,8 @@ export default {
}
this.terminal = new Terminal({
fontSize: 16,
fontFamily: "monospace",
fontSize: 14,
fontFamily: "'JetBrains Mono', monospace",
cursorBlink,
cols: this.cols,
rows: this.rows,

View File

@ -13,6 +13,7 @@ import Toast, { POSITION, useToast } from "vue-toastification";
import "xterm/lib/xterm.js";
// CSS
import "@fontsource/jetbrains-mono";
import "vue-toastification/dist/index.css";
import "xterm/css/xterm.css";
import "./styles/main.scss";
@ -22,6 +23,9 @@ import socket from "./mixins/socket";
import lang from "./mixins/lang";
import theme from "./mixins/theme";
// Set Title
document.title = document.title + " - " + location.host;
const app = createApp(rootApp());
app.use(Toast, {

View File

@ -592,6 +592,8 @@ export default {
}
.editor-box {
font-family: 'JetBrains Mono', monospace;
font-size: 14px;
&.edit-mode {
background-color: #2c2f38 !important;
}

View File

@ -227,5 +227,7 @@ table {
.docker-run {
background-color: $dark-bg !important;
border: none;
font-family: 'JetBrains Mono', monospace;
font-size: 15px;
}
</style>

View File

@ -1,6 +1,6 @@
{
"name": "dockge",
"version": "1.0.0",
"version": "1.0.1",
"type": "module",
"scripts": {
"fmt": "eslint \"**/*.{ts,vue}\" --fix",
@ -8,14 +8,16 @@
"start": "tsx ./backend/index.ts",
"dev:backend": "cross-env NODE_ENV=development tsx watch ./backend/index.ts",
"dev:frontend": "cross-env NODE_ENV=development vite --host --config ./frontend/vite.config.ts",
"release-final": "tsx ./extra/test-docker.ts && pnpm run build:frontend && tsx extra/update-version.ts && npm run build:docker",
"build:frontend": "vite build --config ./frontend/vite.config.ts",
"build:docker-base": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/dockge:base -f ./docker/Base.Dockerfile . --push",
"build:docker": "pnpm run build:frontend && docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/dockge:latest -t louislam/dockge:1 -t louislam/dockge:1.0.0 --target release -f ./docker/Dockerfile . --push",
"build:docker": "node ./extra/env2arg.js docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/dockge:latest -t louislam/dockge:1 -t louislam/dockge:$VERSION --target release -f ./docker/Dockerfile . --push",
"build:docker-nightly": "pnpm run build:frontend && docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/dockge:nightly --target nightly -f ./docker/Dockerfile . --push",
"start-docker": "docker run --rm -p 5001:5001 --name dockge louislam/dockge:latest",
"mark-as-nightly": "tsx ./extra/mark-as-nightly.ts"
},
"dependencies": {
"@fontsource/jetbrains-mono": "^5.0.17",
"@homebridge/node-pty-prebuilt-multiarch": "~0.11.10",
"@louislam/sqlite3": "~15.1.6",
"bcryptjs": "~2.4.3",

7
pnpm-lock.yaml generated
View File

@ -5,6 +5,9 @@ settings:
excludeLinksFromLockfile: false
dependencies:
'@fontsource/jetbrains-mono':
specifier: ^5.0.17
version: 5.0.17
'@homebridge/node-pty-prebuilt-multiarch':
specifier: ~0.11.10
version: 0.11.10
@ -466,6 +469,10 @@ packages:
- vue
dev: true
/@fontsource/jetbrains-mono@5.0.17:
resolution: {integrity: sha512-Y/EtdbwKwNQTGpnMrexX8SVW6Jqlh0nX2bNHI9Z9m6FsyjbocZIFNJqwSY9bDUoi7irGtz8nuidAN7FF8wYuJA==}
dev: false
/@fortawesome/fontawesome-common-types@6.4.2:
resolution: {integrity: sha512-1DgP7f+XQIJbLFCTX1V2QnxVmpLdKdzzo2k8EmvDOePfchaIGQ9eCHj2up3/jNEbZuBqel5OxiaOJf37TWauRA==}
engines: {node: '>=6'}