aoh

A tool for running Ansible playbooks with `curl <url> | python` commands
git clone https://git.ashermorgan.net/aoh/
Log | Files | Refs | README

commit 05ba00427778f7ea726a14992ccbb4c3060d72fe
parent 1ce74e1e882578209503e3242747a079cb7fbe7d
Author: Asher Morgan <asher@ashermorgan.net>
Date:   Sun, 23 Aug 2026 15:27:05 -0700

Dockerize AoH server

Diffstat:
ADockerfile | 11+++++++++++
Maoh/__init__.py | 9+++++++++
Maoh/__main__.py | 8++------
Mrequirements.txt | 2++
4 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/Dockerfile b/Dockerfile @@ -0,0 +1,11 @@ +FROM python:3-alpine + +WORKDIR /app + +COPY requirements.txt . +RUN python3 -m pip install --no-cache-dir -r requirements.txt + +COPY aoh aoh + +EXPOSE 8000 +CMD ["gunicorn", "-b", "0.0.0.0:8000", "aoh:create_app()"] diff --git a/aoh/__init__.py b/aoh/__init__.py @@ -0,0 +1,9 @@ +from dotenv import load_dotenv + +from .server import app, scheduler + + +def create_app(): + load_dotenv() + scheduler.start() + return app diff --git a/aoh/__main__.py b/aoh/__main__.py @@ -1,7 +1,3 @@ -from dotenv import load_dotenv +from . import create_app -from .server import app, scheduler - -load_dotenv() -scheduler.start() -app.run(debug=True) +create_app().run(debug=True) diff --git a/requirements.txt b/requirements.txt @@ -1,5 +1,7 @@ ansible ansible_runner flask +flask-apscheduler +gunicorn python-dotenv pyyaml