From 60e6bab7858256615d5376eb804a05f173ece27a Mon Sep 17 00:00:00 2001 From: kianiadee Date: Sun, 17 May 2026 23:35:39 +0300 Subject: [PATCH] Add Coolify compose for log-proxy + bake groups.yml into image --- coolify/log-proxy.compose.yml | 60 +++++++++++++++++++++++++++++++++++ log-proxy/Dockerfile | 1 + 2 files changed, 61 insertions(+) create mode 100644 coolify/log-proxy.compose.yml diff --git a/coolify/log-proxy.compose.yml b/coolify/log-proxy.compose.yml new file mode 100644 index 0000000..03cdf73 --- /dev/null +++ b/coolify/log-proxy.compose.yml @@ -0,0 +1,60 @@ +# Coolify-managed Docker Compose service for log-proxy. +# +# Deploy via Coolify UI: +# Resource → Add → Docker Compose (Public Repository) +# Repository: https://repo.rahamafresh.com/kianiadee/dozzle_n8n_logging +# Branch: main +# Compose path: coolify/log-proxy.compose.yml +# Build pack: Dockerfile (Coolify auto-detects from compose build:) +# Domain: leave empty — service is internal-only +# +# After deploy, n8n reaches it at: http://log-proxy:8080 +# Why an external network? n8n lives on its own Coolify-isolated network +# (o55elukmxacgp1s2xcwktyam). Attaching log-proxy to that network as a sidecar +# is less invasive than rewiring n8n. + +services: + log-proxy: + build: + context: ../log-proxy + dockerfile: Dockerfile + restart: unless-stopped + + # Only read access. No write endpoints in the app; this is belt-and-braces. + volumes: + - /var/run/docker.sock:/var/run/docker.sock:ro + + # Join the n8n service network so n8n can resolve `log-proxy` by name. + networks: + n8n_net: + aliases: + - log-proxy + + healthcheck: + test: + - CMD + - python + - -c + - "import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://localhost:8080/healthz', timeout=3).status==200 else 1)" + interval: 30s + timeout: 5s + retries: 3 + start_period: 10s + + # No published ports — internal only. n8n reaches the container via the + # shared `n8n_net` network on port 8080. + expose: + - "8080" + + # Light defensive limits. Tune if log volume on a group is very high. + deploy: + resources: + limits: + memory: 256M + +networks: + # The n8n queue-mode service's Docker network. Coolify created this when + # it deployed n8n-o55elukmxacgp1s2xcwktyam. + n8n_net: + name: o55elukmxacgp1s2xcwktyam + external: true diff --git a/log-proxy/Dockerfile b/log-proxy/Dockerfile index 3e4577f..fe4d9d5 100644 --- a/log-proxy/Dockerfile +++ b/log-proxy/Dockerfile @@ -6,6 +6,7 @@ COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY app.py . +COPY groups.yml /config/groups.yml ENV GROUPS_PATH=/config/groups.yml \ PORT=8080