diff --git a/apm-server/config/apm-server.yml b/apm-server/config/apm-server.yml index 68a6559..3c6dd36 100644 --- a/apm-server/config/apm-server.yml +++ b/apm-server/config/apm-server.yml @@ -4,7 +4,7 @@ apm-server: # Defines the host and port the server is listening on. Use "unix:/path/to.sock" to listen on a unix domain socket. - host: "0.0.0.0:8200" + host: "0.0.0.0:${APMSERVER_PORT}" #---------------------------- APM Server - Secure Communication with Agents ---------------------------- diff --git a/docker-compose.yml b/docker-compose.yml index 483cc88..b4e8d89 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -134,8 +134,6 @@ services: args: ELK_VERSION: $ELK_VERSION restart: unless-stopped - ports: - - "8200:8200" volumes: - ./apm-server/config/apm-server.yml:/usr/share/apm-server/apm-server.yml:ro environment: @@ -143,6 +141,9 @@ services: ELASTIC_PASSWORD: ${ELASTIC_PASSWORD} ELASTICSEARCH_HOST_PORT: https://${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT} ELASTIC_APM_SECRET_TOKEN: ${ELASTIC_APM_SECRET_TOKEN} + APMSERVER_PORT: ${APMSERVER_PORT} + ports: + - "${APMSERVER_PORT}:${APMSERVER_PORT}" secrets: - source: elastic.ca target: /certs/ca.crt