move the watcher to a app file and set up docker file and docker compose file
This commit is contained in:
+17
@@ -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"]
|
||||||
|
|
||||||
|
|
||||||
@@ -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
|
||||||
Reference in New Issue
Block a user