forked from ale10257/docker-with-php-xdebug
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
63 lines (63 loc) · 1.68 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
version: '3'
services:
php71-first:
build:
context: ./images/php71
args:
- USER_ID
- GROUP_ID
volumes:
- ./www:/var/www
- ./aliases/php71/bash.bashrc:/etc/bash.bashrc
environment:
XDEBUG_CONFIG: "remote_host=192.168.220.1 remote_enable=1 remote_autostart=off remote_port=9008"
PHP_IDE_CONFIG: "serverName=first"
networks:
- test-network
php71-two:
build:
context: ./images/php71
args:
- USER_ID
- GROUP_ID
volumes:
- ./www:/var/www
- ./aliases/php71/bash.bashrc:/etc/bash.bashrc
environment:
XDEBUG_CONFIG: "remote_host=192.168.220.1 remote_enable=1 remote_autostart=off remote_port=9009"
PHP_IDE_CONFIG: "serverName=two"
networks:
- test-network
nginx-test:
image: nginx
volumes:
- ./hosts:/etc/nginx/conf.d
- ./www:/var/www
- ./logs:/var/log/nginx
ports:
- "8080:80"
depends_on:
- php71-first
- php71-two
networks:
test-network:
aliases: # алиасы нужны если нужно общаться внутри сети между хостами. Например, если вы используете api
- first.loc
- two.loc
# mysql:
# image: mysql:5.7
# ports:
# - "3306:3306"
# volumes:
# - ./mysql/data:/var/lib/mysql
# environment:
# MYSQL_ROOT_PASSWORD: secret
# networks:
# - test-network
networks:
test-network:
driver: bridge
ipam:
driver: default
config:
- subnet: 192.168.220.0/28