-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Add improved development environment with backend in Docker and front… #330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
59e20ad
Add improved development environment with backend in Docker and front…
zakstam 85957c1
Refactor development environment setup: replace dev.bat with Makefile…
zakstam ccd464c
Enhance development environment: add environment variable checks and …
zakstam 97f4e9b
Improve development environment with Docker Compose profiles
Wirasm 065ca3a
Merge main branch and resolve conflicts
Wirasm 57994ff
Fix make stop command to properly handle Docker Compose profiles
Wirasm 5c4861b
Fix README to document correct make commands
Wirasm caf4398
fix: Address critical issues from code review #435
Wirasm 80b0f70
Fix container name resolution for MCP server
Wirasm edaf129
Fix frontend test failures in API configuration tests
Wirasm 30a26a4
Fix make stop-local to avoid Docker daemon interference
Wirasm 893f573
refactor: Simplify development workflow based on comprehensive review
Wirasm 25bfb68
feat: Add granular test and lint commands to Makefile
Wirasm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,3 +3,4 @@ __pycache__ | |
| .serena | ||
| .claude/settings.local.json | ||
| PRPs/local | ||
| /logs/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| # Archon Makefile - Simple, Secure, Cross-Platform | ||
| SHELL := /bin/bash | ||
| .SHELLFLAGS := -ec | ||
|
|
||
| .PHONY: help dev dev-docker stop test test-fe test-be lint lint-fe lint-be clean install check | ||
|
|
||
| help: | ||
| @echo "Archon Development Commands" | ||
| @echo "===========================" | ||
| @echo " make dev - Backend in Docker, frontend local (recommended)" | ||
| @echo " make dev-docker - Everything in Docker" | ||
| @echo " make stop - Stop all services" | ||
| @echo " make test - Run all tests" | ||
| @echo " make test-fe - Run frontend tests only" | ||
| @echo " make test-be - Run backend tests only" | ||
| @echo " make lint - Run all linters" | ||
| @echo " make lint-fe - Run frontend linter only" | ||
| @echo " make lint-be - Run backend linter only" | ||
| @echo " make clean - Remove containers and volumes" | ||
| @echo " make install - Install dependencies" | ||
| @echo " make check - Check environment setup" | ||
|
|
||
| # Install dependencies | ||
| install: | ||
| @echo "Installing dependencies..." | ||
| @cd archon-ui-main && npm install | ||
| @cd python && uv sync | ||
| @echo "✓ Dependencies installed" | ||
|
|
||
| # Check environment | ||
| check: | ||
| @echo "Checking environment..." | ||
| @node check-env.js | ||
| @echo "Checking Docker..." | ||
| @docker --version > /dev/null 2>&1 && echo "✓ Docker installed" || echo "✗ Docker not found" | ||
| @docker-compose --version > /dev/null 2>&1 && echo "✓ Docker Compose installed" || echo "✗ Docker Compose not found" | ||
|
|
||
| # Hybrid development (recommended) | ||
| dev: check | ||
| @echo "Starting hybrid development..." | ||
| @echo "Backend: Docker | Frontend: Local with hot reload" | ||
| @docker-compose --profile backend up -d --build | ||
| @echo "Backend running at http://localhost:8181" | ||
| @echo "Starting frontend..." | ||
| @cd archon-ui-main && npm run dev | ||
|
|
||
| # Full Docker development | ||
| dev-docker: check | ||
| @echo "Starting full Docker environment..." | ||
| @docker-compose --profile full up -d --build | ||
| @echo "✓ All services running" | ||
| @echo "Frontend: http://localhost:3737" | ||
| @echo "API: http://localhost:8181" | ||
|
|
||
| # Stop all services | ||
| stop: | ||
| @echo "Stopping all services..." | ||
| @docker-compose --profile backend --profile frontend --profile full down | ||
| @echo "✓ Services stopped" | ||
|
|
||
| # Run all tests | ||
| test: test-fe test-be | ||
|
|
||
| # Run frontend tests | ||
| test-fe: | ||
| @echo "Running frontend tests..." | ||
| @cd archon-ui-main && npm test | ||
|
|
||
| # Run backend tests | ||
| test-be: | ||
| @echo "Running backend tests..." | ||
| @cd python && uv run pytest | ||
|
|
||
| # Run all linters | ||
| lint: lint-fe lint-be | ||
|
|
||
| # Run frontend linter | ||
| lint-fe: | ||
| @echo "Linting frontend..." | ||
| @cd archon-ui-main && npm run lint | ||
|
|
||
| # Run backend linter | ||
| lint-be: | ||
| @echo "Linting backend..." | ||
| @cd python && uv run ruff check --fix | ||
|
|
||
| # Clean everything (with confirmation) | ||
| clean: | ||
| @echo "⚠️ This will remove all containers and volumes" | ||
| @read -p "Are you sure? (y/N) " -n 1 -r; \ | ||
| echo; \ | ||
| if [[ $$REPLY =~ ^[Yy]$$ ]]; then \ | ||
| docker-compose down -v --remove-orphans; \ | ||
| echo "✓ Cleaned"; \ | ||
| else \ | ||
| echo "Cancelled"; \ | ||
| fi | ||
|
|
||
| .DEFAULT_GOAL := help | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Make “check” fail fast and support both “docker compose” and “docker-compose”.
Currently prints missing tools but continues, and only checks docker-compose. Detect either CLI and abort early if missing; also verify Node presence before running check-env.js.
Apply this diff (adds COMPOSE detection too; see next comment):
📝 Committable suggestion
🤖 Prompt for AI Agents