Increase command output, update container names

This commit is contained in:
Daniel Winning 2025-04-14 00:13:30 +01:00
parent 038b15124c
commit 42d96d6a2e
4 changed files with 11 additions and 4 deletions

View file

@ -22,11 +22,11 @@ Creates a new PHP development environment and mounts your project files.
> >
> **Required?** > **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` > `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 > #### Argument: path
> >

View file

@ -7,3 +7,4 @@ services:
volumes: volumes:
- ${PROJECT_DIRECTORY}:/var/www/html:cached - ${PROJECT_DIRECTORY}:/var/www/html:cached
- ./nginx/conf.d:/etc/nginx/conf.d - ./nginx/conf.d:/etc/nginx/conf.d
container_name: ${PROJECT_NAME}-nginx

View file

@ -11,3 +11,4 @@ services:
- ${PROJECT_DIRECTORY}:/var/www/html:cached - ${PROJECT_DIRECTORY}:/var/www/html:cached
ports: ports:
- ${PHP_PORT}:9003 - ${PHP_PORT}:9003
container_name: ${PROJECT_NAME}-php

View file

@ -82,13 +82,18 @@ class SpinCommand extends AbstractSpinnerCommand
} }
$this->style->success("Spinning up a new development environment..."); $this->style->success("Spinning up a new development environment...");
$this->style->text('Creating project data...'); $this->style->text('Creating project data...');
$this->createProjectData($input); $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'))); $command = $this->buildDockerComposeCommand(sprintf('-p %s up', $input->getArgument('name')));
passthru($command); passthru($command);
$this->style->success('Docker images built.');
return Command::SUCCESS; return Command::SUCCESS;
} }