refactor: extract core-api to standalone repository
Core-API service moved to git.schweitz.net/jpmschweitzer/core-api - Source code removed from this repository - Stack file updated to use container image from Gitea registry - Documentation updated with external service reference - Removed obsolete docs/services/core-api.md (docs now in core-api repo) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
+3
-33
@@ -5,38 +5,14 @@ version: '3.8'
|
||||
# Port: 8083 (HTTP API)
|
||||
# Network: docker-dataplane (shared infrastructure network)
|
||||
#
|
||||
# Setup: Create venv before first deployment:
|
||||
# cd /home/jpmschweitzer/Projects/portainer-core/services/core-api
|
||||
# python3 -m venv .venv
|
||||
# source .venv/bin/activate
|
||||
# pip install -r requirements.txt
|
||||
# Container image built from: git.schweitz.net/jpmschweitzer/core-api
|
||||
|
||||
services:
|
||||
core-api:
|
||||
image: python:3.12
|
||||
image: git.schweitz.net/jpmschweitzer/core-api:latest
|
||||
container_name: core-api
|
||||
restart: unless-stopped
|
||||
|
||||
# Production mode with workers
|
||||
# Always sync dependencies on startup to catch requirements.txt changes
|
||||
command: >
|
||||
sh -c "
|
||||
echo 'Setting up Python environment...' &&
|
||||
if [ ! -d /venv ]; then
|
||||
echo 'Creating new venv...' &&
|
||||
python3 -m venv /venv;
|
||||
fi &&
|
||||
echo 'Upgrading pip...' &&
|
||||
/venv/bin/pip install --upgrade pip &&
|
||||
echo 'Installing/updating dependencies from requirements.txt...' &&
|
||||
/venv/bin/pip install -r /app/requirements.txt &&
|
||||
echo 'Starting uvicorn server...' &&
|
||||
/venv/bin/uvicorn src.main:app
|
||||
--host 0.0.0.0
|
||||
--port 8083
|
||||
--workers 1
|
||||
"
|
||||
|
||||
ports:
|
||||
- "8083:8083"
|
||||
|
||||
@@ -89,13 +65,7 @@ services:
|
||||
- PYTHONPATH=/app
|
||||
|
||||
volumes:
|
||||
# Mount source code for live editing (not .venv - that's container-specific)
|
||||
- /home/jpmschweitzer/Projects/portainer-core/services/core-api:/app
|
||||
|
||||
# Persist container's venv for fast restarts
|
||||
- /home/jpmschweitzer/docker-data/core-api/venv:/venv
|
||||
|
||||
# Persist logs
|
||||
# Data volumes only - no source code
|
||||
- /home/jpmschweitzer/docker-data/core-api/logs:/app/logs
|
||||
|
||||
# Docker socket for direct container access (fallback when Portainer API incomplete)
|
||||
|
||||
Reference in New Issue
Block a user