Add standalone docker-compose.yml
Self-contained Docker setup that clones SmartTools from Gitea during build. Includes cli, test, gui, and shell services. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
d20d7e5415
commit
6f4d136afb
|
|
@ -0,0 +1,119 @@
|
||||||
|
# Artifact Editor - AI-enhanced diagram and artifact creation
|
||||||
|
#
|
||||||
|
# Quick Start:
|
||||||
|
# docker-compose build # Build the image (clones SmartTools from Gitea)
|
||||||
|
# docker-compose run --rm test # Run tests
|
||||||
|
# docker-compose run --rm cli artifact-ai --help
|
||||||
|
#
|
||||||
|
# Dependencies:
|
||||||
|
# - SmartTools (cloned automatically from Gitea during build)
|
||||||
|
|
||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
# ============================================================================
|
||||||
|
# Main CLI
|
||||||
|
# ============================================================================
|
||||||
|
cli:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
args:
|
||||||
|
SMARTTOOLS_REPO: https://gitea.brrd.tech/rob/SmartTools.git
|
||||||
|
image: artifact-editor:latest
|
||||||
|
volumes:
|
||||||
|
- smarttools-data:/root/.smarttools
|
||||||
|
- /tmp/artifacts:/tmp/artifacts
|
||||||
|
command: ["artifact-ai", "--help"]
|
||||||
|
|
||||||
|
# ============================================================================
|
||||||
|
# Tests
|
||||||
|
# ============================================================================
|
||||||
|
test:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
args:
|
||||||
|
SMARTTOOLS_REPO: https://gitea.brrd.tech/rob/SmartTools.git
|
||||||
|
image: artifact-editor:latest
|
||||||
|
volumes:
|
||||||
|
- smarttools-data:/root/.smarttools
|
||||||
|
command: >
|
||||||
|
bash -c "
|
||||||
|
echo '=== Artifact Editor Tests ==='
|
||||||
|
echo ''
|
||||||
|
echo '1. Checking SmartTools...'
|
||||||
|
smarttools list | head -5
|
||||||
|
echo ''
|
||||||
|
echo '2. Checking artifact-ai...'
|
||||||
|
artifact-ai --help > /dev/null && echo 'artifact-ai: OK'
|
||||||
|
echo ''
|
||||||
|
echo '3. Checking artifact-export...'
|
||||||
|
artifact-export --help > /dev/null && echo 'artifact-export: OK'
|
||||||
|
echo ''
|
||||||
|
echo '4. Running unit tests...'
|
||||||
|
pytest -v tests/ 2>/dev/null || echo 'No tests found or tests skipped'
|
||||||
|
echo ''
|
||||||
|
echo '=== All checks passed ==='
|
||||||
|
"
|
||||||
|
|
||||||
|
# ============================================================================
|
||||||
|
# GUI (requires X11 forwarding)
|
||||||
|
# ============================================================================
|
||||||
|
gui:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
args:
|
||||||
|
SMARTTOOLS_REPO: https://gitea.brrd.tech/rob/SmartTools.git
|
||||||
|
image: artifact-editor:latest
|
||||||
|
environment:
|
||||||
|
- DISPLAY=${DISPLAY:-:0}
|
||||||
|
- QT_QPA_PLATFORM=xcb
|
||||||
|
volumes:
|
||||||
|
- smarttools-data:/root/.smarttools
|
||||||
|
- /tmp/artifacts:/tmp/artifacts
|
||||||
|
- /tmp/.X11-unix:/tmp/.X11-unix:ro
|
||||||
|
command: ["artifact-editor"]
|
||||||
|
network_mode: host
|
||||||
|
|
||||||
|
# ============================================================================
|
||||||
|
# Interactive Shell
|
||||||
|
# ============================================================================
|
||||||
|
shell:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
args:
|
||||||
|
SMARTTOOLS_REPO: https://gitea.brrd.tech/rob/SmartTools.git
|
||||||
|
image: artifact-editor:latest
|
||||||
|
volumes:
|
||||||
|
- smarttools-data:/root/.smarttools
|
||||||
|
- /tmp/artifacts:/tmp/artifacts
|
||||||
|
command: ["/bin/bash"]
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
smarttools-data:
|
||||||
|
# Persists ~/.smarttools between container runs
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# Usage Examples
|
||||||
|
# ==============================================================================
|
||||||
|
#
|
||||||
|
# Build (fetches SmartTools from Gitea automatically):
|
||||||
|
# docker-compose build
|
||||||
|
#
|
||||||
|
# Run tests:
|
||||||
|
# docker-compose run --rm test
|
||||||
|
#
|
||||||
|
# Use CLI:
|
||||||
|
# docker-compose run --rm cli artifact-ai --format plantuml --instruction "Create class diagram"
|
||||||
|
# echo "@startuml\nA->B\n@enduml" | docker-compose run --rm cli artifact-export --format plantuml --to /dev/stdout
|
||||||
|
#
|
||||||
|
# Launch GUI (requires: xhost +local:docker):
|
||||||
|
# docker-compose run --rm gui
|
||||||
|
#
|
||||||
|
# Interactive shell:
|
||||||
|
# docker-compose run --rm shell
|
||||||
Loading…
Reference in New Issue