Merge branch 'bram/deployment' into elo

bram/mute agent/agent-of-chaos-1.0.1
Bram van den Heuvel 2026-07-01 22:51:46 +02:00
commit c9899c5d65
2 changed files with 6 additions and 0 deletions

View File

@ -23,4 +23,6 @@ COPY agents/ agents/
COPY pyserver/ pyserver/
COPY server.py .
ENV CONTAINERIZED=1
CMD ["python", "server.py"]

View File

@ -2,6 +2,8 @@
from __future__ import annotations
import os
from flask import Flask, jsonify, request
from agents import Agent
from typing import Any
@ -24,6 +26,7 @@ class PyServer:
:param import_name: Flask application import name
:type import_name: str
"""
self.containerized : bool = bool(int(os.environ.get("CONTAINERIZED", "0")))
self.agent = agent
self.app = Flask(import_name)
@ -49,6 +52,7 @@ class PyServer:
d = { **self.agent.profile, **d }
d["me.noordstar.peanuts.containerized"] = self.containerized
d["games"] = {}
for game, (profile, _) in self.agent.registered_games.items():
d["games"][game] = profile