Rename cli to server and add a docker distro

This commit is contained in:
2026-02-28 19:54:16 +01:00
parent 1c7886463d
commit 564ba1d85d
10 changed files with 88 additions and 26 deletions

View File

@@ -23,10 +23,30 @@ rm -rf build dist
echo "Building binary with PyInstaller..."
uv run pyinstaller pyfa.spec
# Headless CLI exe (console) into main dist folder
if [ -f dist/pyfa_headless/pyfa-headless.exe ]; then
cp dist/pyfa_headless/pyfa-headless.exe dist/pyfa/
# Sim server exe (console) into main dist folder
if [ -f dist/pyfa_server/pyfa-server.exe ]; then
cp dist/pyfa_server/pyfa-server.exe dist/pyfa/
fi
# Docker image (Python server)
DOCKER_REPO="${DOCKER_REPO:-docker.site.quack-lab.dev}"
IMAGE_NAME="${IMAGE_NAME:-pyfa-server}"
COMMIT_SHA=$(git rev-parse --short HEAD)
IMAGE_BASE="${DOCKER_REPO}/${IMAGE_NAME}"
echo ""
echo "Building Docker image..."
docker build -t "${IMAGE_BASE}:${COMMIT_SHA}" .
docker tag "${IMAGE_BASE}:${COMMIT_SHA}" "${IMAGE_BASE}:latest"
TAGS=$(git tag --points-at HEAD 2>/dev/null || true)
if [ -n "$TAGS" ]; then
while IFS= read -r tag; do
[ -n "$tag" ] && docker tag "${IMAGE_BASE}:${COMMIT_SHA}" "${IMAGE_BASE}:${tag}"
done <<< "$TAGS"
fi
echo ""
echo "Build complete! dist/pyfa/pyfa.exe (GUI), dist/pyfa/pyfa-headless.exe (HTTP server POST /simulate :9123)"
echo "Build complete! dist/pyfa/pyfa.exe (GUI), dist/pyfa/pyfa-server.exe (POST /simulate :9123)"
echo "Docker image: ${IMAGE_BASE}:${COMMIT_SHA} (and :latest)"