Change host port to 3001 and add panic recovery to main
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-3
@@ -1,10 +1,8 @@
|
|||||||
version: '3.8'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
docker-manager:
|
docker-manager:
|
||||||
build: .
|
build: .
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3001:3000"
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@@ -6,10 +6,19 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
"runtime/debug"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "PANIC: %v\n", r)
|
||||||
|
debug.PrintStack()
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
// Detect Docker socket
|
// Detect Docker socket
|
||||||
socketPath := docker.DetectSocket()
|
socketPath := docker.DetectSocket()
|
||||||
fmt.Printf("Using Docker socket: %s\n", socketPath)
|
fmt.Printf("Using Docker socket: %s\n", socketPath)
|
||||||
|
|||||||
Reference in New Issue
Block a user