From 92be586826125073227ab53dcf8368e977db4a20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Tue, 12 Dec 2023 10:25:40 +0100 Subject: [PATCH] feat: start Compose on YASSG make start (#151) --- resources/YASSG/common.mk | 4 +++- tests/functional/YASSG/CompatTest.php | 9 ++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/resources/YASSG/common.mk b/resources/YASSG/common.mk index 161ba77..0fccfab 100644 --- a/resources/YASSG/common.mk +++ b/resources/YASSG/common.mk @@ -10,11 +10,13 @@ BASE_URL ?= file://localhost${APP_ROOT}/${BUILD_DIR} start: dev ## Start app in APP_ENV mode (defaults to "dev") start/dev: dev ## Start app in "dev" mode dev: clean - @make dev/assets dev/server -j2 + @make dev/assets dev/server dev/compose -j3 dev/server: vendor index.php YASSG_SKIP_BUNDLES=${YASSG_SKIP_BUNDLES} symfony server:start --no-tls --document-root=. --port=${APP_PORT} dev/assets: node_modules node_modules/.bin/encore dev-server +dev/compose: + docker compose up index.php: ln -s vendor/sigwin/yassg/web/index.php diff --git a/tests/functional/YASSG/CompatTest.php b/tests/functional/YASSG/CompatTest.php index c31223b..6a8488f 100644 --- a/tests/functional/YASSG/CompatTest.php +++ b/tests/functional/YASSG/CompatTest.php @@ -69,7 +69,7 @@ protected static function getExpectedHelpCommandsExecutionPath(?array $env = nul $start = [ 'rm -rf var/cache/* var/log/* public', - 'make dev/assets dev/server -j2', + 'make dev/assets dev/server dev/compose -j3', ]; return [ @@ -108,6 +108,13 @@ public function testDevServerWorks(): void ], []); } + public function testDevComposeWorks(): void + { + $this->testMakefileCommandsWork('dev/compose', [ + 'docker compose up', + ], []); + } + private static function generateDockerBackstopExecutionPath(string $command): string { return sprintf(