Update Dockerfile
Browse files- Dockerfile +11 -11
Dockerfile
CHANGED
|
@@ -2,17 +2,17 @@ FROM prom/prometheus:latest
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# Copy your
|
| 6 |
-
COPY turing_cloud.yml .
|
| 7 |
|
| 8 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
ENTRYPOINT ["/bin/sh", "-c"]
|
| 10 |
|
| 11 |
-
|
| 12 |
-
#
|
| 13 |
-
#
|
| 14 |
-
CMD ["/bin/prometheus
|
| 15 |
-
--config.file=/app/turing_cloud.yml \
|
| 16 |
-
--web.listen-address=0.0.0.0:$PORT \
|
| 17 |
-
--web.external-url=http://r-turing-team-turing-promethetus-server-kvuknls8-5a966-827mr:$PORT/ \
|
| 18 |
-
--storage.tsdb.path=/prometheus"]
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Copy your config
|
| 6 |
+
COPY turing_cloud.yml /app/turing_cloud.yml
|
| 7 |
|
| 8 |
+
# Switch to root to ensure permissions (optional but often safer on Spaces)
|
| 9 |
+
USER root
|
| 10 |
+
|
| 11 |
+
# 1. OVERRIDE the default Entrypoint.
|
| 12 |
+
# This tells Docker: "Don't run Prometheus yet. Run a shell instead."
|
| 13 |
ENTRYPOINT ["/bin/sh", "-c"]
|
| 14 |
|
| 15 |
+
# 2. Run the command as a single string.
|
| 16 |
+
# The shell will now expand $PORT correctly before starting Prometheus.
|
| 17 |
+
# We strictly bind to 0.0.0.0 to fix your Timeout issue.
|
| 18 |
+
CMD ["/bin/prometheus --config.file=/app/turing_cloud.yml --web.listen-address=0.0.0.0:$PORT --web.external-url=http://r-turing-team-turing-promethetus-server-kvuknls8-5a966-827mr.hf.space --storage.tsdb.path=/prometheus --web.enable-lifecycle"]
|
|
|
|
|
|
|
|
|
|
|
|