Add api/ and web/ via git subtree; add docker-compose.yml and unified .gitignore
This commit is contained in:
31
.gitignore
vendored
Normal file
31
.gitignore
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# Python
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*.egg-info/
|
||||||
|
.venv/
|
||||||
|
.uv/
|
||||||
|
.env
|
||||||
|
.env.*.local
|
||||||
|
.pytest_cache/
|
||||||
|
.mypy_cache/
|
||||||
|
|
||||||
|
# Node / Vite
|
||||||
|
node_modules/
|
||||||
|
dist/
|
||||||
|
.build/
|
||||||
|
.vite/
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# Editor/OS
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
# API storage & logs
|
||||||
|
api/storage/
|
||||||
|
api/usda_vision_system.log
|
||||||
|
|
||||||
|
# Docker
|
||||||
|
*.pid
|
||||||
|
|
||||||
50
docker-compose.yml
Normal file
50
docker-compose.yml
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
version: "3.9"
|
||||||
|
|
||||||
|
services:
|
||||||
|
api:
|
||||||
|
image: python:3.11-slim
|
||||||
|
working_dir: /app
|
||||||
|
volumes:
|
||||||
|
- ./api:/app
|
||||||
|
- ./api/storage:/app/storage
|
||||||
|
environment:
|
||||||
|
- PYTHONUNBUFFERED=1
|
||||||
|
command: >
|
||||||
|
sh -lc "
|
||||||
|
if [ -f requirements.txt ]; then pip install --no-cache-dir -r requirements.txt; else pip install --no-cache-dir -e .; fi;
|
||||||
|
uvicorn usda_vision_system.api.server:app --host 0.0.0.0 --port 8000 --reload
|
||||||
|
"
|
||||||
|
ports:
|
||||||
|
- "8000:8000"
|
||||||
|
depends_on:
|
||||||
|
- mqtt
|
||||||
|
|
||||||
|
web:
|
||||||
|
image: node:20-alpine
|
||||||
|
working_dir: /app
|
||||||
|
volumes:
|
||||||
|
- ./web:/app
|
||||||
|
environment:
|
||||||
|
- CHOKIDAR_USEPOLLING=true
|
||||||
|
- VITE_SUPABASE_URL=${VITE_SUPABASE_URL}
|
||||||
|
- VITE_SUPABASE_ANON_KEY=${VITE_SUPABASE_ANON_KEY}
|
||||||
|
command: >
|
||||||
|
sh -lc "
|
||||||
|
npm ci;
|
||||||
|
npm run dev -- --host 0.0.0.0 --port 5173
|
||||||
|
"
|
||||||
|
ports:
|
||||||
|
- "5173:5173"
|
||||||
|
|
||||||
|
mqtt:
|
||||||
|
image: eclipse-mosquitto:2
|
||||||
|
ports:
|
||||||
|
- "1883:1883"
|
||||||
|
volumes:
|
||||||
|
- mosquitto-data:/mosquitto/data
|
||||||
|
- mosquitto-conf:/mosquitto/config
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
mosquitto-data:
|
||||||
|
mosquitto-conf:
|
||||||
|
|
||||||
Reference in New Issue
Block a user