From 42d96d6a2e1f952a7a3b374a819822277b3788ad Mon Sep 17 00:00:00 2001 From: Daniel Winning Date: Mon, 14 Apr 2025 00:13:30 +0100 Subject: [PATCH] Increase command output, update container names --- README.md | 4 ++-- config/nginx.yaml | 3 ++- config/php.yaml | 3 ++- src/Command/SpinCommand.php | 5 +++++ 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 95f2b62..d746b26 100644 --- a/README.md +++ b/README.md @@ -22,11 +22,11 @@ Creates a new PHP development environment and mounts your project files. > > **Required?** ✅ > -> The name of your Docker containers. Your containers will spin up with the name {name}-{service}-1 i.e. +> The name of your Docker containers. Your containers will spin up with the name {name}-{service} i.e. > > `spinner spin:up name=test path=/path` > -> Results in containers named `test-php-1` and `test-nginx-1` +> Results in containers named `test-php` and `test-nginx` > #### Argument: path > diff --git a/config/nginx.yaml b/config/nginx.yaml index a43e2bc..6bb2d62 100644 --- a/config/nginx.yaml +++ b/config/nginx.yaml @@ -6,4 +6,5 @@ services: - ${NGINX_PORT}:80 volumes: - ${PROJECT_DIRECTORY}:/var/www/html:cached - - ./nginx/conf.d:/etc/nginx/conf.d \ No newline at end of file + - ./nginx/conf.d:/etc/nginx/conf.d + container_name: ${PROJECT_NAME}-nginx \ No newline at end of file diff --git a/config/php.yaml b/config/php.yaml index 0e1aecd..fdfb158 100644 --- a/config/php.yaml +++ b/config/php.yaml @@ -10,4 +10,5 @@ services: volumes: - ${PROJECT_DIRECTORY}:/var/www/html:cached ports: - - ${PHP_PORT}:9003 \ No newline at end of file + - ${PHP_PORT}:9003 + container_name: ${PROJECT_NAME}-php \ No newline at end of file diff --git a/src/Command/SpinCommand.php b/src/Command/SpinCommand.php index 614a29c..0bad9ce 100644 --- a/src/Command/SpinCommand.php +++ b/src/Command/SpinCommand.php @@ -82,13 +82,18 @@ class SpinCommand extends AbstractSpinnerCommand } $this->style->success("Spinning up a new development environment..."); + $this->style->text('Creating project data...'); $this->createProjectData($input); + $this->style->success('Project data created.'); + $this->style->text('Building Docker images...'); $command = $this->buildDockerComposeCommand(sprintf('-p %s up', $input->getArgument('name'))); passthru($command); + $this->style->success('Docker images built.'); + return Command::SUCCESS; }