Skip to content

Commit 1a2493d

Browse files
committed
improve docker on typescript & javascript backends
1 parent 867e8a9 commit 1a2493d

File tree

8 files changed

+24
-7
lines changed

8 files changed

+24
-7
lines changed

backend-javascript/.env.production

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,5 @@ REDIS_URL=redis://localhost:6379
5050

5151
# === PROMETHEUS ===
5252
PROMETHEUS_ENABLED=true
53-
PROMETHEUS_MODE=http_requests_total
53+
# PROMETHEUS_MODE=http_requests_total
54+
PROMETHEUS_MODE=all

backend-javascript/.env.test

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,5 @@ REDIS_URL=redis://localhost:6379
4949

5050
# === PROMETHEUS ===
5151
PROMETHEUS_ENABLED=true
52-
PROMETHEUS_MODE=http_requests_total
52+
# PROMETHEUS_MODE=http_requests_total
53+
PROMETHEUS_MODE=all

backend-javascript/docker/docker-compose.monitoring.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ services:
3131
image: prom/prometheus
3232
container_name: prometheus
3333
volumes:
34+
- prometheus_data:/prometheus
3435
- ./prometheus.yml:/etc/prometheus/prometheus.yml
3536
ports:
3637
- "9090:9090"
@@ -51,4 +52,7 @@ services:
5152
image: redislabs/redisinsight:1.14.0
5253
container_name: redisinsight
5354
ports:
54-
- "8001:8001"
55+
- "8001:8001"
56+
57+
volumes:
58+
prometheus_data:

backend-typescript/.env.development

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,3 @@ REDIS_URL=redis://localhost:6379
5353
PROMETHEUS_ENABLED=true
5454
# PROMETHEUS_MODE=http_requests_total
5555
PROMETHEUS_MODE=all
56-

backend-typescript/.env.production

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,5 @@ REDIS_URL=redis://localhost:6379
5050

5151
# === PROMETHEUS ===
5252
PROMETHEUS_ENABLED=true
53-
PROMETHEUS_MODE=http_requests_total
53+
# PROMETHEUS_MODE=http_requests_total
54+
PROMETHEUS_MODE=all

backend-typescript/.env.test

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,5 @@ REDIS_URL=redis://localhost:6379
3636

3737
# === PROMETHEUS ===
3838
PROMETHEUS_ENABLED=true
39-
PROMETHEUS_MODE=http_requests_total
39+
# PROMETHEUS_MODE=http_requests_total
40+
PROMETHEUS_MODE=all

backend-typescript/docker/docker-compose.monitoring.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ services:
3131
image: prom/prometheus
3232
container_name: prometheus
3333
volumes:
34+
- prometheus_data:/prometheus
3435
- ./prometheus.yml:/etc/prometheus/prometheus.yml
3536
ports:
3637
- "9090:9090"
@@ -51,4 +52,7 @@ services:
5152
image: redislabs/redisinsight:1.14.0
5253
container_name: redisinsight
5354
ports:
54-
- "8001:8001"
55+
- "8001:8001"
56+
57+
volumes:
58+
prometheus_data:

backend-typescript/docker/prometheus.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,9 @@ scrape_configs:
1313
static_configs:
1414
- targets:
1515
- host.docker.internal:3002
16+
17+
- job_name: 'backend-springboot'
18+
metrics_path: '/prometheus'
19+
static_configs:
20+
- targets:
21+
- host.docker.internal:3003

0 commit comments

Comments
 (0)