-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose-otel.yml
76 lines (72 loc) · 2.68 KB
/
docker-compose-otel.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
version: '3.7'
#================================================================================================
# NETWORK SETUP
#================================================================================================
networks:
devopscorner_net:
name: devopscorner_net
driver: bridge
ipam:
config:
- subnet: 172.148.0.0/16
#================================================================================================
# VOLUME SETUP
#================================================================================================
volumes:
vol_portainer:
driver: ${VOLUMES_DRIVER:-local}
driver_opts:
o: bind
type: none
device: ${DATA_PORTAINER:-/opt/data/docker/portainer2.9}
vol_go_bookstore_adot:
driver: ${VOLUMES_DRIVER:-local}
driver_opts:
o: bind
type: none
device: ${DATA_GO_BOOKSTORE_ADOT:-/opt/data/docker/go-bookstore-adot}
services:
#================================================================================================
# PORTAINER
#================================================================================================
portainer:
image: dockerframework/portainer:${PORTAINER_VERSION:-2.9}
container_name: ${CONTAINER_PORTAINER:-devopscorner_portainer}
restart: unless-stopped
ports:
- "${PORT_PORTAINER:-5212}:9000"
volumes:
# - /etc/localtime:/etc/localtime:ro ## Do not use it in mac
- /var/run/docker.sock:/var/run/docker.sock ## Do not use it in k8s
- vol_portainer:/data
environment:
- PORTAINER_TEMPLATE=generic
- PORTAINER_VERSION=${PORTAINER_VERSION:-2.9}
privileged: true
networks:
devopscorner_net:
ipv4_address: ${CONTAINER_IP_PORTAINER:-172.148.148.5}
#================================================================================================
# OTEL
#================================================================================================
otel:
image: amazon/aws-otel-collector:latest
container_name: ${CONTAINER_OTEL:-devopscorner_otel}
restart: unless-stopped
ports:
- "1777:1777" # pprof extension
- "55679:55679" # zpages extension
- "4317:4317" # OTLP receiver
- "13133" # health_check
volumes:
- ./docker/config/otel/config.yaml:/etc/otel-agent-config.yaml
- ~/.aws:/root/.aws
command: ["--config=/etc/otel-agent-config.yaml"]
environment:
- AWS_ACCESS_KEY_ID=YOUR_AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY=YOUR_AWS_SECRET_ACCESS_KEY
- AWS_REGION=us-west-2
privileged: true
networks:
devopscorner_net:
ipv4_address: ${CONTAINER_IP_PORTAINER:-172.148.148.12}