Skip to content

Commit eff839e

Browse files
Merge pull request #118 from BendingBender/fix-apm-server-port-var
Allow changing the APM server port via .env file
2 parents 0d5e46d + b9a43d0 commit eff839e

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

apm-server/config/apm-server.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
apm-server:
66
# Defines the host and port the server is listening on. Use "unix:/path/to.sock" to listen on a unix domain socket.
7-
host: "0.0.0.0:8200"
7+
host: "0.0.0.0:${APMSERVER_PORT}"
88

99

1010
#---------------------------- APM Server - Secure Communication with Agents ----------------------------

docker-compose.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,16 @@ services:
134134
args:
135135
ELK_VERSION: $ELK_VERSION
136136
restart: unless-stopped
137-
ports:
138-
- "8200:8200"
139137
volumes:
140138
- ./apm-server/config/apm-server.yml:/usr/share/apm-server/apm-server.yml:ro
141139
environment:
142140
ELASTIC_USERNAME: ${ELASTIC_USERNAME}
143141
ELASTIC_PASSWORD: ${ELASTIC_PASSWORD}
144142
ELASTICSEARCH_HOST_PORT: https://${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}
145143
ELASTIC_APM_SECRET_TOKEN: ${ELASTIC_APM_SECRET_TOKEN}
144+
APMSERVER_PORT: ${APMSERVER_PORT}
145+
ports:
146+
- "${APMSERVER_PORT}:${APMSERVER_PORT}"
146147
secrets:
147148
- source: elastic.ca
148149
target: /certs/ca.crt

0 commit comments

Comments
 (0)