refactor: extract scheduler to standalone repository
Scheduler service moved to git.schweitz.net/jpmschweitzer/scheduler - Source code removed from this repository - Stack file updated to use container image from Gitea registry - Added Gitea Actions runner to gitea stack for CI/CD - Documentation updated with external service reference 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -48,6 +48,24 @@ services:
|
||||
networks:
|
||||
- docker-dataplane
|
||||
|
||||
gitea-runner:
|
||||
image: gitea/act_runner:latest
|
||||
container_name: gitea-runner
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /home/jpmschweitzer/docker-data/gitea/runner:/data
|
||||
environment:
|
||||
- CONFIG_FILE=/data/config.yaml
|
||||
- GITEA_INSTANCE_URL=http://gitea:3000
|
||||
- GITEA_RUNNER_REGISTRATION_TOKEN=${GITEA_RUNNER_TOKEN}
|
||||
- GITEA_RUNNER_NAME=docker-runner
|
||||
- TZ=Europe/Amsterdam
|
||||
depends_on:
|
||||
- gitea
|
||||
networks:
|
||||
- docker-dataplane
|
||||
|
||||
networks:
|
||||
docker-dataplane:
|
||||
external: true
|
||||
|
||||
+3
-25
@@ -4,35 +4,14 @@ version: '3.8'
|
||||
# Purpose: System-wide maintenance orchestration - backups, doc mirroring, cleanup, task automation
|
||||
# Port: 8090 (API + UI)
|
||||
# Network: docker-dataplane
|
||||
# Image: git.schweitz.net/jpmschweitzer/scheduler (private registry)
|
||||
|
||||
services:
|
||||
scheduler:
|
||||
image: python:3.12-slim
|
||||
image: git.schweitz.net/jpmschweitzer/scheduler:latest
|
||||
container_name: scheduler
|
||||
restart: unless-stopped
|
||||
|
||||
command: >
|
||||
sh -c "
|
||||
echo 'Installing system dependencies...' &&
|
||||
apt-get update -qq &&
|
||||
apt-get install -y --no-install-recommends git ssh postgresql-client curl docker.io >/dev/null 2>&1 &&
|
||||
rm -rf /var/lib/apt/lists/* &&
|
||||
echo 'Setting up Python environment...' &&
|
||||
if [ ! -f /venv/bin/python ]; then
|
||||
echo 'Initializing venv...' &&
|
||||
python3 -m venv --clear /venv;
|
||||
fi &&
|
||||
echo 'Upgrading pip...' &&
|
||||
/venv/bin/python -m pip install --upgrade pip --quiet &&
|
||||
echo 'Installing dependencies...' &&
|
||||
/venv/bin/python -m pip install -r /app/requirements.txt --quiet &&
|
||||
echo 'Configuring Git...' &&
|
||||
git config --global user.name 'The Librarian' &&
|
||||
git config --global user.email 'librarian@portainer-core.local' &&
|
||||
echo 'Starting The Scheduler...' &&
|
||||
/venv/bin/python -m uvicorn src.main:app --host 0.0.0.0 --port 8090 --workers 1
|
||||
"
|
||||
|
||||
ports:
|
||||
- "8090:8090"
|
||||
|
||||
@@ -65,8 +44,7 @@ services:
|
||||
- PYTHONPATH=/app
|
||||
|
||||
volumes:
|
||||
- /home/jpmschweitzer/Projects/portainer-core/services/scheduler:/app
|
||||
- /home/jpmschweitzer/docker-data/scheduler/venv:/venv
|
||||
# Data volumes only - source code is baked into image
|
||||
- /home/jpmschweitzer/docker-data/scheduler/logs:/app/logs
|
||||
- /home/jpmschweitzer/docker-data/scheduler/task-data:/app/task-data
|
||||
- /home/jpmschweitzer/docker-data/scheduler/ssh:/root/.ssh:ro
|
||||
|
||||
Reference in New Issue
Block a user