mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 04:42:33 +02:00
misc: update gitignore and trunk, remove next-release.md
This commit is contained in:
parent
e9a8194cf8
commit
7420abf175
3 changed files with 6 additions and 86 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -9,6 +9,8 @@ certs*/
|
||||||
bin/
|
bin/
|
||||||
error_pages/
|
error_pages/
|
||||||
!examples/error_pages/
|
!examples/error_pages/
|
||||||
|
profiles/
|
||||||
|
data/
|
||||||
|
|
||||||
logs/
|
logs/
|
||||||
log/
|
log/
|
||||||
|
@ -30,3 +32,6 @@ test.Dockerfile
|
||||||
|
|
||||||
node_modules/
|
node_modules/
|
||||||
tsconfig.tsbuildinfo
|
tsconfig.tsbuildinfo
|
||||||
|
|
||||||
|
!agent.compose.yml
|
||||||
|
!agent/pkg/**
|
|
@ -23,7 +23,6 @@ lint:
|
||||||
enabled:
|
enabled:
|
||||||
- hadolint@2.12.1-beta
|
- hadolint@2.12.1-beta
|
||||||
- actionlint@1.7.7
|
- actionlint@1.7.7
|
||||||
- checkov@3.2.370
|
|
||||||
- git-diff-check
|
- git-diff-check
|
||||||
- gofmt@1.20.4
|
- gofmt@1.20.4
|
||||||
- golangci-lint@1.64.5
|
- golangci-lint@1.64.5
|
||||||
|
|
|
@ -1,84 +0,0 @@
|
||||||
## GoDoxy v0.10.0
|
|
||||||
|
|
||||||
### GoDoxy Agent
|
|
||||||
|
|
||||||
Maintain secure connection between main server and agent server by authenticating and encrypting connection with mTLS.
|
|
||||||
|
|
||||||
Main benefits:
|
|
||||||
|
|
||||||
- No more exposing docker socket: drops the need of `docker-socket-proxy`
|
|
||||||
- No more exposing app ports: fewer attack surface
|
|
||||||
```yaml
|
|
||||||
services:
|
|
||||||
app:
|
|
||||||
...
|
|
||||||
# ports: # this part is not needed on agent server
|
|
||||||
# - 6789
|
|
||||||
```
|
|
||||||
- Secure: no one can connect to it except GoDoxy main server because of mTLS, plus connection is encrypted
|
|
||||||
- Fetch info from agent server, e.g. CPU usage, Memory usage, container list, container logs, etc... (to be ready for beszel and dockge like features in WebUI)
|
|
||||||
|
|
||||||
#### How to setup
|
|
||||||
|
|
||||||
Prerequisites:
|
|
||||||
|
|
||||||
- GoDoxy main server must be running
|
|
||||||
|
|
||||||
1. Create a directory for agent server, cd into it
|
|
||||||
2. Copy `agent.compose.yml` into the directory
|
|
||||||
3. Modify `agent.compose.yml` to set `REGISTRATION_ALLOWED_HOSTS`
|
|
||||||
4. Run `docker-compose up -d` to start agent
|
|
||||||
5. Follow instructions on screen to run command on GoDoxy main server
|
|
||||||
6. Add config output to GoDoxy main server in `config.yml` under `providers.agents`
|
|
||||||
```yaml
|
|
||||||
providers:
|
|
||||||
agents:
|
|
||||||
- 12.34.5.6:8889
|
|
||||||
```
|
|
||||||
|
|
||||||
### How does it work
|
|
||||||
|
|
||||||
Setup flow:
|
|
||||||
|
|
||||||
```mermaid
|
|
||||||
flowchart TD
|
|
||||||
subgraph Agent Server
|
|
||||||
A[Create a directory] -->
|
|
||||||
B[Setup agent.compose.yml] -->
|
|
||||||
C[Set REGISTRATION_ALLOWED_HOSTS] -->
|
|
||||||
D[Run agent] -->
|
|
||||||
E[Wait for main server to register]
|
|
||||||
|
|
||||||
F[Respond to main server]
|
|
||||||
G[Agent now run in agent mode]
|
|
||||||
end
|
|
||||||
subgraph Main Server
|
|
||||||
E -->
|
|
||||||
H[Run register command] -->
|
|
||||||
I[Send registration request] --> F -->
|
|
||||||
J[Store client certs] -->
|
|
||||||
K[Send done request] --> G -->
|
|
||||||
L[Add agent to config.yml]
|
|
||||||
end
|
|
||||||
```
|
|
||||||
|
|
||||||
Run flow:
|
|
||||||
|
|
||||||
```mermaid
|
|
||||||
flowchart TD
|
|
||||||
subgraph Agent HTTPS Server
|
|
||||||
aa[Load CA and SSL certs] -->
|
|
||||||
ab[Start HTTPS server] -->
|
|
||||||
|
|
||||||
ac[Receive request] -->
|
|
||||||
ad[Verify client cert] -->
|
|
||||||
ae[Handle request] --> ac
|
|
||||||
end
|
|
||||||
subgraph Main Server
|
|
||||||
ma[Load client certs] -->
|
|
||||||
mb[Query agent version] --> ac
|
|
||||||
mb --> mc[Check if agent version matches] -->
|
|
||||||
md[Query agent info] --> ac
|
|
||||||
md --> ae --> me[Store agent info]
|
|
||||||
end
|
|
||||||
```
|
|
Loading…
Add table
Reference in a new issue