wp on webui

This commit is contained in:
2026-02-02 23:37:11 +01:00
parent ce24e0caa0
commit 5e1cb64a81
8 changed files with 278 additions and 99 deletions

View File

@@ -1,4 +1,4 @@
.PHONY: build run clean
.PHONY: build run clean up down session try logs
IMAGE_NAME := opencode
IMAGE_TAG := latest
@@ -12,3 +12,31 @@ run:
clean:
docker rmi $(IMAGE_NAME):$(IMAGE_TAG) || true
# Start the full stack (session-manager, docker-daemon, caddy)
up:
docker-compose up -d --build
@echo "Stack started. Create a session with: make session"
# Stop the stack
down:
docker-compose down
# View logs
logs:
docker-compose logs -f session-manager
# Create a new session and display its info
session:
@echo "Creating new session..."
@curl -s -X POST http://localhost:8080/sessions | jq .
# Try the web interface - creates a session and opens it
try:
@echo "Creating session and opening web interface..."
@SESSION_ID=$$(curl -s -X POST http://localhost:8080/sessions | jq -r '.session_id') && \
echo "Session created: $$SESSION_ID" && \
echo "Opening http://localhost:8080/session/$$SESSION_ID" && \
xdg-open "http://localhost:8080/session/$$SESSION_ID" 2>/dev/null || \
open "http://localhost:8080/session/$$SESSION_ID" 2>/dev/null || \
echo "Visit: http://localhost:8080/session/$$SESSION_ID"