Skip to content

Commit e089172

Browse files
committed
chore: Adopt docker-compose-base.yml extends pattern for MassTransit compose
Aligns with the refactor in main that extracts common service config into docker-compose-base.yml.
1 parent 56ede76 commit e089172

1 file changed

Lines changed: 4 additions & 34 deletions

File tree

Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,21 @@
11
# The following must be set either in environment variables or via a .env file in the same folder as this file:
22
#
3-
# AGENT_PATH host path to the Agent linux home folder - will map to /usr/local/newrelic-dotnet-agent in the container
4-
# LOG_PATH host path for Agent logfile output - will map to /app/logs in the container
5-
# DISTRO_TAG distro tag for build, not including the architecture suffix
6-
# TARGET_ARCH the target architecture for the run -- either amd64 or arm64
7-
# BUILD_ARCH the build architecture -- either amd64 or arm64
8-
# PORT external port for the smoketest API
3+
# See docker-compose-base.yml for common required variables.
94
# CONTAINER_NAME The name for the container
10-
# PLATFORM The platform that the service runs on -- linux/amd64 or linux/arm64/v8
11-
# DOTNET_VERSION The dotnet version number to use (8.0, etc)
12-
# TEST_DOCKERFILE The path and dockerfile to use for the service.
13-
#
145
# MASSTRANSIT_KAFKA_TOPIC
156
# MASSTRANSIT_RABBITMQ_QUEUE
167
#
17-
# and the usual suspects:
18-
# NEW_RELIC_LICENSE_KEY
19-
# NEW_RELIC_HOST
20-
# NEW_RELIC_APP_NAME
21-
#
22-
#
238
# To build and run, execute `docker compose -f <path to docker-compose.yml> up`
249
# Alternatively, set COMPOSE_FILE environment variable to the path and omit the -f parameter
2510

2611
services:
2712
LinuxSmokeTestApp:
13+
extends:
14+
file: docker-compose-base.yml
15+
service: base-app
2816
container_name: ${CONTAINER_NAME}
2917
image: ${CONTAINER_NAME}
3018
platform: ${PLATFORM}
31-
build:
32-
context: .
33-
dockerfile: ${TEST_DOCKERFILE}
34-
args:
35-
DISTRO_TAG: ${DISTRO_TAG}
36-
TARGET_ARCH: ${TARGET_ARCH}
37-
BUILD_ARCH: ${BUILD_ARCH}
38-
NEW_RELIC_LICENSE_KEY: ${NEW_RELIC_LICENSE_KEY}
39-
NEW_RELIC_APP_NAME: ${NEW_RELIC_APP_NAME}
40-
NEW_RELIC_HOST: ${NEW_RELIC_HOST}
41-
DOTNET_VERSION: ${DOTNET_VERSION}
42-
APP_DOTNET_VERSION: ${APP_DOTNET_VERSION}
43-
ports:
44-
- "${PORT}:80"
45-
volumes:
46-
- ${AGENT_PATH}:/usr/local/newrelic-dotnet-agent
47-
- ${LOG_PATH}:/app/logs
4819
depends_on:
4920
- kafka-broker
5021
- rabbitmq
@@ -79,7 +50,6 @@ services:
7950
RABBITMQ_DEFAULT_USER: guest
8051
RABBITMQ_DEFAULT_PASS: guest
8152

82-
8353
networks:
8454
default:
8555
driver: bridge

0 commit comments

Comments
 (0)