Skip to content

Commit ba3e853

Browse files
committed
put promtail on default CTF network to be able to run seamlessly in CI
1 parent dc75805 commit ba3e853

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

framework/promtail.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ scrape_configs:
6060
lokiTenantID := os.Getenv("LOKI_TENANT_ID")
6161

6262
if lokiURL == "" {
63-
lokiURL = "http://host.docker.internal:3030/loki/api/v1/push"
63+
lokiURL = "http://loki:3100/loki/api/v1/push"
6464
}
6565
if lokiTenantID == "" {
6666
lokiTenantID = "promtail"
@@ -131,6 +131,10 @@ func NewPromtail() error {
131131
ExposedPorts: []string{"9080/tcp"},
132132
Name: "promtail",
133133
Cmd: cmd,
134+
Networks: []string{DefaultNetworkName},
135+
NetworkAliases: map[string][]string{
136+
DefaultNetworkName: {"loki"},
137+
},
134138
Files: []testcontainers.ContainerFile{
135139
{
136140
HostFilePath: pcn,

0 commit comments

Comments
 (0)