Skip to content

Commit d6f671f

Browse files
ericfitzclaude
andcommitted
chore(containers): remove promtail container build
Grafana stopped bundling promtail binaries in Loki releases as of v3.7.0, breaking the dynamic download in Dockerfile.promtail. Remove the promtail container entirely: Dockerfile, config, entrypoint, Makefile targets, and build script references. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b7d6880 commit d6f671f

6 files changed

Lines changed: 3 additions & 280 deletions

File tree

Dockerfile.promtail

Lines changed: 0 additions & 58 deletions
This file was deleted.

Makefile

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,56 +1183,6 @@ push-oci-info: ## Show OCIR push instructions for external containers (tmi-ux,
11831183
push-oci-env: ## Output OCIR registry info as env vars (use: eval $$(make push-oci-env))
11841184
@scripts/deploy-oci.sh --push-env
11851185

1186-
# ============================================================================
1187-
# PROMTAIL CONTAINER MANAGEMENT
1188-
# ============================================================================
1189-
1190-
.PHONY: build-promtail start-promtail stop-promtail clean-promtail
1191-
1192-
build-promtail:
1193-
$(call log_info,Building Promtail container...)
1194-
@./scripts/build-promtail-container.sh
1195-
1196-
start-promtail:
1197-
$(call log_info,Starting Promtail container...)
1198-
@CONTAINER="promtail"; \
1199-
LOG_DIR=$$(pwd)/logs; \
1200-
if [ -z "$$LOKI_URL" ]; then \
1201-
if [ -f promtail/config.yaml ]; then \
1202-
LOKI_URL=$$(grep -A1 'clients:' promtail/config.yaml | grep 'url:' | sed 's/.*url: *//'); \
1203-
echo -e "$(BLUE)[INFO]$(NC) Using Loki URL from promtail/config.yaml"; \
1204-
else \
1205-
echo -e "$(RED)[ERROR]$(NC) LOKI_URL environment variable not set and promtail/config.yaml not found"; \
1206-
echo -e "$(BLUE)[INFO]$(NC) Set LOKI_URL (required), and optionally LOKI_USERNAME and LOKI_PASSWORD"; \
1207-
exit 1; \
1208-
fi; \
1209-
fi; \
1210-
if ! docker ps -a --format "{{.Names}}" | grep -q "^$$CONTAINER$$"; then \
1211-
echo -e "$(BLUE)[INFO]$(NC) Creating new Promtail container..."; \
1212-
echo -e "$(BLUE)[INFO]$(NC) Mounting log directory: $$LOG_DIR"; \
1213-
docker run -d \
1214-
--name $$CONTAINER \
1215-
-e LOKI_URL="$$LOKI_URL" \
1216-
-e LOKI_USERNAME="$$LOKI_USERNAME" \
1217-
-e LOKI_PASSWORD="$$LOKI_PASSWORD" \
1218-
-v $$LOG_DIR:/logs:ro \
1219-
-v /var/log/tmi:/var/log/tmi:ro \
1220-
tmi/promtail:latest; \
1221-
elif ! docker ps --format "{{.Names}}" | grep -q "^$$CONTAINER$$"; then \
1222-
echo -e "$(BLUE)[INFO]$(NC) Starting existing Promtail container..."; \
1223-
docker start $$CONTAINER; \
1224-
fi; \
1225-
echo "✅ Promtail container is running"
1226-
1227-
stop-promtail:
1228-
$(call log_info,Stopping Promtail container...)
1229-
@docker stop promtail 2>/dev/null || true
1230-
$(call log_success,"Promtail container stopped")
1231-
1232-
clean-promtail:
1233-
$(call log_warning,"Removing Promtail container...")
1234-
@docker rm -f promtail 2>/dev/null || true
1235-
$(call log_success,"Promtail container removed")
12361186

12371187
# ============================================================================
12381188
# BACKWARD COMPATIBILITY ALIASES

promtail/config.yaml.template

Lines changed: 0 additions & 47 deletions
This file was deleted.

promtail/entrypoint.sh

Lines changed: 0 additions & 121 deletions
This file was deleted.

scripts/build-app-containers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# requires-python = ">=3.11"
55
# ///
66

7-
"""Build TMI application containers (server, redis, promtail).
7+
"""Build TMI application containers (server, redis).
88
99
Supports local Docker builds and cloud registry push for OCI, AWS, Azure, GCP,
1010
and Heroku targets. See --help for full usage.
@@ -20,7 +20,7 @@
2020

2121

2222
VALID_TARGETS = ("local", "oci", "aws", "azure", "gcp", "heroku")
23-
VALID_COMPONENTS = ("server", "redis", "promtail", "all")
23+
VALID_COMPONENTS = ("server", "redis", "all")
2424
VALID_ARCHS = ("arm64", "amd64", "both")
2525
VALID_DB_BACKENDS = ("postgresql", "oracle-adb")
2626

@@ -88,7 +88,7 @@ def parse_args() -> argparse.Namespace:
8888
def resolve_components(component: str, target: str) -> list[str]:
8989
"""Resolve 'all' to component list, applying target restrictions."""
9090
if component == "all":
91-
components = ["server", "redis", "promtail"]
91+
components = ["server", "redis"]
9292
else:
9393
components = [component]
9494

scripts/container_build_helpers.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ def _get_dockerfile_map(target: str, db_backend: str) -> dict[str, str]:
179179
return {
180180
"server": "Dockerfile.server-oracle" if use_oracle else "Dockerfile.server",
181181
"redis": "Dockerfile.redis-oracle" if target == "oci" else "Dockerfile.redis",
182-
"promtail": "Dockerfile.promtail",
183182
"postgres": "Dockerfile.postgres",
184183
}
185184

0 commit comments

Comments
 (0)