-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
41 lines (38 loc) · 1.5 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#Environment variables used are defined in .env file
services:
service1:
build:
context: .
dockerfile: Dockerfile
env_file:
- .env
environment:
JAVA_OPTS: "-Xms512m -Xmx624m -javaagent:/app/agents/opentelemetry-javaagent.jar"
OTEL_SERVICE_NAME: ${SERVICE_ONE_NAME}
OTEL_RESOURCE_ATTRIBUTES: "service=${SERVICE_ONE_NAME},service.name=${SERVICE_ONE_NAME},env=nalpha" # We can add more attributes in here which will be added to the trace/logs etc
OTEL_LOGS_EXPORTER: "console"
OTEL_METRICS_EXPORTER: "console"
OTEL_TRACES_EXPORTER: "console"
SERVICE_NAME: ${SERVICE_ONE_NAME}
service1_URL: http://${SERVICE_ONE_NAME}:9000
service2_URL: http://${SERVICE_TWO_NAME}:9000
ports:
- "${SERVICE_ONE_PORT}:9000"
service2:
build:
context: .
dockerfile: Dockerfile
env_file:
- .env
environment:
JAVA_OPTS: "-Xms512m -Xmx624m -javaagent:/app/agents/opentelemetry-javaagent.jar"
OTEL_SERVICE_NAME: ${SERVICE_TWO_NAME}
OTEL_RESOURCE_ATTRIBUTES: "service=${SERVICE_TWO_NAME},service.name=${SERVICE_TWO_NAME},env=nalpha" # We can add more attributes in here which will be added to the trace/logs etc
OTEL_LOGS_EXPORTER: "console"
OTEL_METRICS_EXPORTER: "console"
OTEL_TRACES_EXPORTER: "console"
SERVICE_NAME: ${SERVICE_TWO_NAME}
service1_URL: http://${SERVICE_ONE_NAME}:9000
service2_URL: http://${SERVICE_TWO_NAME}:9000
ports:
- "${SERVICE_TWO_PORT}:9000"