blumeops/containers/devpi/start.sh
Erich Blume c8b655f177 Build local containers for k8s services (#61)
## Summary
- Move devpi Dockerfile from argocd/manifests to containers/devpi/
- Add containers for: transmission, teslamate, miniflux, kiwix-serve, kubectl
- Update all k8s deployments to use local images (registry.ops.eblu.me/blumeops/*)
- All containers use v1.0.0 tag for initial release

## Containers Added
| Container | Source | Notes |
|-----------|--------|-------|
| devpi | python:3.12-slim | Existing, moved to containers/ |
| kubectl | alpine + download | For zim-watcher CronJob |
| miniflux | Go build from source | v2.2.16 |
| kiwix-serve | Download pre-built binary | v3.8.1 |
| transmission | alpine + apk install | Simpler than linuxserver image |
| teslamate | Elixir build from source | v2.2.0 |

## Deployment and Testing
- [ ] Build and tag devpi-v1.0.0
- [ ] Build and tag kubectl-v1.0.0
- [ ] Build and tag miniflux-v1.0.0
- [ ] Build and tag kiwix-serve-v1.0.0
- [ ] Build and tag transmission-v1.0.0
- [ ] Build and tag teslamate-v1.0.0
- [ ] Sync ArgoCD apps and verify services

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Reviewed-on: https://forge.ops.eblu.me/eblume/blumeops/pulls/61
2026-01-25 21:35:57 -08:00

31 lines
844 B
Bash

#!/bin/bash
set -e
SERVERDIR="${DEVPI_SERVERDIR:-/devpi}"
HOST="${DEVPI_HOST:-0.0.0.0}"
# Note: Can't use DEVPI_PORT - Kubernetes auto-sets it for service discovery
PORT="${DEVPI_LISTEN_PORT:-3141}"
OUTSIDE_URL="${DEVPI_OUTSIDE_URL:-}"
# Check if devpi is initialized
if [ ! -f "$SERVERDIR/.serverversion" ]; then
echo "Initializing devpi server..."
if [ -z "$DEVPI_ROOT_PASSWORD" ]; then
echo "ERROR: DEVPI_ROOT_PASSWORD environment variable must be set for initialization"
exit 1
fi
devpi-init --serverdir "$SERVERDIR" --root-passwd "$DEVPI_ROOT_PASSWORD"
echo "Devpi initialized successfully"
fi
# Build command
CMD="devpi-server --serverdir $SERVERDIR --host $HOST --port $PORT"
if [ -n "$OUTSIDE_URL" ]; then
CMD="$CMD --outside-url $OUTSIDE_URL"
fi
echo "Starting devpi-server..."
exec $CMD