Docker > rename "php-cli" service to "php"

This commit is contained in:
Meritoo
2018-07-02 08:47:56 +02:00
parent 72fd87e165
commit 9342f0e87e
3 changed files with 12 additions and 11 deletions

View File

@@ -5,6 +5,7 @@ Common and useful classes, methods, exceptions etc.
# 0.1.0 # 0.1.0
1. Composer > support/require PHP 5.6+ (instead of 5.5.9+) 1. Composer > support/require PHP 5.6+ (instead of 5.5.9+)
2. Docker > rename `php-cli` service to `php`
# 0.0.21 # 0.0.21

View File

@@ -1,9 +1,9 @@
version: '3' version: '3'
services: services:
php-cli: php:
image: ${DOCKER_CONTAINER_OWNER}/${DOCKER_CONTAINER_PROJECT}-php-cli image: ${DOCKER_CONTAINER_OWNER}/${DOCKER_CONTAINER_PROJECT}-php
container_name: ${DOCKER_CONTAINER_OWNER}-${DOCKER_CONTAINER_PROJECT}-php-cli container_name: ${DOCKER_CONTAINER_OWNER}-${DOCKER_CONTAINER_PROJECT}-php
entrypoint: php entrypoint: php
command: -S 0.0.0.0:9999 command: -S 0.0.0.0:9999
build: build:
@@ -13,7 +13,7 @@ services:
volumes: volumes:
- .:/project - .:/project
composer: composer:
image: ${DOCKER_CONTAINER_OWNER}/${DOCKER_CONTAINER_PROJECT}-php-cli image: ${DOCKER_CONTAINER_OWNER}/${DOCKER_CONTAINER_PROJECT}-php
container_name: ${DOCKER_CONTAINER_OWNER}-${DOCKER_CONTAINER_PROJECT}-composer container_name: ${DOCKER_CONTAINER_OWNER}-${DOCKER_CONTAINER_PROJECT}-composer
entrypoint: composer entrypoint: composer
volumes: volumes:

View File

@@ -61,13 +61,13 @@ docker-compose run composer remove <vendor>/<package>
Fix coding standard by running command: Fix coding standard by running command:
```bash ```bash
docker-compose exec php-cli php-cs-fixer fix docker-compose exec php php-cs-fixer fix
``` ```
Omit cache and run the Fixer from scratch by running command: Omit cache and run the Fixer from scratch by running command:
```bash ```bash
docker-compose exec php-cli rm .php_cs.cache && docker-compose exec php-cli php-cs-fixer fix docker-compose exec php rm .php_cs.cache && docker-compose exec php php-cs-fixer fix
``` ```
> [Want more?](https://cs.sensiolabs.org) > [Want more?](https://cs.sensiolabs.org)
@@ -82,17 +82,17 @@ Install required packages by running command: `docker-compose run composer insta
#### Simply & quick, without code coverage #### Simply & quick, without code coverage
Tests are running using Docker and `php-cli` service defined in `docker-compose.yml`. Example: Tests are running using Docker and `php` service defined in `docker-compose.yml`. Example:
```bash ```bash
docker-compose exec php-cli phpunit --no-coverage docker-compose exec php phpunit --no-coverage
``` ```
You can also run them in container. In this case you have to run 2 commands: You can also run them in container. In this case you have to run 2 commands:
1. Enter container: 1. Enter container:
```bash ```bash
docker-compose exec php-cli bash docker-compose exec php bash
``` ```
2. Run tests: 2. Run tests:
@@ -104,7 +104,7 @@ You can also run them in container. In this case you have to run 2 commands:
#### With code coverage #### With code coverage
```bash ```bash
docker-compose exec php-cli phpunit docker-compose exec php phpunit
``` ```
# Other # Other
@@ -112,7 +112,7 @@ docker-compose exec php-cli phpunit
Rebuild project and run tests by running command: Rebuild project and run tests by running command:
```bash ```bash
docker-compose exec php-cli phing docker-compose exec php phing
``` ```
[&lsaquo; Back to `Readme`](../README.md) [&lsaquo; Back to `Readme`](../README.md)