Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions docker-compose/docker-compose.dev.mac.sample.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
version: "3.7"

services:
nginx:
volumes:
&appvolumes-mac
phpfpm:
volumes: &appvolumes-mac
- workspace:/var/www/html
- ./app:/var/www/html/app:delegated
- ./.git:/var/www/html/.git:delegated
Expand All @@ -12,9 +11,6 @@ services:
- ./composer.lock:/var/www/html/composer.lock:delegated
# {FILES_IN_GIT}

phpfpm:
volumes: *appvolumes-mac

phpfpmdebug:
volumes:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we could re-use volumes from phpfpm service. Can't we?

- workspace:/var/www/html
Expand All @@ -26,6 +22,9 @@ services:
- ./config/dockergento/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini:delegated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is missing # {FILES_IN_GIT} - it will be replaced during setup

- ./config/dockergento/usr/local/etc/php/conf.d/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini:delegated

nginx:
volumes: *appvolumes-mac

node:
volumes: *appvolumes-mac

Expand Down
32 changes: 14 additions & 18 deletions docker-compose/docker-compose.sample.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,33 @@
version: "3.7"

services:

nginx:
image: modestcoders/nginx:1.13
ports:
- 80:8000
phpfpm:
image: modestcoders/php:7.1-fpm
volumes: &appvolumes
- ../.composer:/var/www/.composer:delegated
- ../.composer:/var/www/html/var/composer_home:delegated
- ./config/dockergento/nginx/conf/default.conf:/etc/nginx/conf.d/default.conf:delegated
- ./config/dockergento/usr/local/etc/php-fpm.conf:/usr/local/etc/php-fpm.conf:delegated
depends_on:
- phpfpm
- phpfpmdebug

phpfpm:
image: modestcoders/php:7.2-fpm
volumes: *appvolumes
environment:
environment: &phpfpmenv
PHP_IDE_CONFIG: serverName=localhost
depends_on:
depends_on: &phpfpmdependencies
- db
- elasticsearch

phpfpmdebug:
image: modestcoders/php:7.2-fpm
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image should be the same as in phpfpm: modestcoders/php:7.1-fpm
otherwise we'll have different php versions with and w/o xdebug

volumes: *appvolumes
environment:
PHP_IDE_CONFIG: serverName=localhost
environment: *phpfpmenv
depends_on: *phpfpmdependencies

nginx:
image: modestcoders/nginx:1.13
ports:
- 80:8000
volumes: *appvolumes
depends_on:
- db
- elasticsearch
- phpfpm
- phpfpmdebug

db:
image: mysql:5.7
Expand Down