mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-07-09 17:08:29 +00:00
WIP: docker runtime
This commit is contained in:
parent
7fc17b39c5
commit
b33b48057d
2 changed files with 4 additions and 3 deletions
|
|
@ -22,11 +22,11 @@ while true; do
|
|||
# Copy repository files if target is empty
|
||||
if [ -z "$(ls -A "$TARGET_DIR")" ]; then
|
||||
echo "Copying files from $SOURCE_DIR to $TARGET_DIR..."
|
||||
cp -rn --no-preserve=ownership,mode "$SOURCE_DIR/" "$TARGET_DIR"
|
||||
cp -rn --no-preserve=ownership,mode "$SOURCE_DIR/." "$TARGET_DIR"
|
||||
fi
|
||||
|
||||
echo "Starting A0..."
|
||||
python "$PYTHON_SCRIPT" --port 80
|
||||
python "$PYTHON_SCRIPT" --port 80 --host 0.0.0.0
|
||||
|
||||
# Check the exit status
|
||||
if [ $? -ne 0 ]; then
|
||||
|
|
|
|||
|
|
@ -573,11 +573,12 @@ def run():
|
|||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--port", type=int, default=0, help="Web UI port")
|
||||
parser.add_argument("--host", type=int, default=0, help="Web UI host")
|
||||
args = parser.parse_args()
|
||||
|
||||
# Get configuration from environment
|
||||
port = args.port or int(os.environ.get("WEB_UI_PORT", 0)) or None
|
||||
host = os.environ.get("WEB_UI_HOST") or None
|
||||
host = args.host or os.environ.get("WEB_UI_HOST") or None
|
||||
use_cloudflare = os.environ.get("USE_CLOUDFLARE", "false").lower() == "true"
|
||||
|
||||
# Initialize and start Cloudflare tunnel if enabled
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue