refactor(docker-compose): replace hardcoded Docker Compose configuration with external YAML template for improved database detection testing

This commit is contained in:
Andras Bacsai
2025-06-04 11:32:06 +02:00
parent d3f19052ed
commit 908c587ea1
2 changed files with 319 additions and 15 deletions

View File

@@ -25,21 +25,7 @@ class DockerCompose extends Component
$this->parameters = get_route_parameters();
$this->query = request()->query();
if (isDev()) {
$this->dockerComposeRaw = 'services:
appsmith:
build:
context: .
dockerfile_inline: |
FROM nginx
ARG GIT_COMMIT
ARG GIT_BRANCH
RUN echo "Hello World ${GIT_COMMIT} ${GIT_BRANCH}"
args:
- GIT_COMMIT=cdc3b19
- GIT_BRANCH=${GIT_BRANCH}
environment:
- APPSMITH_MAIL_ENABLED=${APPSMITH_MAIL_ENABLED}
';
$this->dockerComposeRaw = file_get_contents(base_path('templates/test-database-detection.yaml'));
}
}