Docker > name of containers > use custom suffix

Docker > the "composer" service
This commit is contained in:
Meritoo
2018-05-28 15:03:52 +02:00
parent 52e74c8b48
commit 0eb5343df0
2 changed files with 12 additions and 4 deletions

View File

@@ -1,11 +1,12 @@
# -----------------------------------------------------------------------------
# Docker
### Docker
# -----------------------------------------------------------------------------
#
# All containers
#
DOCKER_CONTAINER_PREFIX=__ENTER__CONTAINER__PREFIX__
DOCKER_CONTAINER_OWNER=__ENTER__OWNER__NAME__
DOCKER_CONTAINER_PROJECT=__ENTER__PROJECT__NAME__
#
# PHP configuration:

View File

@@ -2,8 +2,8 @@ version: '3'
services:
php-cli:
image: meritoo/common-library
container_name: ${DOCKER_CONTAINER_PREFIX}
image: ${DOCKER_CONTAINER_OWNER}/${DOCKER_CONTAINER_PROJECT}-php-cli
container_name: ${DOCKER_CONTAINER_OWNER}-${DOCKER_CONTAINER_PROJECT}-php-cli
working_dir: /project
entrypoint: php
command: -S 0.0.0.0:9999
@@ -13,3 +13,10 @@ services:
- TIMEZONE=$TIMEZONE
volumes:
- .:/project
composer:
image: ${DOCKER_CONTAINER_OWNER}/${DOCKER_CONTAINER_PROJECT}-php-cli
container_name: ${DOCKER_CONTAINER_OWNER}-${DOCKER_CONTAINER_PROJECT}-composer
working_dir: /project
command: composer
volumes:
- .:/project