From 287ea4b90cd10744d3d33cc7338a6266abbb5b5f Mon Sep 17 00:00:00 2001 From: rainyy21 Date: Mon, 9 Nov 2026 13:39:25 -0500 Subject: [PATCH] move the watcher to a app file and set up docker file and docker compose file --- Dockerfile | 17 +++++++++++++++++ watcher.py => app/watcher.py | 0 docker-compose.yml | 13 +++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 Dockerfile rename watcher.py => app/watcher.py (100%) create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..92645be --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM python:3.12-alpha + +RUN apk add --no-cache git docker-cli docker-cli-compose && git config --global --add safe.directory '*' + +WORKDIR /app + +COPY requirements.txt + +RUN pip install --no-cache-dir -r requirements.txt + +COPY watcher.py + +ENV PYTHONUMBUDDERED = 1 + +CMD ["python", "/app/watcher.py"] + + diff --git a/watcher.py b/app/watcher.py similarity index 100% rename from watcher.py rename to app/watcher.py diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..aeef3d6 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,13 @@ +services: + gitops-watcher: + build: . + container_name: gitops-watcher + restart: unless-stopped + environment: + CHECK_INTERVAL: 30 + STACKS_DIR: /opt/gitops + CONFIG_PATH: /config/repos.yml + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - ./repos.yml/:config/repos.yml:ro + - /opt/gitops:/opt/gitops