mirror of
https://github.com/louislam/dockge.git
synced 2025-08-13 23:38:35 +02:00
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
8d69488937 |
52
.github/workflows/ci.yml
vendored
52
.github/workflows/ci.yml
vendored
@ -1,52 +0,0 @@
|
|||||||
name: Node.js CI - Dockge
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [master]
|
|
||||||
paths-ignore:
|
|
||||||
- '*.md'
|
|
||||||
pull_request:
|
|
||||||
branches: [master]
|
|
||||||
paths-ignore:
|
|
||||||
- '*.md'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
ci:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
||||||
node: [18.x, 20.x] # Can be changed
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout Code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: ${{matrix.node}}
|
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v2
|
|
||||||
name: Install pnpm
|
|
||||||
with:
|
|
||||||
version: 8
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
|
||||||
path: ${{ env.STORE_PATH }}
|
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install
|
|
||||||
|
|
||||||
# more things can be add later like tests etc..
|
|
||||||
|
|
12
README.md
12
README.md
@ -68,6 +68,8 @@ Dockge is now running on http://localhost:5001
|
|||||||
|
|
||||||
If you want to store your stacks in another directory, you can change the `DOCKGE_STACKS_DIR` environment variable and volumes.
|
If you want to store your stacks in another directory, you can change the `DOCKGE_STACKS_DIR` environment variable and volumes.
|
||||||
|
|
||||||
|
For example, if you want to store your stacks in `/my-stacks`:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
version: "3.8"
|
version: "3.8"
|
||||||
services:
|
services:
|
||||||
@ -84,14 +86,12 @@ services:
|
|||||||
# If you want to use private registries, you need to share the auth file with Dockge:
|
# If you want to use private registries, you need to share the auth file with Dockge:
|
||||||
# - /root/.docker/:/root/.docker
|
# - /root/.docker/:/root/.docker
|
||||||
|
|
||||||
# Your stacks directory in the host (The paths inside container must be the same as the host)
|
# Your stacks directory in the host
|
||||||
# ⚠️⚠️ If you did it wrong, your data could end up be written into a wrong path.
|
# (The paths inside container must be the same as the host)
|
||||||
# ✔️✔️✔️✔️ CORRECT EXAMPLE: - /my-stacks:/my-stacks (Both paths match)
|
- /my-stacks:/my-stacks
|
||||||
# ❌❌❌❌ WRONG EXAMPLE: - /docker:/my-stacks (Both paths do not match)
|
|
||||||
- /opt/stacks:/opt/stacks
|
|
||||||
environment:
|
environment:
|
||||||
# Tell Dockge where is your stacks directory
|
# Tell Dockge where is your stacks directory
|
||||||
- DOCKGE_STACKS_DIR=/opt/stacks
|
- DOCKGE_STACKS_DIR=/my-stacks
|
||||||
```
|
```
|
||||||
|
|
||||||
## How to Update
|
## How to Update
|
||||||
|
@ -149,7 +149,7 @@ export class Stack {
|
|||||||
|
|
||||||
async delete(socket?: DockgeSocket) : Promise<number> {
|
async delete(socket?: DockgeSocket) : Promise<number> {
|
||||||
const terminalName = getComposeTerminalName(this.name);
|
const terminalName = getComposeTerminalName(this.name);
|
||||||
let exitCode = await Terminal.exec(this.server, socket, terminalName, "docker", [ "compose", "down", "--remove-orphans" ], this.path);
|
let exitCode = await Terminal.exec(this.server, socket, terminalName, "docker", [ "compose", "down", "--remove-orphans", "all" ], this.path);
|
||||||
if (exitCode !== 0) {
|
if (exitCode !== 0) {
|
||||||
throw new Error("Failed to delete, please check the terminal output for more information.");
|
throw new Error("Failed to delete, please check the terminal output for more information.");
|
||||||
}
|
}
|
||||||
|
10
compose.yaml
10
compose.yaml
@ -7,16 +7,14 @@ services:
|
|||||||
# Host Port : Container Port
|
# Host Port : Container Port
|
||||||
- 5001:5001
|
- 5001:5001
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
- ./data:/app/data
|
|
||||||
|
|
||||||
# If you want to use private registries, you need to share the auth file with Dockge:
|
# If you want to use private registries, you need to share the auth file with Dockge:
|
||||||
# - /root/.docker/:/root/.docker
|
# - /root/.docker/:/root/.docker
|
||||||
|
|
||||||
|
# Docker Socket
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
# Dockge Config
|
||||||
|
- ./data:/app/data
|
||||||
# Your stacks directory in the host (The paths inside container must be the same as the host)
|
# Your stacks directory in the host (The paths inside container must be the same as the host)
|
||||||
# ⚠️⚠️ If you did it wrong, your data could end up be written into a wrong path.
|
|
||||||
# ✔️✔️✔️✔️ CORRECT: - /my-stacks:/my-stacks (Both paths match)
|
|
||||||
# ❌❌❌❌ WRONG: - /docker:/my-stacks (Both paths do not match)
|
|
||||||
- /opt/stacks:/opt/stacks
|
- /opt/stacks:/opt/stacks
|
||||||
environment:
|
environment:
|
||||||
# Tell Dockge where is your stacks directory
|
# Tell Dockge where is your stacks directory
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dockge",
|
"name": "dockge",
|
||||||
"version": "1.0.4",
|
"version": "1.0.3",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"fmt": "eslint \"**/*.{ts,vue}\" --fix",
|
"fmt": "eslint \"**/*.{ts,vue}\" --fix",
|
||||||
|
Reference in New Issue
Block a user