mirror of
https://github.com/louislam/dockge.git
synced 2025-08-13 14:47:17 +02:00
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
491059cebf |
72
.github/DISCUSSION_TEMPLATE/ask-for-help.yml
vendored
72
.github/DISCUSSION_TEMPLATE/ask-for-help.yml
vendored
@ -1,72 +0,0 @@
|
||||
title: "❓ Ask for help"
|
||||
labels:
|
||||
body:
|
||||
- type: checkboxes
|
||||
id: no-duplicate-issues
|
||||
attributes:
|
||||
label: "⚠️ Please verify that this bug has NOT been raised before."
|
||||
description: "Search in the issues sections by clicking [HERE](https://github.com/louislam/dockge/discussions/categories/ask-for-help)"
|
||||
options:
|
||||
- label: "I checked and didn't find similar issue"
|
||||
required: true
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: "🛡️ Security Policy"
|
||||
description: Please review the security policy before reporting security related issues/bugs.
|
||||
options:
|
||||
- label: I agree to have read this project [Security Policy](https://github.com/louislam/dockge/security/policy)
|
||||
required: true
|
||||
- type: textarea
|
||||
id: steps-to-reproduce
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: "📝 Describe your problem"
|
||||
description: "Please walk us through it step by step."
|
||||
placeholder: "Describe what are you asking for..."
|
||||
- type: textarea
|
||||
id: error-msg
|
||||
validations:
|
||||
required: false
|
||||
attributes:
|
||||
label: "📝 Error Message(s) or Log"
|
||||
- type: input
|
||||
id: dockge-version
|
||||
attributes:
|
||||
label: "🐻 Dockge Version"
|
||||
description: "Which version of Dockge are you running? Please do NOT provide the docker tag such as latest or 1"
|
||||
placeholder: "Ex. 1.10.0"
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: operating-system
|
||||
attributes:
|
||||
label: "💻 Operating System and Arch"
|
||||
description: "Which OS is your server/device running on? (For Replit, please do not report this bug)"
|
||||
placeholder: "Ex. Ubuntu 20.04 x86"
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: browser-vendor
|
||||
attributes:
|
||||
label: "🌐 Browser"
|
||||
description: "Which browser are you running on? (For Replit, please do not report this bug)"
|
||||
placeholder: "Ex. Google Chrome 95.0.4638.69"
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: docker-version
|
||||
attributes:
|
||||
label: "🐋 Docker Version"
|
||||
description: "If running with Docker, which version are you running?"
|
||||
placeholder: "Ex. Docker 20.10.9 / K8S / Podman"
|
||||
validations:
|
||||
required: false
|
||||
- type: input
|
||||
id: nodejs-version
|
||||
attributes:
|
||||
label: "🟩 NodeJS Version"
|
||||
description: "If running with Node.js? which version are you running?"
|
||||
placeholder: "Ex. 14.18.0"
|
||||
validations:
|
||||
required: false
|
55
.github/DISCUSSION_TEMPLATE/feature-request.yml
vendored
55
.github/DISCUSSION_TEMPLATE/feature-request.yml
vendored
@ -1,55 +0,0 @@
|
||||
title: 🚀 Feature Request
|
||||
labels: [feature-request]
|
||||
body:
|
||||
- type: checkboxes
|
||||
id: no-duplicate-issues
|
||||
attributes:
|
||||
label: "⚠️ Please verify that this feature request has NOT been suggested before."
|
||||
description: "Search in the issues sections by clicking [HERE](https://github.com/louislam/dockge/discussions/categories/feature-request)"
|
||||
options:
|
||||
- label: "I checked and didn't find similar feature request"
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: feature-area
|
||||
attributes:
|
||||
label: "🏷️ Feature Request Type"
|
||||
description: "What kind of feature request is this?"
|
||||
multiple: true
|
||||
options:
|
||||
- API
|
||||
- UI Feature
|
||||
- Other
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: feature-description
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: "🔖 Feature description"
|
||||
description: "A clear and concise description of what the feature request is."
|
||||
placeholder: "You should add ..."
|
||||
- type: textarea
|
||||
id: solution
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: "✔️ Solution"
|
||||
description: "A clear and concise description of what you want to happen."
|
||||
placeholder: "In my use-case, ..."
|
||||
- type: textarea
|
||||
id: alternatives
|
||||
validations:
|
||||
required: false
|
||||
attributes:
|
||||
label: "❓ Alternatives"
|
||||
description: "A clear and concise description of any alternative solutions or features you've considered."
|
||||
placeholder: "I have considered ..."
|
||||
- type: textarea
|
||||
id: additional-context
|
||||
validations:
|
||||
required: false
|
||||
attributes:
|
||||
label: "📝 Additional Context"
|
||||
description: "Add any other context or screenshots about the feature request here."
|
||||
placeholder: "..."
|
14
.github/ISSUE_TEMPLATE/ask-for-help.yaml
vendored
14
.github/ISSUE_TEMPLATE/ask-for-help.yaml
vendored
@ -1,14 +0,0 @@
|
||||
name: "❓ Ask for help"
|
||||
description: "Please go to the Discussions tab to submit a Help Request"
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Please go to https://github.com/louislam/dockge/discussions/new?category=ask-for-help
|
||||
- type: checkboxes
|
||||
id: no-duplicate-issues
|
||||
attributes:
|
||||
label: "Issues are for bug reports only"
|
||||
options:
|
||||
- label: "I understand"
|
||||
required: true
|
99
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
99
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
@ -1,99 +0,0 @@
|
||||
name: "🐛 Bug Report"
|
||||
description: "Submit a bug report to help us improve"
|
||||
#title: "[Bug] "
|
||||
labels: [bug]
|
||||
body:
|
||||
- type: checkboxes
|
||||
id: no-duplicate-issues
|
||||
attributes:
|
||||
label: "⚠️ Please verify that this bug has NOT been reported before."
|
||||
description: "Search in the issues sections by clicking [HERE](https://github.com/louislam/dockge/issues?q=)"
|
||||
options:
|
||||
- label: "I checked and didn't find similar issue"
|
||||
required: true
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: "🛡️ Security Policy"
|
||||
description: Please review the security policy before reporting security related issues/bugs.
|
||||
options:
|
||||
- label: I agree to have read this project [Security Policy](https://github.com/louislam/dockge/security/policy)
|
||||
required: true
|
||||
- type: textarea
|
||||
id: description
|
||||
validations:
|
||||
required: false
|
||||
attributes:
|
||||
label: "Description"
|
||||
description: "You could also upload screenshots"
|
||||
- type: textarea
|
||||
id: steps-to-reproduce
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: "👟 Reproduction steps"
|
||||
description: "How do you trigger this bug? Please walk us through it step by step."
|
||||
placeholder: "..."
|
||||
- type: textarea
|
||||
id: expected-behavior
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: "👀 Expected behavior"
|
||||
description: "What did you think would happen?"
|
||||
placeholder: "..."
|
||||
- type: textarea
|
||||
id: actual-behavior
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: "😓 Actual Behavior"
|
||||
description: "What actually happen?"
|
||||
placeholder: "..."
|
||||
- type: input
|
||||
id: dockge-version
|
||||
attributes:
|
||||
label: "Dockge Version"
|
||||
description: "Which version of Dockge are you running? Please do NOT provide the docker tag such as latest or 1"
|
||||
placeholder: "Ex. 1.1.1"
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: operating-system
|
||||
attributes:
|
||||
label: "💻 Operating System and Arch"
|
||||
description: "Which OS is your server/device running on?"
|
||||
placeholder: "Ex. Ubuntu 20.04 x64 "
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: browser-vendor
|
||||
attributes:
|
||||
label: "🌐 Browser"
|
||||
description: "Which browser are you running on?"
|
||||
placeholder: "Ex. Google Chrome 95.0.4638.69"
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: docker-version
|
||||
attributes:
|
||||
label: "🐋 Docker Version"
|
||||
description: "If running with Docker, which version are you running?"
|
||||
placeholder: "Ex. Docker 20.10.9 / K8S / Podman"
|
||||
validations:
|
||||
required: false
|
||||
- type: input
|
||||
id: nodejs-version
|
||||
attributes:
|
||||
label: "🟩 NodeJS Version"
|
||||
description: "If running with Node.js? which version are you running?"
|
||||
placeholder: "Ex. 14.18.0"
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: "📝 Relevant log output"
|
||||
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
|
||||
render: shell
|
||||
validations:
|
||||
required: false
|
14
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
14
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
@ -1,14 +0,0 @@
|
||||
name: 🚀 Feature Request
|
||||
description: "Please go to the Discussions tab to submit a Feature Request"
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Please go to https://github.com/louislam/dockge/discussions/new?category=feature-request
|
||||
- type: checkboxes
|
||||
id: no-duplicate-issues
|
||||
attributes:
|
||||
label: "Issues are for bug reports only"
|
||||
options:
|
||||
- label: "I understand"
|
||||
required: true
|
19
.github/ISSUE_TEMPLATE/security.md
vendored
19
.github/ISSUE_TEMPLATE/security.md
vendored
@ -1,19 +0,0 @@
|
||||
---
|
||||
|
||||
name: "Security Issue"
|
||||
about: "Just for alerting @louislam, do not provide any details here"
|
||||
title: "Security Issue"
|
||||
ref: "main"
|
||||
labels:
|
||||
|
||||
- security
|
||||
|
||||
---
|
||||
|
||||
DO NOT PROVIDE ANY DETAILS HERE. Please privately report to https://github.com/louislam/dockge/security/advisories/new.
|
||||
|
||||
|
||||
Why need this issue? It is because GitHub Advisory do not send a notification to @louislam, it is a workaround to do so.
|
||||
|
||||
Your GitHub Advisory URL:
|
||||
|
34
.github/PULL_REQUEST_TEMPLATE.md
vendored
34
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -1,34 +0,0 @@
|
||||
⚠️⚠️⚠️ Since we do not accept all types of pull requests and do not want to waste your time. Please be sure that you have read pull request rules:
|
||||
https://github.com/louislam/dockge/blob/master/CONTRIBUTING.md
|
||||
|
||||
Tick the checkbox if you understand [x]:
|
||||
- [ ] I have read and understand the pull request rules.
|
||||
|
||||
# Description
|
||||
|
||||
Fixes #(issue)
|
||||
|
||||
## Type of change
|
||||
|
||||
Please delete any options that are not relevant.
|
||||
|
||||
- Bug fix (non-breaking change which fixes an issue)
|
||||
- User interface (UI)
|
||||
- New feature (non-breaking change which adds functionality)
|
||||
- Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
||||
- Other
|
||||
- This change requires a documentation update
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] My code follows the style guidelines of this project
|
||||
- [ ] I ran ESLint and other linters for modified files
|
||||
- [ ] I have performed a self-review of my own code and tested it
|
||||
- [ ] I have commented my code, particularly in hard-to-understand areas
|
||||
(including JSDoc for methods)
|
||||
- [ ] My changes generate no new warnings
|
||||
- [ ] My code needed automated testing. I have added them (this is optional task)
|
||||
|
||||
## Screenshots (if any)
|
||||
|
||||
Please do not use any external image service. Instead, just paste in or drag and drop the image here, and it will be uploaded automatically.
|
1
.github/config/exclude.txt
vendored
1
.github/config/exclude.txt
vendored
@ -1 +0,0 @@
|
||||
# This is a .gitignore style file for 'GrantBirki/json-yaml-validate' Action workflow
|
25
.github/workflows/close-incorrect-issue.yml
vendored
25
.github/workflows/close-incorrect-issue.yml
vendored
@ -1,25 +0,0 @@
|
||||
name: Close Incorrect Issue
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
close-incorrect-issue:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
node-version: [16]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'npm'
|
||||
- run: npm ci
|
||||
- run: node extra/close-incorrect-issue.js ${{ secrets.GITHUB_TOKEN }} ${{ github.event.issue.number }} ${{ github.event.issue.user.login }}
|
27
.github/workflows/json-yaml-validate.yml
vendored
27
.github/workflows/json-yaml-validate.yml
vendored
@ -1,27 +0,0 @@
|
||||
name: json-yaml-validate
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- 2.0.X
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write # enable write permissions for pull request comments
|
||||
|
||||
jobs:
|
||||
json-yaml-validate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: json-yaml-validate
|
||||
id: json-yaml-validate
|
||||
uses: GrantBirki/json-yaml-validate@v1.3.0
|
||||
with:
|
||||
comment: "false" # enable comment mode
|
||||
exclude_file: ".github/config/exclude.txt" # gitignore style file for exclusions
|
139
CONTRIBUTING.md
139
CONTRIBUTING.md
@ -1,139 +0,0 @@
|
||||
## Can I create a pull request for Dockge?
|
||||
|
||||
Yes or no, it depends on what you will try to do. Since I don't want to waste your time, be sure to **create open a discussion, so we can have a discussion first**. Especially for a large pull request or you don't know if it will be merged or not.
|
||||
|
||||
Here are some references:
|
||||
|
||||
### ✅ Usually accepted:
|
||||
- Bug fix
|
||||
- Security fix
|
||||
- Translation
|
||||
|
||||
### ⚠️ Discussion required:
|
||||
- Large pull requests
|
||||
- New features
|
||||
|
||||
### ❌ Won't be merged:
|
||||
- Do not pass the auto-test
|
||||
- Any breaking changes
|
||||
- Duplicated pull requests
|
||||
- Buggy
|
||||
- UI/UX is not close to Dockge
|
||||
- Modifications or deletions of existing logic without a valid reason.
|
||||
- Adding functions that is completely out of scope
|
||||
- Converting existing code into other programming languages
|
||||
- Unnecessarily large code changes that are hard to review and cause conflicts with other PRs.
|
||||
|
||||
The above cases may not cover all possible situations.
|
||||
|
||||
I (@louislam) have the final say. If your pull request does not meet my expectations, I will reject it, no matter how much time you spend on it. Therefore, it is essential to have a discussion beforehand.
|
||||
|
||||
I will assign your pull request to a [milestone](https://github.com/louislam/dockge/milestones), if I plan to review and merge it.
|
||||
|
||||
Also, please don't rush or ask for an ETA, because I have to understand the pull request, make sure it is no breaking changes and stick to my vision of this project, especially for large pull requests.
|
||||
|
||||
## Project Styles
|
||||
|
||||
I personally do not like something that requires so many configurations before you can finally start the app.
|
||||
|
||||
- Settings should be configurable in the frontend. Environment variables are discouraged, unless it is related to startup such as `DOCKGE_STACKS_DIR`
|
||||
- Easy to use
|
||||
- The web UI styling should be consistent and nice
|
||||
- No native build dependency
|
||||
|
||||
## Coding Styles
|
||||
|
||||
- 4 spaces indentation
|
||||
- Follow `.editorconfig`
|
||||
- Follow ESLint
|
||||
- Methods and functions should be documented with JSDoc
|
||||
|
||||
## Name Conventions
|
||||
|
||||
- Javascript/Typescript: camelCaseType
|
||||
- SQLite: snake_case (Underscore)
|
||||
- CSS/SCSS: kebab-case (Dash)
|
||||
|
||||
## Tools
|
||||
|
||||
- [`Node.js`](https://nodejs.org/) >= 20
|
||||
- [`pnpm`](https://pnpm.io/)
|
||||
- [`git`](https://git-scm.com/)
|
||||
- IDE that supports [`ESLint`](https://eslint.org/) and EditorConfig (I am using [`IntelliJ IDEA`](https://www.jetbrains.com/idea/))
|
||||
- A SQLite GUI tool (f.ex. [`SQLite Expert Personal`](https://www.sqliteexpert.com/download.html) or [`DBeaver Community`](https://dbeaver.io/download/))
|
||||
|
||||
## Install Dependencies for Development
|
||||
|
||||
```bash
|
||||
pnpm install
|
||||
```
|
||||
|
||||
## Dev Server
|
||||
|
||||
```
|
||||
pnpm run dev:frontend
|
||||
pnpm run dev:backend
|
||||
```
|
||||
|
||||
## Backend Dev Server
|
||||
|
||||
It binds to `0.0.0.0:5001` by default.
|
||||
|
||||
It is mainly a socket.io app + express.js.
|
||||
|
||||
## Frontend Dev Server
|
||||
|
||||
It binds to `0.0.0.0:5000` by default. The frontend dev server is used for development only.
|
||||
|
||||
For production, it is not used. It will be compiled to `frontend-dist` directory instead.
|
||||
|
||||
You can use Vue.js devtools Chrome extension for debugging.
|
||||
|
||||
### Build the frontend
|
||||
|
||||
```bash
|
||||
pnpm run build
|
||||
```
|
||||
|
||||
## Database Migration
|
||||
|
||||
TODO
|
||||
|
||||
## Dependencies
|
||||
|
||||
Both frontend and backend share the same package.json. However, the frontend dependencies are eventually not used in the production environment, because it is usually also baked into dist files. So:
|
||||
|
||||
- Frontend dependencies = "devDependencies"
|
||||
- Examples: vue, chart.js
|
||||
- Backend dependencies = "dependencies"
|
||||
- Examples: socket.io, sqlite3
|
||||
- Development dependencies = "devDependencies"
|
||||
- Examples: eslint, sass
|
||||
|
||||
### Update Dependencies
|
||||
|
||||
Should only be done by the maintainer.
|
||||
|
||||
```bash
|
||||
pnpm update
|
||||
````
|
||||
|
||||
It should update the patch release version only.
|
||||
|
||||
Patch release = the third digit ([Semantic Versioning](https://semver.org/))
|
||||
|
||||
If for security / bug / other reasons, a library must be updated, breaking changes need to be checked by the person proposing the change.
|
||||
|
||||
## Translations
|
||||
|
||||
Please add **all** the strings which are translatable to `src/lang/en.json` (If translation keys are omitted, they can not be translated).
|
||||
|
||||
**Don't include any other languages in your initial Pull-Request** (even if this is your mother tongue), to avoid merge-conflicts between weblate and `master`.
|
||||
The translations can then (after merging a PR into `master`) be translated by awesome people donating their language skills.
|
||||
|
||||
If you want to help by translating Uptime Kuma into your language, please visit the [instructions on how to translate using weblate](https://github.com/louislam/uptime-kuma/blob/master/src/lang/README.md).
|
||||
|
||||
## Spelling & Grammar
|
||||
|
||||
Feel free to correct the grammar in the documentation or code.
|
||||
My mother language is not English and my grammar is not that great.
|
@ -6,7 +6,7 @@
|
||||
|
||||
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="" />
|
||||
|
||||
|
12
SECURITY.md
12
SECURITY.md
@ -1,12 +0,0 @@
|
||||
# Security Policy
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
1. Please report security issues to https://github.com/louislam/dockge/security/advisories/new.
|
||||
1. Please also create an empty security issue to alert me, as GitHub Advisories do not send a notification, I probably will miss it without this. https://github.com/louislam/dockge/issues/new?assignees=&labels=help&template=security.md
|
||||
|
||||
Do not use the public issue tracker or discuss it in public as it will cause more damage.
|
||||
|
||||
## Do you accept other 3rd-party bug bounty platforms?
|
||||
|
||||
At this moment, I DO NOT accept other bug bounty platforms, because I am not familiar with these platforms and someone has tried to send a phishing link to me by doing this already. To minimize my own risk, please report through GitHub Advisories only. I will ignore all 3rd-party bug bounty platforms emails.
|
@ -103,10 +103,6 @@ class Logger {
|
||||
* @param level Log level. One of INFO, WARN, ERROR, DEBUG or can be customized.
|
||||
*/
|
||||
log(module: string, msg: unknown, level: string) {
|
||||
if (level === "DEBUG" && !isDev) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.hideLog[level] && this.hideLog[level].includes(module.toLowerCase())) {
|
||||
return;
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ export class DockerSocketHandler extends SocketHandler {
|
||||
throw new ValidationError("Stack name must be a string");
|
||||
}
|
||||
|
||||
const stack = Stack.getStack(server, stackName, true);
|
||||
const stack = Stack.getStack(server, stackName);
|
||||
const serviceStatusList = Object.fromEntries(await stack.getServiceStatusList());
|
||||
callback({
|
||||
ok: true,
|
||||
|
@ -31,12 +31,11 @@ export class Stack {
|
||||
|
||||
protected static managedStackList: Map<string, Stack> = new Map();
|
||||
|
||||
constructor(server : DockgeServer, name : string, composeYAML? : string, skipFSOperations = false) {
|
||||
constructor(server : DockgeServer, name : string, composeYAML? : string) {
|
||||
this.name = name;
|
||||
this.server = server;
|
||||
this._composeYAML = composeYAML;
|
||||
|
||||
if (!skipFSOperations) {
|
||||
// Check if compose file name is different from compose.yaml
|
||||
const supportedFileNames = [ "compose.yaml", "compose.yml", "docker-compose.yml", "docker-compose.yaml" ];
|
||||
for (const filename of supportedFileNames) {
|
||||
@ -46,7 +45,6 @@ export class Stack {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
toJSON() : object {
|
||||
let obj = this.toSimpleJSON();
|
||||
@ -283,13 +281,12 @@ export class Stack {
|
||||
}
|
||||
}
|
||||
|
||||
static getStack(server: DockgeServer, stackName: string, skipFSOperations = false) : Stack {
|
||||
static getStack(server: DockgeServer, stackName: string) : Stack {
|
||||
let dir = path.join(server.stacksDir, stackName);
|
||||
|
||||
if (!skipFSOperations) {
|
||||
if (!fs.existsSync(dir) || !fs.statSync(dir).isDirectory()) {
|
||||
// Maybe it is a stack managed by docker compose directly
|
||||
let stackList = this.getStackList(server, true);
|
||||
let stackList = this.getStackList(server);
|
||||
let stack = stackList.get(stackName);
|
||||
|
||||
if (stack) {
|
||||
@ -299,18 +296,8 @@ export class Stack {
|
||||
throw new ValidationError("Stack not found");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
log.debug("getStack", "Skip FS operations");
|
||||
}
|
||||
|
||||
let stack : Stack;
|
||||
|
||||
if (!skipFSOperations) {
|
||||
stack = new Stack(server, stackName);
|
||||
} else {
|
||||
stack = new Stack(server, stackName, undefined, true);
|
||||
}
|
||||
|
||||
let stack = new Stack(server, stackName);
|
||||
stack._status = UNKNOWN;
|
||||
stack._configFilePath = path.resolve(dir);
|
||||
return stack;
|
||||
@ -399,11 +386,11 @@ export class Stack {
|
||||
async getServiceStatusList() {
|
||||
let statusList = new Map<string, number>();
|
||||
|
||||
let res = childProcess.spawnSync("docker", [ "compose", "ps", "--format", "json" ], {
|
||||
let res = childProcess.execSync("docker compose ps --format json", {
|
||||
cwd: this.path,
|
||||
});
|
||||
|
||||
let lines = res.stdout.toString().split("\n");
|
||||
let lines = res.toString().split("\n");
|
||||
|
||||
for (let line of lines) {
|
||||
try {
|
||||
|
@ -80,7 +80,6 @@ export class Terminal {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
this._ptyProcess = pty.spawn(this.file, this.args, {
|
||||
name: this.name,
|
||||
cwd: this.cwd,
|
||||
@ -97,23 +96,7 @@ export class Terminal {
|
||||
});
|
||||
|
||||
// On Exit
|
||||
this._ptyProcess.onExit(this.exit);
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
log.error("Terminal", "Failed to start terminal: " + error.message);
|
||||
const exitCode = Number(error.message.split(" ").pop());
|
||||
this.exit({
|
||||
exitCode,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Exit event handler
|
||||
* @param res
|
||||
*/
|
||||
protected exit = (res : {exitCode: number, signal?: number | undefined}) => {
|
||||
this._ptyProcess.onExit((res) => {
|
||||
this.server.io.to(this.name).emit("terminalExit", this.name, res.exitCode);
|
||||
|
||||
// Remove room
|
||||
@ -125,7 +108,8 @@ export class Terminal {
|
||||
if (this.callback) {
|
||||
this.callback(res.exitCode);
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
public onExit(callback : (exitCode : number) => void) {
|
||||
this.callback = callback;
|
||||
|
@ -1,57 +0,0 @@
|
||||
const github = require("@actions/github");
|
||||
|
||||
(async () => {
|
||||
try {
|
||||
const token = process.argv[2];
|
||||
const issueNumber = process.argv[3];
|
||||
const username = process.argv[4];
|
||||
|
||||
const client = github.getOctokit(token).rest;
|
||||
|
||||
const issue = {
|
||||
owner: "louislam",
|
||||
repo: "dockge",
|
||||
number: issueNumber,
|
||||
};
|
||||
|
||||
const labels = (
|
||||
await client.issues.listLabelsOnIssue({
|
||||
owner: issue.owner,
|
||||
repo: issue.repo,
|
||||
issue_number: issue.number
|
||||
})
|
||||
).data.map(({ name }) => name);
|
||||
|
||||
if (labels.length === 0) {
|
||||
console.log("Bad format here");
|
||||
|
||||
await client.issues.addLabels({
|
||||
owner: issue.owner,
|
||||
repo: issue.repo,
|
||||
issue_number: issue.number,
|
||||
labels: [ "invalid-format" ]
|
||||
});
|
||||
|
||||
// Add the issue closing comment
|
||||
await client.issues.createComment({
|
||||
owner: issue.owner,
|
||||
repo: issue.repo,
|
||||
issue_number: issue.number,
|
||||
body: `@${username}: Hello! :wave:\n\nThis issue is being automatically closed because it does not follow the issue template. Please DO NOT open a blank issue.`
|
||||
});
|
||||
|
||||
// Close the issue
|
||||
await client.issues.update({
|
||||
owner: issue.owner,
|
||||
repo: issue.repo,
|
||||
issue_number: issue.number,
|
||||
state: "closed"
|
||||
});
|
||||
} else {
|
||||
console.log("Pass!");
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
|
||||
})();
|
@ -1,42 +0,0 @@
|
||||
// Generate on GitHub
|
||||
const input = `
|
||||
* Add Korean translation by @Alanimdeo in https://github.com/louislam/dockge/pull/86
|
||||
`;
|
||||
|
||||
const template = `
|
||||
### 🆕 New Features
|
||||
|
||||
### Improvements
|
||||
|
||||
### 🐞 Bug Fixes
|
||||
|
||||
### 🦎 Translation Contributions
|
||||
|
||||
### Others
|
||||
- Other small changes, code refactoring and comment/doc updates in this repo:
|
||||
`;
|
||||
|
||||
const lines = input.split("\n").filter((line) => line.trim() !== "");
|
||||
|
||||
for (const line of lines) {
|
||||
// Split the last " by "
|
||||
const usernamePullRequesURL = line.split(" by ").pop();
|
||||
|
||||
if (!usernamePullRequesURL) {
|
||||
console.log("Unable to parse", line);
|
||||
continue;
|
||||
}
|
||||
|
||||
const [ username, pullRequestURL ] = usernamePullRequesURL.split(" in ");
|
||||
const pullRequestID = "#" + pullRequestURL.split("/").pop();
|
||||
let message = line.split(" by ").shift();
|
||||
|
||||
if (!message) {
|
||||
console.log("Unable to parse", line);
|
||||
continue;
|
||||
}
|
||||
|
||||
message = message.split("* ").pop();
|
||||
console.log("-", pullRequestID, message, `(Thanks ${username})`);
|
||||
}
|
||||
console.log(template);
|
@ -45,8 +45,6 @@ export default {
|
||||
<style scoped>
|
||||
.badge {
|
||||
min-width: 62px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.fixed-width {
|
||||
|
@ -7,14 +7,12 @@ const languageList = {
|
||||
"es": "Español",
|
||||
"de": "Deutsch",
|
||||
"fr": "Français",
|
||||
"pl-PL": "Polski",
|
||||
"pt": "Português",
|
||||
"sl": "Slovenščina",
|
||||
"tr": "Türkçe",
|
||||
"zh-CN": "简体中文",
|
||||
"ur": "Urdu",
|
||||
"ko-KR": "한국어",
|
||||
"ru": "Русский"
|
||||
"ru": "Русский",
|
||||
};
|
||||
|
||||
let messages = {
|
||||
|
@ -1,94 +0,0 @@
|
||||
{
|
||||
"languageName": "Polski",
|
||||
"Create your admin account": "Utwórz konto administratora",
|
||||
"authIncorrectCreds": "Nieprawidłowa nazwa użytkownika lub hasło.",
|
||||
"PasswordsDoNotMatch": "Hasła nie pasują do siebie.",
|
||||
"Repeat Password": "Powtórz hasło",
|
||||
"Create": "Utwórz",
|
||||
"signedInDisp": "Zalogowany jako {0}",
|
||||
"signedInDispDisabled": "Autoryzacja wyłączona.",
|
||||
"home": "Strona główna",
|
||||
"console": "Konsola",
|
||||
"registry": "Rejestr",
|
||||
"compose": "Stwórz",
|
||||
"addFirstStackMsg": "Stwórz swój pierwszy stos!",
|
||||
"stackName" : "Nazwa stosu",
|
||||
"deployStack": "Wdroż",
|
||||
"deleteStack": "Usuń",
|
||||
"stopStack": "Zatrzymaj",
|
||||
"restartStack": "Uruchom ponownie",
|
||||
"updateStack": "Aktualizuj",
|
||||
"startStack": "Uruchom",
|
||||
"editStack": "Edytuj",
|
||||
"discardStack": "Odrzuć",
|
||||
"saveStackDraft": "Zapisz",
|
||||
"notAvailableShort" : "N/A",
|
||||
"deleteStackMsg": "Czy na pewno chcesz usunąć ten stos?",
|
||||
"stackNotManagedByDockgeMsg": "Ten stos nie jest zarządzany przez Dockge.",
|
||||
"primaryHostname": "Podstawowa nazwa hosta",
|
||||
"general": "Ogólne",
|
||||
"container": "Kontener | Kontenery",
|
||||
"scanFolder": "Skanuj folder ze stosami",
|
||||
"dockerImage": "Obraz",
|
||||
"restartPolicyUnlessStopped": "Jeśli nie zatrzymano",
|
||||
"restartPolicyAlways": "Zawsze",
|
||||
"restartPolicyOnFailure": "Po awarii",
|
||||
"restartPolicyNo": "Nie restartuj",
|
||||
"environmentVariable": "Zmienna środowiskowa | Zmienne środowiskowe",
|
||||
"restartPolicy": "Polityka restartu",
|
||||
"containerName": "Nazwa kontenera",
|
||||
"port": "Port | Porty",
|
||||
"volume": "Wolumin | Woluminy",
|
||||
"network": "Sieć | Sieci",
|
||||
"dependsOn": "Zależność kontenera | Zależności kontenera",
|
||||
"addListItem": "Dodaj {0}",
|
||||
"deleteContainer": "Usuń kontener",
|
||||
"addContainer": "Dodaj kontener",
|
||||
"addNetwork": "Dodaj sieć",
|
||||
"disableauth.message1": "Czy na pewno chcesz <strong>wyłączyć uwierzytelnianie</strong>?",
|
||||
"disableauth.message2": "Przeznaczone dla sytuacji, <strong>w których zamierzasz zaimplementować zewnętrzne mechanizmy uwierzytelniania</strong> przed Dockge, takie jak Cloudflare Access, Authelia lub inne.",
|
||||
"passwordNotMatchMsg": "Hasła się nie zgadzają.",
|
||||
"autoGet": "Automatyczne pobieranie",
|
||||
"add": "Dodaj",
|
||||
"Edit": "Edytuj",
|
||||
"applyToYAML": "Zastosuj do YAML",
|
||||
"createExternalNetwork": "Utwórz",
|
||||
"addInternalNetwork": "Dodaj",
|
||||
"Save": "Zapisz",
|
||||
"Language": "Język",
|
||||
"Current User": "Aktualny użytkownik",
|
||||
"Change Password": "Zmień hasło",
|
||||
"Current Password": "Aktualne hasło",
|
||||
"New Password": "Nowe hasło",
|
||||
"Repeat New Password": "Powtórz nowe hasło",
|
||||
"Update Password": "Aktualizuj hasło",
|
||||
"Advanced": "Zaawansowane",
|
||||
"Please use this option carefully!": "Proszę używać tej opcji ostrożnie!",
|
||||
"Enable Auth": "Włącz autoryzację",
|
||||
"Disable Auth": "Wyłącz autoryzację",
|
||||
"I understand, please disable": "Rozumiem, proszę wyłączyć",
|
||||
"Leave": "Wyjdź",
|
||||
"Frontend Version": "Wersja interfejsu graficznego",
|
||||
"Check Update On GitHub": "Sprawdź dostępność aktualizacji na GitHub",
|
||||
"Show update if available": "Pokaż aktualizacje, jeśli są dostępne",
|
||||
"Also check beta release": "Sprawdź także wersje beta",
|
||||
"Remember me": "Zapamiętaj mnie",
|
||||
"Login": "Zaloguj się",
|
||||
"Username": "Nazwa użytkownika",
|
||||
"Password": "Hasło",
|
||||
"Settings": "Ustawienia",
|
||||
"Logout": "Wyloguj się",
|
||||
"Lowercase only": "Tylko małe litery",
|
||||
"Convert to Compose": "Przekształć na składnię Compose",
|
||||
"Docker Run": "Uruchom za pomocą Dockera",
|
||||
"active": "aktywny",
|
||||
"exited": "wyłączony",
|
||||
"inactive": "nieaktywny",
|
||||
"Appearance": "Wygląd",
|
||||
"Security": "Bezpieczeństwo",
|
||||
"About": "O programie",
|
||||
"Allowed commands:": "Dozwolone polecenia:",
|
||||
"Internal Networks": "Sieci wewnętrzne",
|
||||
"External Networks": "Sieci zewnętrzne",
|
||||
"No External Networks": "Brak sieci zewnętrznych"
|
||||
}
|
@ -1,94 +0,0 @@
|
||||
{
|
||||
"languageName": "Slovenščina",
|
||||
"Create your admin account": "Ustvarite svoj skrbniški račun",
|
||||
"authIncorrectCreds": "Napačno uporabniško ime ali geslo.",
|
||||
"PasswordsDoNotMatch": "Gesli se ne ujemata.",
|
||||
"Repeat Password": "Ponovi geslo",
|
||||
"Create": "Ustvari",
|
||||
"signedInDisp": "Prijavljeni kot {0}",
|
||||
"signedInDispDisabled": "Preverjanje pristnosti onemogočeno.",
|
||||
"home": "Domov",
|
||||
"console": "Konzola",
|
||||
"registry": "Register",
|
||||
"compose": "Compose",
|
||||
"addFirstStackMsg": "Ustvarite svoj prvi Stack!",
|
||||
"stackName": "Ime Stack-a",
|
||||
"deployStack": "Razporedi",
|
||||
"deleteStack": "Izbriši",
|
||||
"stopStack": "Ustavi",
|
||||
"restartStack": "Ponovni zagon",
|
||||
"updateStack": "Posodobi",
|
||||
"startStack": "Zaženi",
|
||||
"editStack": "Uredi",
|
||||
"discardStack": "Zavrzi",
|
||||
"saveStackDraft": "Shrani",
|
||||
"notAvailableShort": "Ni na voljo",
|
||||
"deleteStackMsg": "Ste prepričani, da želite izbrisati ta Stack?",
|
||||
"stackNotManagedByDockgeMsg": "Ta Stack ni upravljan s strani Dockge.",
|
||||
"primaryHostname": "Osnovno gostiteljsko ime",
|
||||
"general": "Splošno",
|
||||
"container": "Kontejner | Kontejnerji",
|
||||
"scanFolder": "Preglej Stack mapo",
|
||||
"dockerImage": "Slika",
|
||||
"restartPolicyUnlessStopped": "Razen ko je zaustavljeno",
|
||||
"restartPolicyAlways": "Vedno",
|
||||
"restartPolicyOnFailure": "Ob napaki",
|
||||
"restartPolicyNo": "Ne",
|
||||
"environmentVariable": "Okoljska spremenljivka | Okoljske spremenljivke",
|
||||
"restartPolicy": "Politika ponovnega zagona",
|
||||
"containerName": "Ime kontejnerja",
|
||||
"port": "Vrata | Vrata",
|
||||
"volume": "Zvezek | Zvezki",
|
||||
"network": "Omrežje | Omrežja",
|
||||
"dependsOn": "Odvisnost kontejnerja | Odvisnosti kontejnerjev",
|
||||
"addListItem": "Dodaj {0}",
|
||||
"deleteContainer": "Izbriši",
|
||||
"addContainer": "Dodaj kontejner",
|
||||
"addNetwork": "Dodaj omrežje",
|
||||
"disableauth.message1": "Ste prepričani, da želite <strong>onemogočiti overjanje</strong>?",
|
||||
"disableauth.message2": "Namerno je zasnovano za scenarije, <strong>kjer nameravate izvajati avtentikacijo tretjih oseb</strong> pred Dockge, kot so Cloudflare Access, Authelia ali druge avtentikacijske mehanizme.",
|
||||
"passwordNotMatchMsg": "Ponovljeno geslo se ne ujema.",
|
||||
"autoGet": "Samodejno pridobi",
|
||||
"add": "Dodaj",
|
||||
"Edit": "Uredi",
|
||||
"applyToYAML": "Uporabi za YAML",
|
||||
"createExternalNetwork": "Ustvari",
|
||||
"addInternalNetwork": "Dodaj",
|
||||
"Save": "Shrani",
|
||||
"Language": "Jezik",
|
||||
"Current User": "Trenutni uporabnik",
|
||||
"Change Password": "Spremeni geslo",
|
||||
"Current Password": "Trenutno geslo",
|
||||
"New Password": "Novo geslo",
|
||||
"Repeat New Password": "Ponovi novo geslo",
|
||||
"Update Password": "Posodobi geslo",
|
||||
"Advanced": "Napredno",
|
||||
"Please use this option carefully!": "Prosimo, uporabite to možnost previdno!",
|
||||
"Enable Auth": "Omogoči overjanje",
|
||||
"Disable Auth": "Onemogoči overjanje",
|
||||
"I understand, please disable": "Razumem, prosim onemogočite",
|
||||
"Leave": "Zapusti",
|
||||
"Frontend Version": "Različica vmesnika",
|
||||
"Check Update On GitHub": "Preveri posodobitve na GitHubu",
|
||||
"Show update if available": "Prikaži posodobitve, če so na voljo",
|
||||
"Also check beta release": "Preveri tudi beta izdaje",
|
||||
"Remember me": "Zapomni si me",
|
||||
"Login": "Prijava",
|
||||
"Username": "Uporabniško ime",
|
||||
"Password": "Geslo",
|
||||
"Settings": "Nastavitve",
|
||||
"Logout": "Odjava",
|
||||
"Lowercase only": "Samo male črke",
|
||||
"Convert to Compose": "Pretvori v Compose",
|
||||
"Docker Run": "Zagon Dockerja",
|
||||
"active": "aktivno",
|
||||
"exited": "izklopljeno",
|
||||
"inactive": "neaktivno",
|
||||
"Appearance": "Videz",
|
||||
"Security": "Varnost",
|
||||
"About": "O nas",
|
||||
"Allowed commands:": "Dovoljeni ukazi:",
|
||||
"Internal Networks": "Notranja omrežja",
|
||||
"External Networks": "Zunanja omrežja",
|
||||
"No External Networks": "Ni zunanjih omrežij"
|
||||
}
|
@ -1,10 +1,7 @@
|
||||
{
|
||||
"languageName": "Türkçe",
|
||||
"Create your admin account": "Yönetici hesabınızı oluşturun",
|
||||
"authIncorrectCreds": "Yanlış kullanıcı adı veya parola.",
|
||||
"PasswordsDoNotMatch": "Parolalar eşleşmiyor.",
|
||||
"Repeat Password": "Parolayı Tekrarla",
|
||||
"Create": "Oluştur",
|
||||
"signedInDisp": "{0} olarak oturum açıldı",
|
||||
"signedInDispDisabled": "Yetkilendirme Devre Dışı.",
|
||||
"home": "Anasayfa",
|
||||
@ -50,45 +47,7 @@
|
||||
"passwordNotMatchMsg": "Tekrarlanan parola eşleşmiyor.",
|
||||
"autoGet": "Otomatik Al",
|
||||
"add": "Ekle",
|
||||
"Edit": "Düzenle",
|
||||
"applyToYAML": "YAML'ye uygulayın",
|
||||
"createExternalNetwork": "Oluştur",
|
||||
"addInternalNetwork": "Ekle",
|
||||
"Save": "Kaydet",
|
||||
"Language": "Dil",
|
||||
"Current User": "Mevcut Kullanıcı",
|
||||
"Change Password": "Mevcut Parola",
|
||||
"Current Password": "Mevcut Parola",
|
||||
"New Password": "Yeni Parola",
|
||||
"Repeat New Password": "Yeni Parolayı Tekrarla",
|
||||
"Update Password": "Parolayı Güncelle",
|
||||
"Advanced": "Gelişmiş",
|
||||
"Please use this option carefully!": "Lütfen bu seçeneği dikkatli kullanın!",
|
||||
"Enable Auth": "Kimlik Doğrulamayı Etkinleştir",
|
||||
"Disable Auth": "Kimlik Doğrulamayı Devre Dışı Bırak",
|
||||
"I understand, please disable": "Anlıyorum, lütfen devre dışı bırakın",
|
||||
"Leave": "Ayrıl",
|
||||
"Frontend Version": "Frontend Versiyon",
|
||||
"Check Update On GitHub": "GitHub'da Güncellemeyi Kontrol Edin",
|
||||
"Show update if available": "Varsa güncellemeyi göster",
|
||||
"Also check beta release": "Ayrıca beta sürümünü kontrol edin",
|
||||
"Remember me": "Beni Hatırla",
|
||||
"Login": "Oturum Aç",
|
||||
"Username": "Kullanıcı Adı",
|
||||
"Password": "Parola",
|
||||
"Settings": "Ayarlar",
|
||||
"Logout": "Oturumu Kapat",
|
||||
"Lowercase only": "Yalnızca küçük harf",
|
||||
"Convert to Compose": "Compose'a Dönüştür",
|
||||
"Docker Run": "Docker Run",
|
||||
"active": "aktif",
|
||||
"exited": "çıkış yaptı",
|
||||
"inactive": "aktif değil",
|
||||
"Appearance": "Görünüm",
|
||||
"Security": "Güvenlik",
|
||||
"About": "Hakkında",
|
||||
"Allowed commands:": "İzin verilen komutlar:",
|
||||
"Internal Networks": "İç Ağlar",
|
||||
"External Networks": "Dış Ağlar",
|
||||
"No External Networks": "Dış Ağ Yok"
|
||||
"addInternalNetwork": "Ekle"
|
||||
}
|
||||
|
@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "dockge",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"fmt": "eslint \"**/*.{ts,vue}\" --fix",
|
||||
"lint": "eslint \"**/*.{ts,vue}\"",
|
||||
"check-ts": "tsc --noEmit",
|
||||
"start": "tsx ./backend/index.ts",
|
||||
"dev:backend": "cross-env NODE_ENV=development tsx watch --inspect ./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 && tsx extra/update-version.ts && pnpm run build:frontend && npm run build:docker",
|
||||
"build:frontend": "vite build --config ./frontend/vite.config.ts",
|
||||
@ -15,8 +15,7 @@
|
||||
"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",
|
||||
"reformat-changelog": "tsx ./extra/reformat-changelog.ts"
|
||||
"mark-as-nightly": "tsx ./extra/mark-as-nightly.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@homebridge/node-pty-prebuilt-multiarch": "~0.11.11",
|
||||
|
@ -8,5 +8,5 @@
|
||||
},
|
||||
"include": [
|
||||
"backend/**/*"
|
||||
]
|
||||
],
|
||||
}
|
||||
|
Reference in New Issue
Block a user